Explorar o código

出院记录内容缺主诉(出院小结)更新

kongwz %!s(int64=5) %!d(string=hai) anos
pai
achega
6641fbc6ba

+ 10 - 9
kernel/src/main/java/com/lantone/qc/kernel/catalogue/leavehospital/LEA0149.java

@@ -11,6 +11,7 @@ import com.lantone.qc.pub.util.StringUtil;
 import org.springframework.stereotype.Component;
 
 import java.util.List;
+import java.util.Map;
 
 /**
  * @Description: 出院记录内容缺主诉
@@ -22,16 +23,16 @@ public class LEA0149 extends QCCatalogue {
 
     @Override
     public void start(InputInfo inputInfo, OutputInfo outputInfo) {
-        LeaveHospitalLabel leaveHospitalLabel = inputInfo.getLeaveHospitalDoc().getLeaveHospitalLabel();
-        if (leaveHospitalLabel != null) {
-            List<Chief> chiefs = leaveHospitalLabel.getChiefs();
-            if (ListUtil.isNotEmpty(chiefs)) {
-                long count = chiefs.stream().filter(i -> i != null && StringUtil.isNotBlank(i.getName())).count();
-                if (count > 0) {
-                    status.set("0");
-                }
+        status.set("0");
+        try {
+            Map<String, String> lhStructureMap = inputInfo.getLeaveHospitalDoc().getStructureMap();
+            String bhChief = inputInfo.getBeHospitalizedDoc().getChiefLabel().getText();
+            String bhThings = lhStructureMap.get("入院情况");
+            if(bhThings.indexOf(bhChief)<0){
+                status.set("-1");
             }
+        }catch (Exception e){
+            e.printStackTrace();
         }
     }
-
 }