瀏覽代碼

21版新增规则修改,16条规则医嘱筛选条件修改

zhanghang 3 年之前
父節點
當前提交
a065fc2a27

+ 8 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/deathrecord/DEAR03145.java

@@ -33,9 +33,17 @@ public class DEAR03145 extends QCCatalogue {
         }
         Map<String, String> deathRecordStructure = inputInfo.getDeathRecordDoc().getStructureMap();
         String recordDoctor = deathRecordStructure.get("审核人");
+        String recordsPhysicians = deathRecordStructure.get("记录医师");
         if (StringUtil.isNotBlank(recordDoctor)) {
             if (findDirectorDoctor(recordDoctor)) {
                 status.set("0");
+                return;
+            }
+        }
+        if (StringUtil.isNotBlank(recordsPhysicians)) {
+            if (findDirectorDoctor(recordsPhysicians)) {
+                status.set("0");
+                return;
             }
         }
     }

+ 2 - 1
kernel/src/main/java/com/lantone/qc/kernel/catalogue/invasiveoperation/INVA03153.java

@@ -85,12 +85,13 @@ public class INVA03153 extends QCCatalogue {
     public  boolean judgeAngiographic(String medicalOrderName,String prescriptionType) {
         String rex = "[\\s\\S]*(?=拟)[\\s\\S]*(?=术)[\\s\\S]*";
         String rex1 = "[\\s\\S]*(?=定于)[\\s\\S]*(?=行)[\\s\\S]*";
+        String rex2 = "[\\s\\S]*(?=拟)[\\s\\S]*(?=行)[\\s\\S]*";
         if(StringUtil.isNotEmpty(prescriptionType)) {
             if (prescriptionType.equals("手术")) {
                 return true;
             }
         }
-        if(medicalOrderName.matches(rex)||medicalOrderName.matches(rex1)){
+        if(medicalOrderName.matches(rex)||medicalOrderName.matches(rex1)||medicalOrderName.matches(rex2)){
             return true;
         }
         return false;

+ 5 - 6
kernel/src/main/java/com/lantone/qc/kernel/catalogue/invasiveoperation/INVA03167.java

@@ -25,15 +25,14 @@ public class INVA03167 extends QCCatalogue {
                 return;
         }
         for (InvasiveOperationDoc invasiveOperationDoc : invasiveOperationDocs) {
-            String adverseReactions = invasiveOperationDoc.getStructureMap().get("有无记录不良反应");
+            String adverseReactions = invasiveOperationDoc.getStructureMap().get("一般情况");
             if(StringUtil.isBlank(adverseReactions)){
                 status.set("-1");
                 return;
-            }else {
-                if(adverseReactions.equals("false")){
-                    status.set("-1");
-                    return;
-                }
+            }
+            if(!adverseReactions.contains("有")&&!adverseReactions.contains("无")){
+                status.set("-1");
+                return;
             }
         }
     }

+ 4 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/operationdiscussion/OPE03111.java

@@ -77,6 +77,10 @@ public class OPE03111 extends QCCatalogue {
                 }
             }
         }
