Browse Source

长兴规则逻辑修改:
1.主诉症状缺少时间描述
2.转归情况填写错误

wangyu 4 years ago
parent
commit
f8b7dc1f45

+ 14 - 13
kernel/src/main/java/com/lantone/qc/kernel/catalogue/behospitalized/BEH0006.java

@@ -23,7 +23,6 @@ import java.util.List;
 @Component
 public class BEH0006 extends QCCatalogue {
     public void start(InputInfo inputInfo, OutputInfo outputInfo) {
-        status.set("0");
         if (inputInfo.getBeHospitalizedDoc() == null) {
             status.set("0");
             return;
@@ -36,21 +35,23 @@ public class BEH0006 extends QCCatalogue {
         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 (StringUtil.isNotBlank(pd.getName()) &&
-                            pd.getName().contains("年") && !"半年".equals(pd.getName())) {
-                        flag = false;
-                        break;
+        if(ListUtil.isNotEmpty(clinicalList)){
+            for (Clinical c : clinicalList) {
+                List<PD> pds = c.getTimestamp();
+                if (ListUtil.isNotEmpty(pds)) {
+                    for (PD pd : pds) {
+                        if (StringUtil.isNotBlank(pd.getName()) &&
+                                pd.getName().contains("年") && !"半年".equals(pd.getName())) {
+                            flag = false;
+                            break;
+                        }
                     }
                 }
             }
-        }
-        if (flag) {
-            status.set("0");
-            return;
+            if (flag) {
+                status.set("0");
+                return;
+            }
         }
         String chiefText = chiefLabel.getText();
         if (StringUtil.isNotBlank(chiefText) && chiefText.contains("半年")) {

+ 13 - 2
kernel/src/main/java/com/lantone/qc/kernel/catalogue/firstpagerecord/FIRP0256.java

@@ -5,6 +5,7 @@ import com.lantone.qc.kernel.util.CatalogueUtil;
 import com.lantone.qc.pub.Content;
 import com.lantone.qc.pub.model.InputInfo;
 import com.lantone.qc.pub.model.OutputInfo;
+import com.lantone.qc.pub.model.doc.DoctorAdviceDoc;
 import com.lantone.qc.pub.util.ListUtil;
 import com.lantone.qc.pub.util.StringUtil;
 import org.springframework.stereotype.Component;
@@ -33,10 +34,20 @@ public class FIRP0256 extends QCCatalogue {
                 return;
             }
             //若出现死亡记录或死亡医嘱,则 转归情况 必须为 死亡。若未出现死亡记录或死亡医嘱,则 转归情况 必不为 死亡。
-            if (inputInfo.getDeathRecordDoc() != null && !"死亡".equals(outcome)
-                    || inputInfo.getDeathRecordDoc() == null && "死亡".equals(outcome)) {
+            if (inputInfo.getDeathRecordDoc() != null && !"死亡".equals(outcome)) {
                 status.set("-1");
                 return;
+            }else if(inputInfo.getDeathRecordDoc() == null){
+                boolean res = false;
+                for (DoctorAdviceDoc doctorAdviceDoc : inputInfo.getDoctorAdviceDocs()) {
+                    if(doctorAdviceDoc.getStructureMap().get("医嘱项目名称").contains("死亡")){
+                        res = true;
+                    }
+                }
+                if(res && !"死亡".equals(outcome)){
+                    status.set("-1");
+                    return;
+                }
             }
             Map<String, Object> firstpageStructureMapExt = inputInfo.getFirstPageRecordDoc().getStructureExtMap();
             List<Map<String, String>> dischargeDiag = (List) firstpageStructureMapExt.get(Content.dischargeDiag);