Kaynağa Gözat

1.修改规则:加用抗生素未记录、减用抗生素未记录、抗生素加用原因不明确、抗生素减用原因不明确

huj 5 yıl önce
ebeveyn
işleme
4e5aedb5bb

+ 16 - 3
kernel/src/main/java/com/lantone/qc/kernel/catalogue/threelevelward/THR03069.java

@@ -52,14 +52,14 @@ public class THR03069 extends QCCatalogue {
         docAdvStruct
                 .stream()
                 .map(x -> x.get("医嘱项目名称"))
-                .forEach(y -> antibioticStatus.put(y.replaceAll("[\\[国产\\]\\[进口\\]\\[合信\\]\\[合资\\]]", ""), 0));
+                .forEach(y -> antibioticStatus.put(removeBracket(y), 0));
 
         String drugName = null, value = null, startDateStr = null;
         for (Map<String, String> structMap : docAdvStruct) {
             drugName = structMap.get("医嘱项目名称");
             value = structMap.get("医嘱单次剂量");
             startDateStr = structMap.get("医嘱开始时间");
-            drugName = drugName.replaceAll("[\\[国产\\]\\[进口\\]\\[合信\\]\\[合资\\]]", "");
+            drugName = removeBracket(drugName);
             collectAntibioticInfo(antibioticDate, antibioticStatus, antibioticValue, drugName, value, startDateStr);
         }
 
@@ -93,7 +93,7 @@ public class THR03069 extends QCCatalogue {
                     //查房记录抗生素加用过的集合中没包含该抗生素,则认为该抗生素是第一次出现,此时不需要加用原因
                     if (!antibioticStatusWard.containsKey(drug.getName()) || drug.getUsageWardRound() != null) {
                         String consumption = drug.getConsumption().getName();
-                        collectAntibioticInfo(antibioticDateWard, antibioticStatusWard, antibioticValueWard, drug.getName(), consumption, doc.getStructureMap().get("查房日期"));
+                        collectAntibioticInfo(antibioticDateWard, antibioticStatusWard, antibioticValueWard, removeBracket(drug.getName()), consumption, doc.getStructureMap().get("查房日期"));
                     }
                 }
             }
@@ -193,4 +193,17 @@ public class THR03069 extends QCCatalogue {
         return group;
     }
 
+    /**
+     * 如果文本包含中括号([海正]美罗培南针),取括号之后的文字
+     *
+     * @param str
+     * @return
+     */
+    private String removeBracket(String str) {
+        if (str.contains("]") && str.indexOf("]") != str.length() - 1) {
+            return str.substring(str.indexOf("]") + 1);
+        }
+        return str;
+    }
+
 }

+ 16 - 3
kernel/src/main/java/com/lantone/qc/kernel/catalogue/threelevelward/THR03072.java

@@ -52,14 +52,14 @@ public class THR03072 extends QCCatalogue {
         docAdvStruct
                 .stream()
                 .map(x -> x.get("医嘱项目名称"))
-                .forEach(y -> antibioticStatus.put(y.replaceAll("[\\[国产\\]\\[进口\\]\\[合信\\]\\[合资\\]]", ""), 0));
+                .forEach(y -> antibioticStatus.put(removeBracket(y), 0));
 
         String drugName = null, value = null, startDateStr = null;
         for (Map<String, String> structMap : docAdvStruct) {
             drugName = structMap.get("医嘱项目名称");
             value = structMap.get("医嘱单次剂量");
             startDateStr = structMap.get("医嘱开始时间");
-            drugName = drugName.replaceAll("[\\[国产\\]\\[进口\\]\\[合信\\]\\[合资\\]]", "");
+            drugName = removeBracket(drugName);
             collectAntibioticInfo(antibioticDate, antibioticStatus, antibioticValue, drugName, value, startDateStr);
         }
 
@@ -93,7 +93,7 @@ public class THR03072 extends QCCatalogue {
                     //查房记录抗生素减用过的集合中没包含该抗生素,则认为该抗生素是第一次出现,此时不需要减用原因
                     if (!antibioticStatusWard.containsKey(drug.getName()) || drug.getUsageWardRound() != null) {
                         String consumption = drug.getConsumption().getName();
-                        collectAntibioticInfo(antibioticDateWard, antibioticStatusWard, antibioticValueWard, drug.getName(), consumption, doc.getStructureMap().get("查房日期"));
+                        collectAntibioticInfo(antibioticDateWard, antibioticStatusWard, antibioticValueWard, removeBracket(drug.getName()), consumption, doc.getStructureMap().get("查房日期"));
                     }
                 }
             }
@@ -193,4 +193,17 @@ public class THR03072 extends QCCatalogue {
         return group;
     }
 
