Преглед изворни кода

Merge branch 'shaoyf/dev-wsy' into shaoyf/dev

wangsy пре 4 година
родитељ
комит
3de4ce7f45

+ 19 - 1
kernel/src/main/java/com/lantone/qc/kernel/catalogue/behospitalized/BEH0011.java

@@ -54,8 +54,14 @@ public class BEH0011 extends QCCatalogue {
             status.set("0");
             return;
         }
+        //现病史
         PresentLabel presentLabel = inputInfo.getBeHospitalizedDoc().getPresentLabel();
+        //初步诊断
         DiagLabel initialDiagLabel = inputInfo.getBeHospitalizedDoc().getInitialDiagLabel();
+        //修正诊断
+        DiagLabel revisedDiagLabel = inputInfo.getBeHospitalizedDoc().getRevisedDiagLabel();
+        //补充诊断
+        DiagLabel suppleDiagLabel = inputInfo.getBeHospitalizedDoc().getSuppleDiagLabel();
         PastLabel pastLabel = inputInfo.getBeHospitalizedDoc().getPastLabel();
         PacsLabel pacsLabel = inputInfo.getBeHospitalizedDoc().getPacsLabel();
         if (initialDiagLabel == null) {
@@ -129,12 +135,23 @@ public class BEH0011 extends QCCatalogue {
             }
         }
 
-
         /* 取初步诊断中疾病名称 */
         List<String> initDiags = new ArrayList<>();
         List<Diag> initialDiagDiags = initialDiagLabel.getDiags();
         addInitDiagHospitalName(initDiags, initialDiagDiags);
 
+        /* 取修正诊断中疾病名称 */
+        List<Diag> revisedDiagDiags = revisedDiagLabel.getDiags();
+        addInitDiagHospitalName(initDiags, revisedDiagDiags);
+
+        /* 取补充诊断中疾病名称 */
+        List<Diag> suppleDiagDiags = suppleDiagLabel.getDiags();
+        addInitDiagHospitalName(initDiags, suppleDiagDiags);
+
+        if (initDiags.size() > 0) {
+            initDiags = initDiags.stream().distinct().collect(Collectors.toList());
+        }
+
         String infoStr = "";
         /*先两两对比,能对上就删除,对不上的再走相似度模型*/
         Iterator<String> iterator = presentPastDiags.iterator();
@@ -143,6 +160,7 @@ public class BEH0011 extends QCCatalogue {
             for (String initDiag : initDiags) {
                 if (presentPastDiag.equals(initDiag) || presentPastDiag.contains(initDiag) || initDiag.contains(presentPastDiag)) {
                     iterator.remove();
+                    break;
                 }
             }
         }

+ 8 - 4
kernel/src/main/java/com/lantone/qc/kernel/catalogue/behospitalized/BEH0013.java

@@ -3,7 +3,9 @@ package com.lantone.qc.kernel.catalogue.behospitalized;
 import com.lantone.qc.kernel.catalogue.QCCatalogue;
 import com.lantone.qc.pub.model.InputInfo;
 import com.lantone.qc.pub.model.OutputInfo;
+import com.lantone.qc.pub.model.doc.BeHospitalizedDoc;
 import com.lantone.qc.pub.model.entity.Clinical;
+import com.lantone.qc.pub.model.label.PastLabel;
 import com.lantone.qc.pub.model.label.PresentLabel;
 import com.lantone.qc.pub.util.StringUtil;
 import org.springframework.stereotype.Component;
@@ -25,8 +27,12 @@ public class BEH0013 extends QCCatalogue {
         if (inputInfo.getBeHospitalizedDoc() == null) {
             return;
         }
-        PresentLabel presentLabel = inputInfo.getBeHospitalizedDoc().getPresentLabel();
-        if (presentLabel == null) {
+        BeHospitalizedDoc beHospitalizedDoc = inputInfo.getBeHospitalizedDoc();
+        //现病史
+        PresentLabel presentLabel = beHospitalizedDoc.getPresentLabel();
+        //既往史
+        PastLabel pastLabel = beHospitalizedDoc.getPastLabel();
+        if ((presentLabel == null || StringUtil.isBlank(presentLabel.getText())) && StringUtil.isBlank(pastLabel.getText())) {
             return;
         }
         String text = presentLabel.getText();
@@ -34,8 +40,6 @@ public class BEH0013 extends QCCatalogue {
             if ((text.contains("无") || text.contains("否认")) && !text.contains("诱因")) {
                 return;
             }
-        } else {
-            return;
         }
         List<Clinical> clinicalNegative = new ArrayList<>();
         List<Clinical> clinicals = presentLabel.getClinicals();

+ 6 - 1
kernel/src/main/java/com/lantone/qc/kernel/catalogue/behospitalized/BEH0014.java

@@ -3,9 +3,11 @@ package com.lantone.qc.kernel.catalogue.behospitalized;
 import com.lantone.qc.kernel.catalogue.QCCatalogue;
 import com.lantone.qc.pub.model.InputInfo;
 import com.lantone.qc.pub.model.OutputInfo;
+import com.lantone.qc.pub.model.doc.BeHospitalizedDoc;
 import com.lantone.qc.pub.model.entity.Cause;
 import com.lantone.qc.pub.model.entity.Clinical;
 import com.lantone.qc.pub.model.entity.Diag;
+import com.lantone.qc.pub.model.label.PastLabel;
 import com.lantone.qc.pub.model.label.PresentLabel;
 import com.lantone.qc.pub.util.ListUtil;
 import com.lantone.qc.pub.util.StringUtil;
@@ -32,6 +34,7 @@ public class BEH0014 extends QCCatalogue {
             status.set("0");
             return;
         }
+        BeHospitalizedDoc beHospitalizedDoc = inputInfo.getBeHospitalizedDoc();
         /*List<Clinical> clinicals = inputInfo.getBeHospitalizedDoc().getPresentLabel().getClinicals();
         if(clinicals.size()>0){
             Clinical clinical = clinicals.get(0);
@@ -44,7 +47,9 @@ public class BEH0014 extends QCCatalogue {
             }
         }*/
         PresentLabel presentLabel = inputInfo.getBeHospitalizedDoc().getPresentLabel();
-        if (presentLabel == null || StringUtil.isBlank(presentLabel.getText())) {
+        //既往史
+        PastLabel pastLabel = beHospitalizedDoc.getPastLabel();
+        if ((presentLabel == null || StringUtil.isBlank(presentLabel.getText())) && StringUtil.isBlank(pastLabel.getText())) {
             status.set("0");
             return;
         }

+ 1 - 2
kernel/src/main/java/com/lantone/qc/kernel/catalogue/behospitalized/BEH02988.java

@@ -31,8 +31,7 @@ public class BEH02988 extends QCCatalogue {
         if (beHospitalizedDoc == null) {
             return;
         }
-        if (StringUtil.isBlank(chiefLabel.getText()) && StringUtil.isNotBlank(presentLabel.getText()) ||
-                StringUtil.isNotBlank(pastLabel.getText())) {
+        if (StringUtil.isBlank(chiefLabel.getText()) && (StringUtil.isNotBlank(presentLabel.getText()) || StringUtil.isNotBlank(pastLabel.getText()))) {
             status.set("-1");
             return;
         }