Bläddra i källkod

病案首页质控规则新增

wangsy 3 år sedan
förälder
incheckning
5802181495

+ 1 - 1
kernel/src/main/java/com/lantone/qc/kernel/catalogue/firstpagerecord/FIRP0251.java

@@ -10,7 +10,7 @@ import org.springframework.stereotype.Component;
 import java.util.Map;
 
 /**
- * @ClassName : FIRP0253
+ * @ClassName : FIRP0251
  * @Description : 单病种管理未填
  * @Author : 楼辉荣
  * @Date: 2020-03-06 17:28ss

+ 45 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/firstpagerecord/FIRP03179.java

@@ -0,0 +1,45 @@
+package com.lantone.qc.kernel.catalogue.firstpagerecord;
+
+import com.lantone.qc.kernel.catalogue.QCCatalogue;
+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.util.StringUtil;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @ClassName : FIRP03179
+ * @Description :出院主要诊断疾病编码未填写
+ * @Author : wsy
+ * @Date: 2020-03-16 13:31
+ */
+@Component
+public class FIRP03179 extends QCCatalogue {
+    public void start(InputInfo inputInfo, OutputInfo outputInfo) {
+        status.set("0");
+        if (inputInfo.getFirstPageRecordDoc() != null && inputInfo.getFirstPageRecordDoc().getStructureExtMap() != null) {
+            Map<String, Object> firstpageStructureMap = inputInfo.getFirstPageRecordDoc().getStructureExtMap();
+            List<Map<String, String>> outpatientEmergencyDiag = (List) firstpageStructureMap.get(Content.dischargeDiag);
+            if (outpatientEmergencyDiag == null || outpatientEmergencyDiag.size() == 0) {
+                return;
+            }
+
+            long count = outpatientEmergencyDiag.stream().filter(diag -> {
+                boolean flag = false;
+                if (StringUtil.isNotBlank(diag.get("诊断类别"))
+                        && diag.get("诊断类别").contains("主要诊断")
+                        && StringUtil.isBlank(diag.get("诊断编码"))) {
+                    flag = true;
+                }
+                return flag;
+            }).count();
+
+            if (count > 0) {
+                status.set("-1");
+            }
+        }
+    }
+}

+ 78 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/firstpagerecord/FIRP03186.java

@@ -0,0 +1,78 @@
+package com.lantone.qc.kernel.catalogue.firstpagerecord;
+
+import com.google.common.collect.Lists;
+import com.lantone.qc.kernel.catalogue.QCCatalogue;
+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.FirstPageRecordDoc;
+import com.lantone.qc.pub.util.StringUtil;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @ClassName : FIRP03186
+ * @Description :  出院主要诊断疾病编码填写错误
+ * @Author : wsy
+ * @Date: 2021-10-9 15:51
+ */
+@Component
+public class FIRP03186 extends QCCatalogue {
+    @Override
+    public void start(InputInfo inputInfo, OutputInfo outputInfo) {
+        status.set("0");
+        FirstPageRecordDoc firstPageRecordDoc = inputInfo.getFirstPageRecordDoc();
+        if (firstPageRecordDoc == null) {
+            return;
+        }
+        Map<String, Object> structureExtMap = firstPageRecordDoc.getStructureExtMap();
+        if (structureExtMap == null) {
+            return;
+        }
+        String icdCode = "";
+        List<Map<String, String>> outpatientEmergencyDiag = (List) structureExtMap.get(Content.dischargeDiag);
+        if (outpatientEmergencyDiag == null || outpatientEmergencyDiag.size() == 0) {
+            return;
+        }
+
+        for (Map<String, String> map : outpatientEmergencyDiag) {
+            if (StringUtil.isNotBlank(map.get("诊断类别")) && map.get("诊断类别").contains("主要诊断")) {
+                icdCode = map.get("诊断编码");
+            }
+        }
+
+        if(StringUtil.isBlank(icdCode)){
+            return;
+        }
+
+        String gender = (String) structureExtMap.get("性别");
+        if (StringUtil.isBlank(gender)) {
+            return;
+        }
+        List<String> noMatchWords = null;
+        if (gender.contains("男")) {
+            /* 男性不合理词 */
+            noMatchWords = Lists.newArrayList("A34", "B37.3", "C51", "C52", "C53", "C54", "C55", "C56", "C57", "C58", "C79.6", "D06", "D07.0", "D07.1", "D07.2", "D07.3",
+                    "D25", "D26", "D27", "D28", "D39", "E28", "E89.4", "F52.5", "F53", "I86.3", "L29.2", "M80.0", "M80.1", "M81.0", "M81.1", "M83.0", "N70", "N71", "N72", "N73",
+                    "N74", "N75", "N76", "N77", "N78-N98", "N99.2", "N99.3", "O00-O99", "P54.6", "Q50", "Q51", "Q52", "R87", "S31.4", "S37.4", "S37.5", "S37.6", "T19.2", "T19.3",
+                    "T83.3", "Z01.4", "Z12.4", "Z30.1", "Z30.3", "Z30.5", "Z31.1", "Z31.2", "Z32", "Z33", "Z34", "Z35", "Z36", "Z37", "Z39", "Z87.5", "Z97.5");
+        } else if (gender.contains("女")) {
+            /* 女性不合理词 */
+            noMatchWords = Lists.newArrayList("B26.0", "C60-C63", "D07.4-D07.6", "D17.6", "D29", "D40", "E29", "E89.5", "F52.4", "I86.1", "L29.1",
+                    "N40-N51", "Q53-Q55", "R86", "S31.2-S31.3", "Z12.5");
+        }
+        if (noMatchWords == null || noMatchWords.size() == 0) {
+            return;
+        }
+
+        for (String noMatchWord : noMatchWords) {
+            if (icdCode.contains(noMatchWord)) {
+                status.set("-1");
+                info.set(noMatchWord);
+                return;
+            }
+        }
+    }
+}

+ 10 - 10
trans/src/main/java/com/lantone/qc/trans/beilun/BeiLunThreeLevelWardDocTrans.java

@@ -239,11 +239,11 @@ public class BeiLunThreeLevelWardDocTrans extends ModelDocTrans {
      * @return
      */
     private boolean findDirector(String content) {
-        String director = "";
-        if (content.indexOf(",") != -1) {
-            director = content.substring(0, content.indexOf(","));
-        }
-        return director.contains("主任");
+//        String director = "";
+//        if (content.indexOf(",") != -1) {
+//            director = content.substring(0, content.indexOf(","));
+//        }
+        return content.contains("主任");
     }
 
     /**
@@ -253,11 +253,11 @@ public class BeiLunThreeLevelWardDocTrans extends ModelDocTrans {
      * @return
      */
     private boolean findAttend(String content) {
-        String director = "";
-        if (content.indexOf(",") != -1) {
-            director = content.substring(0, content.indexOf(","));
-        }
-        return director.contains("主治");
+//        String director = "";
+//        if (content.indexOf(",") != -1) {
+//            director = content.substring(0, content.indexOf(","));
+//        }
+        return content.contains("主治");
     }
 
     private String subTitle(String srcText) {