+    /**
+     * 如果文本包含中括号([海正]美罗培南针),取括号之后的文字
+     *
+     * @param str
+     * @return
+     */
+    private String removeBracket(String str) {
+        if (str.contains("]") && str.indexOf("]") != str.length() - 1) {
+            return str.substring(str.indexOf("]") + 1);
+        }
+        return str;
+    }
+
 }

+ 16 - 3
kernel/src/main/java/com/lantone/qc/kernel/catalogue/threelevelward/THR03074.java

@@ -52,14 +52,14 @@ public class THR03074 extends QCCatalogue {
         docAdvStruct
                 .stream()
                 .map(x -> x.get("医嘱项目名称"))
-                .forEach(y -> antibioticStatus.put(y.replaceAll("[\\[国产\\]\\[进口\\]\\[合信\\]\\[合资\\]]", ""), 0));
+                .forEach(y -> antibioticStatus.put(removeBracket(y), 0));
 
         String drugName = null, value = null, startDateStr = null;
         for (Map<String, String> structMap : docAdvStruct) {
             drugName = structMap.get("医嘱项目名称");
             value = structMap.get("医嘱单次剂量");
             startDateStr = structMap.get("医嘱开始时间");
-            drugName = drugName.replaceAll("[\\[国产\\]\\[进口\\]\\[合信\\]\\[合资\\]]", "");
+            drugName = removeBracket(drugName);
             collectAntibioticInfo(antibioticDate, antibioticStatus, antibioticValue, drugName, value, startDateStr);
         }
 
@@ -90,7 +90,7 @@ public class THR03074 extends QCCatalogue {
             for (Drug drug : drugs) {
                 if (drug.getConsumption() != null) {
                     String consumption = drug.getConsumption().getName();
-                    collectAntibioticInfo(antibioticDateWard, antibioticStatusWard, antibioticValueWard, drug.getName(), consumption, doc.getStructureMap().get("查房日期"));
+                    collectAntibioticInfo(antibioticDateWard, antibioticStatusWard, antibioticValueWard, removeBracket(drug.getName()), consumption, doc.getStructureMap().get("查房日期"));
                 }
             }
         }
@@ -189,4 +189,17 @@ public class THR03074 extends QCCatalogue {
         return group;
     }
 
+    /**
+     * 如果文本包含中括号([海正]美罗培南针),取括号之后的文字
+     *
+     * @param str
+     * @return
+     */
+    private String removeBracket(String str) {
+        if (str.contains("]") && str.indexOf("]") != str.length() - 1) {
+            return str.substring(str.indexOf("]") + 1);
+        }
+        return str;
+    }
+
 }

+ 15 - 3
kernel/src/main/java/com/lantone/qc/kernel/catalogue/threelevelward/THR03075.java

@@ -52,14 +52,14 @@ public class THR03075 extends QCCatalogue {
         docAdvStruct
                 .stream()
                 .map(x -> x.get("医嘱项目名称"))
-                .forEach(y -> antibioticStatus.put(y.replaceAll("[\\[国产\\]\\[进口\\]\\[合信\\]\\[合资\\]]", ""), 0));
+                .forEach(y -> antibioticStatus.put(removeBracket(y), 0));
 
         String drugName = null, value = null, startDateStr = null;
         for (Map<String, String> structMap : docAdvStruct) {
             drugName = structMap.get("医嘱项目名称");
             value = structMap.get("医嘱单次剂量");
             startDateStr = structMap.get("医嘱开始时间");
-            drugName = drugName.replaceAll("[\\[国产\\]\\[进口\\]\\[合信\\]\\[合资\\]]", "");
+            drugName = removeBracket(drugName);
             collectAntibioticInfo(antibioticDate, antibioticStatus, antibioticValue, drugName, value, startDateStr);
         }
 
@@ -90,7 +90,7 @@ public class THR03075 extends QCCatalogue {
             for (Drug drug : drugs) {
                 if (drug.getConsumption() != null) {
                     String consumption = drug.getConsumption().getName();
-                    collectAntibioticInfo(antibioticDateWard, antibioticStatusWard, antibioticValueWard, drug.getName(), consumption, doc.getStructureMap().get("查房日期"));
+                    collectAntibioticInfo(antibioticDateWard, antibioticStatusWard, antibioticValueWard, removeBracket(drug.getName()), consumption, doc.getStructureMap().get("查房日期"));
                 }
             }
         }
@@ -181,4 +181,16 @@ public class THR03075 extends QCCatalogue {
         return group;
     }
 
+    /**
+     * 如果文本包含中括号([海正]美罗培南针),取括号之后的文字
+     *
+     * @param str
+     * @return
+     */
+    private String removeBracket(String str) {
+        if (str.contains("]") && str.indexOf("]") != str.length() - 1) {
+            return str.substring(str.indexOf("]") + 1);
+        }
+        return str;
+    }
 }