Index: ssts-userecord/src/main/java/com/forgon/disinfectsystem/useRecord/util/UseRecordUtil.java =================================================================== diff -u -r36935 -r37557 --- ssts-userecord/src/main/java/com/forgon/disinfectsystem/useRecord/util/UseRecordUtil.java (.../UseRecordUtil.java) (revision 36935) +++ ssts-userecord/src/main/java/com/forgon/disinfectsystem/useRecord/util/UseRecordUtil.java (.../UseRecordUtil.java) (revision 37557) @@ -60,6 +60,16 @@ private static Logger logger = Logger.getLogger(UseRecordUtil.class); /** + * PC客户端 + */ + public static final String CILENT_PC = "PC"; + + /** + * PDA客户端 + */ + public static final String CILENT_PDA = "PDA"; + + /** * * @param useRecord 使用记录对象 * @param items @@ -619,27 +629,34 @@ } /** - * 校验使用记录的各个属性是否匹配空值的规则(暂只给pda的service接口调用此处的方法,所以只针对Pda上存在使用记录的表单录入元素有效) - * @param useRecord 使用记录 + * 校验使用记录的各个属性是否匹配空值的规则(PDA字段比PC端要少) + * @param useRecord */ - public static void validateUseRecordMatchBlankRule(UseRecord useRecord){ + public static void validateUseRecordMatchBlankRule(UseRecord useRecord, String clientType){ + //XJJQZYY-104:使用记录增加必填项配置 - //住院号 - boolean hospitalNumAllowBlank = true; //诊疗号 boolean treatmentNumAllowBlank = true; - //洗手护士 - boolean washHandNurseAllowBlank = true; - //巡回护士 - boolean circuitNurseAllowBlank = true; - //手术间 - boolean operationRoomAllowBlank = true; + //住院号 + boolean hospitalNumAllowBlank = true; + //患者ID + boolean patientIdAllowBlank = true; //姓名 boolean patientNameAllowBlank = true; //年龄 boolean patientAgeAllowBlank = true; //性别 boolean patientSexAllowBlank = true; + //身份证 + boolean patientIDCardAllowBlank = true; + //医生姓名 + boolean doctorNameAllowBlank = true; + //主刀医生 + boolean surgeonAllowBlank = true; + //手术名称 + boolean operationNameAllowBlank = true; + //手术间 + boolean operationRoomAllowBlank = true; //病区 boolean patientAreaAllowBlank = true; //病人所在科室 @@ -648,26 +665,26 @@ boolean roomNumberAllowBlank = true; //床位 boolean bedNumberAllowBlank = true; - //身份证 - boolean patientIDCardAllowBlank = true; - //手术医生 - boolean doctorNameAllowBlank = true; - //主刀医生 - boolean surgeonAllowBlank = true; + //洗手护士 + boolean washHandNurseAllowBlank = true; + //巡回护士 + boolean circuitNurseAllowBlank = true; + //特殊感染类型 + boolean specialInfectionAllowBlank = true; //麻醉医生 boolean anesthetistAllowBlank = true; //麻醉方式 boolean anesthesiaModeAllowBlank = true; - //手术名称 - boolean operationNameAllowBlank = true; //手术单号 boolean operationScheduleIdAllowBlank = true; //手术时间 boolean operationTimeAllowBlank = true; //住院次数 boolean visitIdAllowBlank = true; - //特殊感染类型 - boolean specialInfectionAllowBlank = true; + //主刀医生核算科室 + boolean doctorAccountDepartAllowBlank = true; + //主刀医生核算科室编码 + boolean doctorAccountDepartCodeAllowBlank = true; //备注 boolean remarkAllowBlank = true; @@ -683,6 +700,9 @@ if(StringUtils.equals("treatmentNum", fieldName)){ treatmentNumAllowBlank = false; } + if(StringUtils.equals("patientId", fieldName)){ + patientIdAllowBlank = false; + } if(StringUtils.equals("washHandNurse", fieldName)){ washHandNurseAllowBlank = false; } @@ -743,6 +763,12 @@ if(StringUtils.equals("specialInfection", fieldName)){ specialInfectionAllowBlank = false; } + if(StringUtils.equals("doctorAccountDepart", fieldName)){ + doctorAccountDepartAllowBlank = false; + } + if(StringUtils.equals("doctorAccountDepartCode", fieldName)){ + doctorAccountDepartCodeAllowBlank = false; + } if(StringUtils.equals("remark", fieldName)){ remarkAllowBlank = false; } @@ -759,14 +785,6 @@ } String messageContent = "不能为空"; - //住院号(pda不存在的使用记录的录入元素先不理会) - /*if(!hospitalNumAllowBlank && StringUtils.isBlank(useRecord.getHospitalNum())){ - throw new SystemException(String.format("%s%s", "住院号",messageContent)); - }*/ - //诊疗号(pda前端的必填项,此处先不理会) - /*if(!treatmentNumAllowBlank && StringUtils.isBlank(useRecord.getTreatmentNum())){ - throw new SystemException(String.format("%s%s", "诊疗号",messageContent)); - }*/ //洗手护士 if(!washHandNurseAllowBlank && StringUtils.isBlank(useRecord.getWashHandNurse())){ throw new SystemException(String.format("%s%s", "洗手护士",messageContent)); @@ -779,34 +797,10 @@ if(!operationRoomAllowBlank && StringUtils.isBlank(useRecord.getOperationRoom())){ throw new SystemException(String.format("%s%s", "手术间",messageContent)); } - //姓名(pda前端的必填项,此处先不理会) - /*if(!patientNameAllowBlank && StringUtils.isBlank(useRecord.getPatientName())){ - throw new SystemException(String.format("%s%s", "姓名",messageContent)); - }*/ //年龄 if(!patientAgeAllowBlank && StringUtils.isBlank(useRecord.getPatientAge())){ throw new SystemException(String.format("%s%s", "年龄",messageContent)); } - //性别(pda不存在的使用记录的录入元素先不理会) - /*if(!patientSexAllowBlank && StringUtils.isBlank(useRecord.getPatientSex())){ - throw new SystemException(String.format("%s%s", "性别",messageContent)); - }*/ - //病区(pda不存在的使用记录的录入元素先不理会) - /*if(!patientAreaAllowBlank && StringUtils.isBlank(useRecord.getPatientArea())){ - throw new SystemException(String.format("%s%s", "病区",messageContent)); - }*/ - //病人所在科室???(pda不存在的使用记录的录入元素先不理会) - /*if(!departNameOfpatientAllowBlank && StringUtils.isBlank(useRecord.getDepartCodeOfpatient())){ - throw new SystemException(String.format("%s%s", "病人所在科室",messageContent)); - }*/ - //病室(pda不存在的使用记录的录入元素先不理会) - /*if(!roomNumberAllowBlank && StringUtils.isBlank(useRecord.getRoomNumber())){ - throw new SystemException(String.format("%s%s", "病室",messageContent)); - }*/ - //床位(pda不存在的使用记录的录入元素先不理会) - /*if(!bedNumberAllowBlank && StringUtils.isBlank(useRecord.getBedNumber())){ - throw new SystemException(String.format("%s%s", "床位",messageContent)); - }*/ //身份证 if(!patientIDCardAllowBlank && StringUtils.isBlank(useRecord.getPatientIDCard())){ throw new SystemException(String.format("%s%s", "身份证",messageContent)); @@ -815,18 +809,6 @@ if(!doctorNameAllowBlank && StringUtils.isBlank(useRecord.getDoctorName())){ throw new SystemException(String.format("%s%s", "医生",messageContent)); } - //主刀医生(pda不存在的使用记录的录入元素先不理会) - /*if(!surgeonAllowBlank && StringUtils.isBlank(useRecord.getSurgeon())){ - throw new SystemException(String.format("%s%s", "主刀医生",messageContent)); - }*/ - //麻醉医生(pda不存在的使用记录的录入元素先不理会) - /*if(!anesthetistAllowBlank && StringUtils.isBlank(useRecord.getAnesthetist())){ - throw new SystemException(String.format("%s%s", "麻醉医生",messageContent)); - }*/ - //麻醉方式(pda不存在的使用记录的录入元素先不理会) - /*if(!anesthesiaModeAllowBlank && StringUtils.isBlank(useRecord.getAnesthesiaMode())){ - throw new SystemException(String.format("%s%s", "麻醉方式",messageContent)); - }*/ //手术名称 if(!operationNameAllowBlank && StringUtils.isBlank(useRecord.getOperation())){ throw new SystemException(String.format("%s%s", "手术名称",messageContent)); @@ -835,22 +817,81 @@ if(!operationScheduleIdAllowBlank && StringUtils.isBlank(useRecord.getOperationScheduleId())){ throw new SystemException(String.format("%s%s", "手术单号",messageContent)); } - //手术时间???(pda不存在的使用记录的录入元素先不理会) - /*if(!operationTimeAllowBlank && StringUtils.isBlank(useRecord.getOperationTimeStr())){ - throw new SystemException(String.format("%s%s", "手术时间",messageContent)); - }*/ - //住院次数(pda不存在的使用记录的录入元素先不理会) - /*if(!visitIdAllowBlank && !DatabaseUtil.isPoIdValid(useRecord.getVisitId())){ - throw new SystemException(String.format("%s%s", "住院次数",messageContent)); - }*/ - //特殊感染类型(pda不存在的使用记录的录入元素先不理会) - /*if(!specialInfectionAllowBlank && StringUtils.isBlank(useRecord.getSpecialInfection())){ - throw new SystemException(String.format("%s%s", "特殊感染类型",messageContent)); - }*/ - //备注(pda不存在的使用记录的录入元素先不理会) - /*if(!remarkAllowBlank && StringUtils.isBlank(useRecord.getRemark())){ - throw new SystemException(String.format("%s%s", "备注",messageContent)); - }*/ + //姓名(pda前端的必填项,此处先不理会) + if(!patientNameAllowBlank && StringUtils.isBlank(useRecord.getPatientName())){ + throw new SystemException(String.format("%s%s", "姓名",messageContent)); + } + //PC端才有的字段 + if(StringUtils.equals(clientType, CILENT_PC)){ + //手术时间???(pda不存在的使用记录的录入元素先不理会) + if(!operationTimeAllowBlank && StringUtils.isBlank(useRecord.getOperationTimeStr())){ + throw new SystemException(String.format("%s%s", "手术时间",messageContent)); + } + //住院次数(pda不存在的使用记录的录入元素先不理会) + if(!visitIdAllowBlank && !DatabaseUtil.isPoIdValid(useRecord.getVisitId())){ + throw new SystemException(String.format("%s%s", "住院次数",messageContent)); + } + //特殊感染类型(pda不存在的使用记录的录入元素先不理会) + if(!specialInfectionAllowBlank && StringUtils.isBlank(useRecord.getSpecialInfection())){ + throw new SystemException(String.format("%s%s", "特殊感染类型",messageContent)); + } + //备注(pda不存在的使用记录的录入元素先不理会) + if(!remarkAllowBlank && StringUtils.isBlank(useRecord.getRemark())){ + throw new SystemException(String.format("%s%s", "备注",messageContent)); + } + //住院号(pda不存在的使用记录的录入元素先不理会) + if(!hospitalNumAllowBlank && StringUtils.isBlank(useRecord.getHospitalNum())){ + throw new SystemException(String.format("%s%s", "住院号",messageContent)); + } + //诊疗号(pda前端的必填项,此处先不理会) + if(!treatmentNumAllowBlank && StringUtils.isBlank(useRecord.getTreatmentNum())){ + throw new SystemException(String.format("%s%s", "诊疗号",messageContent)); + } + //主刀医生(pda不存在的使用记录的录入元素先不理会) + if(!surgeonAllowBlank && StringUtils.isBlank(useRecord.getSurgeon())){ + throw new SystemException(String.format("%s%s", "主刀医生",messageContent)); + } + //麻醉医生(pda不存在的使用记录的录入元素先不理会) + if(!anesthetistAllowBlank && StringUtils.isBlank(useRecord.getAnesthetist())){ + throw new SystemException(String.format("%s%s", "麻醉医生",messageContent)); + } + //麻醉方式(pda不存在的使用记录的录入元素先不理会) + if(!anesthesiaModeAllowBlank && StringUtils.isBlank(useRecord.getAnesthesiaMode())){ + throw new SystemException(String.format("%s%s", "麻醉方式",messageContent)); + } + //性别(pda不存在的使用记录的录入元素先不理会) + if(!patientSexAllowBlank && StringUtils.isBlank(useRecord.getPatientSex())){ + throw new SystemException(String.format("%s%s", "性别",messageContent)); + } + //病区(pda不存在的使用记录的录入元素先不理会) + if(!patientAreaAllowBlank && StringUtils.isBlank(useRecord.getPatientArea())){ + throw new SystemException(String.format("%s%s", "病区",messageContent)); + } + //病人所在科室???(pda不存在的使用记录的录入元素先不理会) + if(!departNameOfpatientAllowBlank && StringUtils.isBlank(useRecord.getDepartCodeOfpatient())){ + throw new SystemException(String.format("%s%s", "病人所在科室",messageContent)); + } + //病室(pda不存在的使用记录的录入元素先不理会) + if(!roomNumberAllowBlank && StringUtils.isBlank(useRecord.getRoomNumber())){ + throw new SystemException(String.format("%s%s", "病室",messageContent)); + } + //床位(pda不存在的使用记录的录入元素先不理会) + if(!bedNumberAllowBlank && StringUtils.isBlank(useRecord.getBedNumber())){ + throw new SystemException(String.format("%s%s", "床位",messageContent)); + } + //患者ID + if(!patientIdAllowBlank && StringUtils.isBlank(useRecord.getPatientId())){ + throw new SystemException(String.format("%s%s", "姓名",messageContent)); + } + //主刀医生核算科室 + if(!doctorAccountDepartAllowBlank && StringUtils.isBlank(useRecord.getDoctorAccountDepart())){ + throw new SystemException(String.format("%s%s", "主刀医生核算科室",messageContent)); + } + //主刀医生核算科室编码 + if(!doctorAccountDepartCodeAllowBlank && StringUtils.isBlank(useRecord.getDoctorAccountDepartCode())){ + throw new SystemException(String.format("%s%s", "主刀医生核算科室编码",messageContent)); + } + } } } Index: ssts-userecord/src/main/java/com/forgon/disinfectsystem/useRecord/action/UseRecordAction.java =================================================================== diff -u -r36935 -r37557 --- ssts-userecord/src/main/java/com/forgon/disinfectsystem/useRecord/action/UseRecordAction.java (.../UseRecordAction.java) (revision 36935) +++ ssts-userecord/src/main/java/com/forgon/disinfectsystem/useRecord/action/UseRecordAction.java (.../UseRecordAction.java) (revision 37557) @@ -305,6 +305,7 @@ //setUseRecordItemsFromParams(modified, items, tousseInstanceMaterialErrorDamageItems); UseRecordUtil.setUseRecordItemsFromParams(modified, items, tousseInstanceMaterialErrorDamageItems, tousseInstanceManager,barcodeManager,objectDao,true,supplyRoomConfigManager); + UseRecordUtil.validateUseRecordMatchBlankRule(modified, UseRecordUtil.CILENT_PC); //是否来自干预管理 String useInterfere = StrutsParamUtils.getPraramValue("useInterfere", null); if (StringUtils.isBlank(useInterfere)){ @@ -321,6 +322,7 @@ //setUseRecordItemsFromParams(modified, items, tousseInstanceMaterialErrorDamageItems); UseRecordUtil.setUseRecordItemsFromParams(modified, items, tousseInstanceMaterialErrorDamageItems, tousseInstanceManager,barcodeManager,objectDao,true,supplyRoomConfigManager); + UseRecordUtil.validateUseRecordMatchBlankRule(modified, UseRecordUtil.CILENT_PC); useRecordManager.saveUseRecord_TRANS_REQUIRED(modified); } JSONUtil.addSuccess(json, true); @@ -646,6 +648,7 @@ //setUseRecordItemsFromParams(modified, items, tousseInstanceMaterialErrorDamageItems); UseRecordUtil.setUseRecordItemsFromParams(modified, items, tousseInstanceMaterialErrorDamageItems, tousseInstanceManager,barcodeManager,objectDao,true,supplyRoomConfigManager); + UseRecordUtil.validateUseRecordMatchBlankRule(modified, UseRecordUtil.CILENT_PC); useRecordManager .saveAndReviewAndConvertUseRecordForm_TRANS_REQUIRED( modified, operator, depart, departCoding, Index: ssts-webservice/src/main/java/com/forgon/disinfectsystem/webservice/service/ServiceManagerImpl.java =================================================================== diff -u -r37529 -r37557 --- ssts-webservice/src/main/java/com/forgon/disinfectsystem/webservice/service/ServiceManagerImpl.java (.../ServiceManagerImpl.java) (revision 37529) +++ ssts-webservice/src/main/java/com/forgon/disinfectsystem/webservice/service/ServiceManagerImpl.java (.../ServiceManagerImpl.java) (revision 37557) @@ -2040,7 +2040,7 @@ modified.setOperationTime(ForgonDateUtils.safelyParseDate(operationTimeStr)); } //校验使用记录的各个属性是否匹配空值的规则(SZSDSRMYY-62) - UseRecordUtil.validateUseRecordMatchBlankRule(modified); + UseRecordUtil.validateUseRecordMatchBlankRule(modified, UseRecordUtil.CILENT_PDA); //修改使用记录 if(DatabaseUtil.isPoIdValid(modified.getId())){ //修改前的使用记录 @@ -2122,7 +2122,7 @@ try{ UseRecord modified = UseRecordUtil.buildUseRecordParamsForUpdate(params.optString("formParams", "") ,null , null , tousseInstanceManager,barcodeManager,objectDao,supplyRoomConfigManager); //校验使用记录的各个属性是否匹配空值的规则(SZSDSRMYY-62) - UseRecordUtil.validateUseRecordMatchBlankRule(modified); + UseRecordUtil.validateUseRecordMatchBlankRule(modified, UseRecordUtil.CILENT_PDA); useRecordManager.saveAndReviewAndConvertUseRecordFromPda(params); JSONUtil.addSuccess(result, true); }catch(SystemException e){ Index: ssts-userecord/src/main/java/com/forgon/disinfectsystem/useRecord/action/ButtJointUseRecordAction.java =================================================================== diff -u -r37488 -r37557 --- ssts-userecord/src/main/java/com/forgon/disinfectsystem/useRecord/action/ButtJointUseRecordAction.java (.../ButtJointUseRecordAction.java) (revision 37488) +++ ssts-userecord/src/main/java/com/forgon/disinfectsystem/useRecord/action/ButtJointUseRecordAction.java (.../ButtJointUseRecordAction.java) (revision 37557) @@ -253,6 +253,7 @@ //器械包实例登记使用记录所录入的丢失报损数据 String tousseInstanceMaterialErrorDamageItems = StrutsParamUtils.getPraramValue("tousseInstanceMaterialErrorDamageItems", null); UseRecordUtil.setUseRecordItemsFromParams(modified, items, tousseInstanceMaterialErrorDamageItems,tousseInstanceManager,barcodeManager,objectDao,true,supplyRoomConfigManager); + UseRecordUtil.validateUseRecordMatchBlankRule(modified, UseRecordUtil.CILENT_PC); modified.setDepartCoding(departCoding); modified.setDepart(orgUnit.getName()); modified.setOperator(operator.getFullName()); @@ -305,6 +306,7 @@ //器械包实例登记使用记录所录入的丢失报损数据 String tousseInstanceMaterialErrorDamageItems = StrutsParamUtils.getPraramValue("tousseInstanceMaterialErrorDamageItems", null); UseRecordUtil.setUseRecordItemsFromParams(modified, items, tousseInstanceMaterialErrorDamageItems,tousseInstanceManager,barcodeManager,objectDao,true,supplyRoomConfigManager); + UseRecordUtil.validateUseRecordMatchBlankRule(modified, UseRecordUtil.CILENT_PC); useRecordManager .saveAndReviewAndConvertUseRecordForm_TRANS_REQUIRED( modified, null, null, null,