Browse Source

湘雅:上级医师(副主任医师/主任医师)首次查房无诊疗计划 && 上级医师(主治医师)首次查房无诊疗计划 &&主诉症状缺少近期时间描述 && 手术史未填写

zhanghang 3 năm trước cách đây
mục cha
commit
ff88593ea1

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

@@ -61,7 +61,7 @@ public class BEH0025 extends QCCatalogue {
         }
         //规则硬匹配
         String pastLabelText = pastLabel.getText();
-        if (pastLabelText.contains("手术") || pastLabelText.contains("详见")
+        if (pastLabelText.contains("手术") || pastLabelText.contains("详见")|| pastLabelText.contains("术史")
                 || pastLabelText.contains("见旧病历") || pastLabelText.contains("见既往病历")|| pastLabelText.contains("体外碎石")) {
             status.set("0");
         }

+ 129 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/changshaxy/behospitalized/BEH0006.java

@@ -0,0 +1,129 @@
+package com.lantone.qc.kernel.catalogue.hospital.changshaxy.behospitalized;
+
+import com.lantone.qc.kernel.catalogue.QCCatalogue;
+import com.lantone.qc.kernel.util.CatalogueUtil;
+import com.lantone.qc.pub.model.InputInfo;
+import com.lantone.qc.pub.model.OutputInfo;
+import com.lantone.qc.pub.model.entity.PD;
+import com.lantone.qc.pub.model.label.ChiefLabel;
+import com.lantone.qc.pub.util.StringUtil;
+import org.springframework.stereotype.Component;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+
+
+/**
+ * @ClassName : BEH0006
+ * @Description :主诉症状缺少近期时间描述
+ * @Author : 楼辉荣
+ * @Date: 2020-03-06 17:28
+ */
+@Component
+public class BEH0006 extends QCCatalogue {
+    private List<String> containList = Arrays.asList("半年", "术后");
+    private List<String> containTList = Arrays.asList("近期", "最近","近来");
+
+    public void start(InputInfo inputInfo, OutputInfo outputInfo) {
+        if (outputInfo != null && outputInfo.getResult() != null) {
+            Map<String, Object> outputMap = outputInfo.getResult().get("BEH0009");
+            if (outputMap != null && "-1".equals(outputMap.get("status"))) {
+                status.set("0");
+                return;
+            }
+        }
+        if (inputInfo.getBeHospitalizedDoc() == null) {
+            status.set("0");
+            return;
+        }
+        ChiefLabel chiefLabel = inputInfo.getBeHospitalizedDoc().getChiefLabel();
+        if (chiefLabel == null || StringUtil.isBlank(chiefLabel.getText())) {
+            status.set("0");
+            return;
+        }
+//        List<Clinical> clinicalList = chiefLabel.getClinicals();
+//        boolean flag = true;
+//        // 主诉症状不超过1年就不报错,单位不包含“年”
+//        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;
+//            }
+//        }
+        String chiefText = chiefLabel.getText();
+        if (StringUtil.isNotBlank(chiefText)) {
+            for (String fild : containList) {
+                if (chiefText.contains(fild)) {
+                    status.set("0");
+                    return;
+                }
+            }
+            List<PD> pds = chiefLabel.getPds();
+            if (pds != null && pds.size() > 0) {
+                if (pds.size() == 2) {
+                    status.set("0");
+                    return;
+                }
+                for (PD pd : pds) {
+                    String pdName = pd.getName();
+                    if (!CatalogueUtil.isEmpty(pdName)) {
+                        if (pdName.contains("天") || pdName.contains("周") || pdName.contains("月")
+                                || pdName.contains("时") || pdName.contains("半年") || pdName.contains("秒")
+                                || pdName.contains("分") || pdName.contains("日") || pdName.contains("今")
+                                || pdName.contains("1年") || pdName.contains("一年")) {
+                            status.set("0");
+                            break;
+                        }
+                    }
+                }
+            } else {
+                if (StringUtil.isNotBlank(chiefLabel.getText())) {
+                    status.set("0");
+                    return;
+                }
+            }
+            for (String fild : containTList) {
+                if (chiefText.contains(fild)) {
+                    status.set("0");
+                    return;
+                }
+            }
+        }
+            /*List<Clinical> clinicals = chiefLabel.getClinicals();
+            if(clinicals.size()>0){
+                for (Clinical clinical:clinicals) {
+                    List<PD> timestamp = clinical.getTimestamp();
+                    if(timestamp != null){
+                        for (PD pd:timestamp) {
+                            if(!CatalogueUtil.isEmpty(pd.getName())){
+                                if(pd.getName().contains("天") || pd.getName().contains("周")|| pd.getName().contains("月")
+                                        || pd.getName().contains("时") || pd.getName().contains("半年") || pd.getName().contains("秒")
+                                        || pd.getName().contains("日")|| pd.getName().contains("今")){
+                                    status.set("0");
+                                    break;
+                                }
+                            }
+                        }
+                        if(status.get().equals("0")){
+                            break;
+                        }
+                    }
+                }
+            }else {
+                status.set("0");
+            }*/
+    }
+}

+ 6 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/threelevelward/THR0133.java

@@ -48,6 +48,12 @@ public class THR0133 extends QCCatalogue {
             status.set("0");
             return;
         }
+        //硬匹配规则
+        if(StringUtil.isNotBlank(firstAttendStructureMap.get("病情记录"))&& (firstAttendStructureMap.get("病情记录").contains("治疗措施")
+                ||firstAttendStructureMap.get("病情记录").contains("诊疗计划")|| firstAttendStructureMap.get("病情记录").contains("诊疗措施"))){
+            status.set("0");
+            return;
+        }
         ThreeLevelWardLabel firstAttendLabel = firstAttendDoc.getThreeLevelWardLabel();
         if (firstAttendLabel == null) {
             return;

+ 6 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/threelevelward/THR0138.java

@@ -48,6 +48,12 @@ public class THR0138 extends QCCatalogue {
             status.set("0");
             return;
         }
+        //硬匹配规则
+        if(StringUtil.isNotBlank(firstDirectStructureMap.get("病情记录"))&& (firstDirectStructureMap.get("病情记录").contains("治疗措施")
+        ||firstDirectStructureMap.get("病情记录").contains("诊疗计划")|| firstDirectStructureMap.get("病情记录").contains("诊疗措施"))){
+            status.set("0");
+            return;
+        }
         ThreeLevelWardLabel firstDirectLabel = firstDirectDoc.getThreeLevelWardLabel();
         if (firstDirectLabel == null) {
             return;