瀏覽代碼

修改bug

zhoutg 5 年之前
父節點
當前提交
fc385a579e
共有 1 個文件被更改,包括 24 次插入0 次删除
  1. 24 0
      kernel/src/main/java/com/lantone/qc/kernel/catalogue/behospitalized/BEH0018.java

+ 24 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/behospitalized/BEH0018.java

@@ -3,8 +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.entity.Clinical;
 import com.lantone.qc.pub.model.entity.PD;
+import com.lantone.qc.pub.model.label.ChiefLabel;
 import com.lantone.qc.pub.model.label.PresentLabel;
+import com.lantone.qc.pub.util.ListUtil;
 import com.lantone.qc.pub.util.StringUtil;
 import org.springframework.stereotype.Component;
 
@@ -24,6 +27,27 @@ public class BEH0018 extends QCCatalogue {
             status.set("0");
             return;
         }
+        ChiefLabel chiefLabel = inputInfo.getBeHospitalizedDoc().getChiefLabel();
+        if (chiefLabel != null && ListUtil.isNotEmpty(chiefLabel.getClinicals())) {
+            List<Clinical> clinicalList = chiefLabel.getClinicals();
+            boolean flag = true;
+            // 主诉症状不超过1年就不报错,单位不包含“年”
+            for (Clinical c : clinicalList) {
+                List<PD> pds = c.getTimestamp();
+                if (ListUtil.isNotEmpty(pds)) {
+                    for (PD pd : pds) {
+                        if ("年".equals(pd.getUnit()) && !"半年".equals(pd.getName())) {
+                            flag = false;
+                            break;
+                        }
+                    }
+                }
+            }
+            if (flag) {
+                status.set("0");
+                return;
+            }
+        }
         PresentLabel presentLabel = inputInfo.getBeHospitalizedDoc().getPresentLabel();
         List<PD> pds = presentLabel.getPds();
         if (pds != null && pds.size() > 0) {