Index: ssts-userecord/src/main/java/com/forgon/disinfectsystem/useRecord/action/ButtJointUseRecordAction.java =================================================================== diff -u -r33348 -r33520 --- ssts-userecord/src/main/java/com/forgon/disinfectsystem/useRecord/action/ButtJointUseRecordAction.java (.../ButtJointUseRecordAction.java) (revision 33348) +++ ssts-userecord/src/main/java/com/forgon/disinfectsystem/useRecord/action/ButtJointUseRecordAction.java (.../ButtJointUseRecordAction.java) (revision 33520) @@ -948,6 +948,46 @@ } StrutsResponseUtils.output(success , success ? "保存成功" : "保存失败!"); } + + /** + * 获取患者信息 + * @param patientNum 住院号或诊疗号 + * @param numType 类型:hospitalNum或treatmentNum + * @param sourcePage 源页面:0为外来器械申请页面、1为使用记录页面 + */ + public void getPatientInfoByNumberAndType(){ + boolean success = false; + String msg = ""; + PatientInfoVO result = null; + + String patientNum = StrutsParamUtils.getPraramValue("patientNum", ""); + String numType = StrutsParamUtils.getPraramValue("numType", ""); + + if(StringUtils.isNotBlank(patientNum) && StringUtils.isNotBlank(numType)){ + + try{ + String sourcePageStr = StrutsParamUtils.getPraramValue("sourcePage", null); + Integer sourcePage = StringUtils.isBlank(sourcePageStr) ? null : Integer.parseInt(sourcePageStr); + result = dataSynchronizationManager.findPatientInfoByHospitalNumOrTreatmentNum(sourcePage , patientNum, numType); + if (result != null){ + success = true; + } + else{ + msg = "没有查找到对应的病人信息"; + } + } + catch(Exception e){ + msg = "无法连接到HIS服务器,请检查检查服务器运行状态和连接的身份验证信息!"; + logger.debug(e.getMessage()); + e.printStackTrace(); + } + } + JSONObject obj = new JSONObject(); + obj.put("success", success); + obj.put("msg", msg); + obj.put("patientInfo", result); + StrutsResponseUtils.output(obj); + } @Override public UseRecord getModel() {