+        List<PathologyShipDoc> pathologyShipDocs = inputInfo.getPathologyShipDocs();
+        if(ListUtil.isNotEmpty(pathologyShipDocs)){
+            blHz=true;
+        }
         //判断手术记录有无标本记录
         if(blHz) {
             status.set("-1");

+ 202 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/operationdiscussion/OPE03171.java

@@ -0,0 +1,202 @@
+package com.lantone.qc.kernel.catalogue.operationdiscussion;
+
+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.DoctorAdviceDoc;
+import com.lantone.qc.pub.model.doc.InformedConsentDoc;
+import com.lantone.qc.pub.model.doc.ThreeLevelWardDoc;
+import com.lantone.qc.pub.model.doc.operation.OperationDoc;
+import com.lantone.qc.pub.model.doc.operation.OperationInformedConsentDoc;
+import com.lantone.qc.pub.model.doc.operation.OperationRecordDoc;
+import com.lantone.qc.pub.util.ListUtil;
+import com.lantone.qc.pub.util.StringUtil;
+import org.springframework.stereotype.Component;
+
+import java.text.ParseException;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @Description: 手术记录内植入物使用未记录
+ * @author: cy
+ * @time: 2021/05/19 14:45
+ */
+@Component
+public class OPE03171 extends QCCatalogue {
+
+    @Override
+    protected void start(InputInfo inputInfo, OutputInfo outputInfo) throws ParseException {
+        status.set("0");
+        //先判断是否进行了手术
+        boolean ssHz=false;
+        boolean zrw=false;
+        //是否进行了手术
+        List<OperationDoc> operationDocs = inputInfo.getOperationDocs();
+        //是否有手术记录
+        if(ListUtil.isEmpty(operationDocs)){
+            return;
+        }
+        if(operationDocs!=null){
+            for (OperationDoc operationDoc : operationDocs) {
+                OperationRecordDoc operationRecordDoc = operationDoc.getOperationRecordDoc();
+                if (operationRecordDoc != null) {
+                    ssHz = true;
+                }
+            }
+        }
+        //手术记录
+        if(ssHz){
+            for (OperationDoc operationDoc : operationDocs) {
+                OperationInformedConsentDoc operationInformedConsentDoc = operationDoc.getOperationInformedConsentDoc();
+                if(operationInformedConsentDoc!=null){
+                    String str = operationInformedConsentDoc.getStructureMap().get("使用植入性材料");
+                    if(StringUtil.isNotEmpty(str)) {
+                        if (str.equals("true")) {
+                            zrw = true;
+                            break;
+                        }
+                        if(str.equals("false")){
+                            return;
+                        }
+                    }
+                }
+                OperationRecordDoc operationRecordDoc = operationDoc.getOperationRecordDoc();
+                if(operationRecordDoc!=null){
+                    String key = getKeyByHospitalId();
+                    String str = operationRecordDoc.getStructureMap().get(key);
+                    if(StringUtil.isNotEmpty(str)){
+                        if(str.contains("提醒")){
+                            String clStr = clStr(str);
+                            if(StringUtil.isNotEmpty(clStr)){
+                                if(zrwStr(clStr)){
+                                    zrw=true;
+                                    break;
+                                }
+                            }
+                        }else {
+                            if(zrwStr(str)){
+                                zrw=true;
+                                break;
+                            }
+                        }
+                    }
+                    String strzr = operationRecordDoc.getStructureMap().get("植入物名称");
+                    if(StringUtil.isNotEmpty(strzr)){
+                        if(zrwStr(str)){
+                            zrw=true;
+                            break;
+                        }
+                    }
+                }
+            }
+            List<InformedConsentDoc> informedConsentDoc = inputInfo.getInformedConsentDoc();
+            //知情同意书
+            if (ListUtil.isNotEmpty(informedConsentDoc)) {
+                for (InformedConsentDoc consentDoc : informedConsentDoc) {
+                    if ("手术植入材料收费知情同意书".equals(consentDoc.getStructureMap().get("标题"))) {
+                        zrw = true;
+                        break;
+                    }
+                }
+            }
+        }
+
+
+        /****手术记录***/
+        if(zrw&&ssHz){
+            status.set("-1");
+            //手术记录
+            if(ListUtil.isNotEmpty(operationDocs)){
+                for (OperationDoc operationDoc : operationDocs) {
+                    OperationRecordDoc operationRecordDoc = operationDoc.getOperationRecordDoc();
+                    if(operationRecordDoc!=null){
+                        String key = getKeyByHospitalId();
+                        String str = operationRecordDoc.getStructureMap().get(key);
+                        if(StringUtil.isNotEmpty(str)){
+                            if(str.contains("提醒")){
+                                String clStr = clStr(str);
+                                if(StringUtil.isNotEmpty(clStr)){
+                                    if(zrwStr(clStr)){
+                                            status.set("0");
+                                            return;
+                                    }
+                                }
+                            }else {
+                                if(zrwStr(str)){
+                                        status.set("0");
+                                        return;
+                                }
+                            }
+                        }
+                        String strzr = operationRecordDoc.getStructureMap().get("植入物名称");
+                        if(StringUtil.isNotEmpty(strzr)){
+                            if(zrwStr(str)){
+                                status.set("0");
+                                return;
+                            }
+                        }
+                    }
+                }
+            }
+        }
+    }
+    //植入物
+    private boolean zrwStr(String str){
+        if(StringUtil.isEmpty(str)){
+            return false;
+        }
+        boolean flag=false;
+        str = str.replaceAll("\\*", "\\\\*");
+        str = str.replaceAll("\\)", "\\\\)");
+        str = str.replaceAll("\\.", "\\\\.");
+        str = str.replaceAll("\\?", "\\\\?");
+        str = str.replaceAll("\\+", "\\\\+");
+        str = str.replaceAll("\\$", "\\\\$");
+        str = str.replaceAll("\\^", "\\\\^");
+        str = str.replaceAll("\\[", "\\\\[");
+        str = str.replaceAll("\\]", "\\\\]");
+        str = str.replaceAll("\\(", "\\\\(");
+        str = str.replaceAll("\\{", "\\\\{");
+        str = str.replaceAll("\\}", "\\\\}");
+        str = str.replaceAll("\\|", "\\\\|");
+        str = str.replaceAll("\\/", "\\\\/");
+        String rex1="[\\s\\S]*(?=人工)[^,;,;。]{0,7}(?=体)[\\s\\S]*";
+        String rex2="[\\s\\S]*(?=人工)[^,;,;。]{0,7}(?=关节)[\\s\\S]*";
+        String rex3="[\\s\\S]*(?=生物)[^,;,;。]{0,7}(?=膜)[\\s\\S]*";
+        String rex4="[\\s\\S]*(?=机械)[\\s\\S]*";
+        String rex5="[\\s\\S]*(?=起搏)[^,;,;。]{0,7}(?=器)[\\s\\S]*";
+        String rex6="[\\s\\S]*(?=粒子)[^,;,;。]{0,7}(?=植入)[\\s\\S]*";
+        //植入物集合
+        List<String> theImplantsList = Content.theImplantsList;
+        for (String theImplants : theImplantsList) {
+            if(str.contains(theImplants)){
+                flag=true;
+            }
+        }
+        if(flag || str.matches(rex1)|| str.matches(rex2)|| str.matches(rex3)|| str.matches(rex4)|| str.matches(rex5)|| str.matches(rex6)){
+            return true;
+        }
+        return false;
+    }
+
+    //处理手术记录中含特殊话语情况
+    private String clStr(String str){
+        String newStr="";
+        if(str.contains("提醒")){
+            int i = str.indexOf("提醒");
+            newStr = str.substring(0,i);
+        }
+        return newStr;
+    }
+    private String getKeyByHospitalId() {
+        switch (Content.hospital_Id)
+        {
+            case "3":
+                return "手术经过";
+            default:
+                return "手术经过及处理";
+        }
+    }
+}

+ 1 - 1
kernel/src/main/java/com/lantone/qc/kernel/catalogue/threelevelward/THR03112.java

@@ -42,7 +42,7 @@ public class THR03112 extends QCCatalogue {
                             String daItemName = doctorAdviceDocStructureMap.get(Content.medicalOrderName);
                             String nameSs = doctorAdviceDocStructureMap.get("医嘱处方类型");
                             if (StringUtil.isNotEmpty(daItemName) && StringUtil.isNotEmpty(nameSs)) {
-                                if (dateStr(daItemName) && nameSs.equals("检查")) {
+                                if (dateStr(daItemName) && nameSs.equals("检查")|| nameSs.equals("放射医嘱")) {
                                     flag = true;
                                     status.set("-1");
                                 }

+ 1 - 1
kernel/src/main/java/com/lantone/qc/kernel/catalogue/threelevelward/THR03114.java

@@ -43,7 +43,7 @@ public class THR03114 extends QCCatalogue {
                             String daItemName = doctorAdviceDocStructureMap.get(Content.medicalOrderName);
                             String nameSs = doctorAdviceDocStructureMap.get("医嘱处方类型");
                             if (StringUtil.isNotEmpty(daItemName)&&StringUtil.isNotEmpty(nameSs)) {
-                                if (dateStr(daItemName)&&(nameSs.equals("检查")||nameSs.equals("LAB"))) {
+                                if (dateStr(daItemName)&&(nameSs.equals("检查")||nameSs.equals("LAB")|| nameSs.equals("放射医嘱"))) {
                                     flag = true;
                                     status.set("-1");
                                 }

+ 1 - 1
kernel/src/main/java/com/lantone/qc/kernel/catalogue/threelevelward/THR03115.java

@@ -44,7 +44,7 @@ public class THR03115 extends QCCatalogue {
                             String daItemName = doctorAdviceDocStructureMap.get(Content.medicalOrderName);
                             String nameSs = doctorAdviceDocStructureMap.get("医嘱处方类型");
                             if (StringUtil.isNotEmpty(daItemName) && StringUtil.isNotEmpty(nameSs)) {
-                                if (dateStr(daItemName) && (nameSs.equals("检查") || nameSs.equals("LAB"))) {
+                                if (dateStr(daItemName) && (nameSs.equals("检查") || nameSs.equals("LAB")|| nameSs.equals("放射医嘱"))) {
                                     flag = true;
                                     status.set("-1");
                                 }

+ 4 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/threelevelward/THR03116.java

@@ -81,6 +81,10 @@ public class THR03116 extends QCCatalogue {
                 }
             }
         }
+        List<PathologyShipDoc> pathologyShipDocs = inputInfo.getPathologyShipDocs();
+        if(ListUtil.isNotEmpty(pathologyShipDocs)){
+            flag=true;
+        }
         if (flag) {
             status.set("-1");
             if (ListUtil.isNotEmpty(pacsDocs)) {

+ 4 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/threelevelward/THR03117.java

@@ -79,6 +79,10 @@ public class THR03117 extends QCCatalogue {
                 }
             }
         }
+        List<PathologyShipDoc> pathologyShipDocs = inputInfo.getPathologyShipDocs();
+        if(ListUtil.isNotEmpty(pathologyShipDocs)){
+            flag=true;
+        }
         //病程记录是否记录
         if(flag) {
             status.set("-1");

+ 1 - 1
kernel/src/main/java/com/lantone/qc/kernel/catalogue/threelevelward/THR3113.java

@@ -43,7 +43,7 @@ public class THR3113 extends QCCatalogue {
                             String daItemName = doctorAdviceDocStructureMap.get(Content.medicalOrderName);
                             String nameSs = doctorAdviceDocStructureMap.get("医嘱处方类型");
                             if (StringUtil.isNotEmpty(daItemName) && StringUtil.isNotEmpty(nameSs)) {
-                                if (dateStr(daItemName) && nameSs.equals("检查")) {
+                                if (dateStr(daItemName) && nameSs.equals("检查")|| nameSs.equals("放射医嘱")) {
                                     flag = true;
                                     status.set("-1");
                                 }

+ 2 - 2
public/src/main/java/com/lantone/qc/pub/Content.java

@@ -385,11 +385,11 @@ public class Content {
     );
     //病理检查缺少病理检查报告单中手术病理
     public static List<String> surgeryPathologyTwoList= Arrays.asList(
-            "病理","免疫组化","送检","标本","病切","石蜡","切片","病检"
+            "病理","免疫组化","送检","病切","石蜡","切片","病检"
     );
     //医嘱病理
     public static List<String>  doctorAdvicePathologyList= Arrays.asList(
-            "病检","石蜡","标本","病切","蜡块","切片","流式细胞术","送检","免疫组化","病理"
+            "病检","石蜡","病切","蜡块","切片","流式细胞术","送检","免疫组化","病理"
     );
     //报告单病理
     public static List<String>  reportCardPathologyList= Arrays.asList(