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

杭州七院:食物过敏史未描述更新

wangsy пре 4 година
родитељ
комит
84f454e0e1

+ 14 - 1
kernel/src/main/java/com/lantone/qc/kernel/catalogue/hangzhoudiqi/behospitalized/BEH0026.java

@@ -4,6 +4,7 @@ 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.entity.Allergy;
+import com.lantone.qc.pub.model.entity.AllergyFood;
 import com.lantone.qc.pub.model.label.PastLabel;
 import com.lantone.qc.pub.util.ListUtil;
 import com.lantone.qc.pub.util.StringUtil;
@@ -39,7 +40,7 @@ public class BEH0026 extends QCCatalogue {
             return;
         }
         String pastText = pastLabel.getText();
-        if (pastText.contains("食物过敏") || pastText.contains("详见原病历") || pastText.contains("食物、药物过敏")) {
+        if (pastText.contains("食物过敏") || pastText.contains("详见原病历") || pastText.contains("芒果过敏") || pastText.contains("食物、药物过敏")) {
             status.set("0");
             return;
         }
@@ -51,6 +52,18 @@ public class BEH0026 extends QCCatalogue {
                     //                            && i.getAllergyFood() != null
                     //                            && StringUtil.isNotBlank(i.getAllergyFood().getName())
             ).count();
+            if (count > 0) {
+                status.set("0");
+                return;
+            }
+        }
+
+        List<AllergyFood> allergyFoods = pastLabel.getAllergyFoods();
+        if (ListUtil.isNotEmpty(allergyFoods)) {
+            long count = allergyFoods.stream().filter(
+                    i -> i != null
+                            && StringUtil.isNotBlank(i.getName())
+            ).count();
             if (count > 0) {
                 status.set("0");
             }