ソースを参照

1.出院记录无执业医师签名修改逻辑

hujing 5 年 前
コミット
eb6eb175c2

+ 17 - 3
kernel/src/main/java/com/lantone/qc/kernel/catalogue/leavehospital/LEA0508.java

@@ -1,6 +1,9 @@
 package com.lantone.qc.kernel.catalogue.leavehospital;
 
 import com.lantone.qc.kernel.catalogue.QCCatalogue;
+import com.lantone.qc.kernel.util.KernelConstants;
+import com.lantone.qc.kernel.util.RedisUtil;
+import com.lantone.qc.kernel.util.SpringContextUtil;
 import com.lantone.qc.pub.model.InputInfo;
 import com.lantone.qc.pub.model.OutputInfo;
 import com.lantone.qc.pub.model.doc.LeaveHospitalDoc;
@@ -12,7 +15,7 @@ import java.util.Map;
 
 /**
  * @author kwz
- * 出院记录无副主任/主任医师签名
+ * 出院记录无执业医师签名
  * @date 2020/4/7
  * @time 21:42
  */
@@ -27,8 +30,19 @@ public class LEA0508 extends QCCatalogue {
         }
         Map<String, String> structureMap = leaveHospitalDoc.getStructureMap();
         if (structureMap != null) {
-            if (StringUtils.isEmpty(structureMap.get("医师签名"))) {
-                status.set("-1");
+            String doctorName = structureMap.get("医师签名");
+            if (StringUtils.isEmpty(doctorName)) {
+                return;
+            }
+            RedisUtil redisUtil = SpringContextUtil.getBean("redisUtil");
+            Map<String, Object> surgeon = redisUtil.getJsonStringValue(KernelConstants.HOSPITAL_DOCTOR_MAP);
+            if (surgeon == null) {
+                return;
+            }
+            Map<String, String> doctor = (Map) surgeon.get(doctorName);
+            String occup = doctor.get("occup");
+            if (StringUtils.isNotEmpty(occup) && "1".equals(occup)) {
+                status.set("0");
             }
         }
     }