Browse Source

修改正则表达式处理数据中包含,;等情况

zhanghang 3 years ago
parent
commit
4dd29cd18c

+ 5 - 5
kernel/src/main/java/com/lantone/qc/kernel/catalogue/clinicalblood/CLI0301.java

@@ -91,11 +91,11 @@ public class CLI0301 extends QCCatalogue {
         str = str.replaceAll("\\}", "\\\\}");
         str = str.replaceAll("\\|", "\\\\|");
         str = str.replaceAll("\\/", "\\\\/");
-        String rex1="[\\s\\S]*(?=输)[\\s\\S]{0,5}(?=血)[\\s\\S]*";
-        String rex2="[\\s\\S]*(?=输)[\\s\\S]{0,5}(?=红细胞)[\\s\\S]*";
-        String rex3="[\\s\\S]*(?=输)[\\s\\S]{0,5}(?=血小板)[\\s\\S]*";
-        String rex4="[\\s\\S]*(?=输)[\\s\\S]{0,5}(?=血浆)[\\s\\S]*";
-        String rex5="[\\s\\S]*(?=输)[\\s\\S]{0,5}(?=冷沉淀因子)[\\s\\S]*";
+        String rex1="[\\s\\S]*(?=输)[^,;,;。]{0,6}(?=血)[\\s\\S]*";
+        String rex2="[\\s\\S]*(?=输)[^,;,;。]{0,6}(?=红细胞)[\\s\\S]*";
+        String rex3="[\\s\\S]*(?=输)[^,;,;。]{0,6}(?=血小板)[\\s\\S]*";
+        String rex4="[\\s\\S]*(?=输)[^,;,;。]{0,6}(?=血浆)[\\s\\S]*";
+        String rex5="[\\s\\S]*(?=输)[^,;,;。]{0,6}(?=冷沉淀因子)[\\s\\S]*";
         if( str.matches(rex1)|| str.matches(rex2) || str.matches(rex3)|| str.matches(rex4)|| str.matches(rex5)){
             return true;
         }

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

@@ -117,12 +117,12 @@ public class OPE03111 extends QCCatalogue {
         boolean flag=false;
         String str = Str(string);
         String rex="[\\s\\S]*(?=流式)[\\s\\S]*";
-        String rex1="[\\s\\S]*(?=穿透)[\\s\\S]{0,10}(?=层)[\\s\\S]*";
-        String rex2="[\\s\\S]*(?=癌)[\\s\\S]{0,10}(?=浸润)[\\s\\S]*";
+        String rex1="[\\s\\S]*(?=穿透)[^,;,;。]{0,7}(?=层)[\\s\\S]*";
+        String rex2="[\\s\\S]*(?=癌)[^,;,;。]{0,6}(?=浸润)[\\s\\S]*";
         String rex3="[\\s\\S]*(?=分化)[\\s\\S]*";
-        String rex4="[\\s\\S]*(?=淋巴结)[\\s\\S]{0,10}(?=转移)[\\s\\S]*";
-        String rex5="[\\s\\S]*(?=浸润性)[\\s\\S]{0,10}(?=癌)[\\s\\S]*";
-        String rex6="[\\s\\S]*(?=突破)[\\s\\S]{0,10}(?=层)[\\s\\S]*";
+        String rex4="[\\s\\S]*(?=淋巴结)[^,;,;。]{0,8}(?=转移)[\\s\\S]*";
+        String rex5="[\\s\\S]*(?=浸润性)[^,;,;。]{0,8}(?=癌)[\\s\\S]*";
+        String rex6="[\\s\\S]*(?=突破)[^,;,;。]{0,7}(?=层)[\\s\\S]*";
         List<String> surgeryPathologyList = Content.surgeryPathologyList;
         for (String surgeryPathology : surgeryPathologyList) {
             if(str.contains(surgeryPathology)){

+ 5 - 5
kernel/src/main/java/com/lantone/qc/kernel/catalogue/operationdiscussion/OPE03119.java

@@ -217,12 +217,12 @@ public class OPE03119 extends QCCatalogue {
         str = str.replaceAll("\\}", "\\\\}");
         str = str.replaceAll("\\|", "\\\\|");
         str = str.replaceAll("\\/", "\\\\/");
-        String rex1="[\\s\\S]*(?=人工)[\\s\\S]{0,10}(?=体)[\\s\\S]*";
-        String rex2="[\\s\\S]*(?=人工)[\\s\\S]{0,10}(?=关节)[\\s\\S]*";
-        String rex3="[\\s\\S]*(?=生物)[\\s\\S]{0,5}(?=膜)[\\s\\S]*";
+        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]*(?=起搏)[\\s\\S]{0,6}(?=器)[\\s\\S]*";
-        String rex6="[\\s\\S]*(?=粒子)[\\s\\S]{0,5}(?=植入)[\\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) {

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

@@ -77,8 +77,8 @@ public class THR03114 extends QCCatalogue {
             return false;
         }
         String str = Str(string);
-        String rex="[\\s\\S]*(?=线断层)[\\s\\S]{0,10}(?=扫)[\\s\\S]*";
-        String rex1="[\\s\\S]*(?=计算机)[\\s\\S]{0,10}(?=断层)[\\s\\S]{0,10}(?=扫)[\\s\\S]*";
+        String rex="[\\s\\S]*(?=线断层)[^,;,;。]{0,8}(?=扫)[\\s\\S]*";
+        String rex1="[\\s\\S]*(?=计算机)[^,;,;。]{0,8}(?=断层)[^,;,;。]{0,7}(?=扫)[\\s\\S]*";
         if (str.contains("CT") || str.matches(rex)||str.matches(rex1)) {
             List<String> notCTList = Content.notCTList;
             for (String list : notCTList) {
@@ -98,8 +98,8 @@ public class THR03114 extends QCCatalogue {
         boolean jsj=false;
         ArrayList<String> cfStrings = new ArrayList<>();
         String str = Str(string);
-        String rex="[\\s\\S]*(?=线断层)[\\s\\S]{0,10}(?=扫)[\\s\\S]*";
-        String rex1="[\\s\\S]*(?=计算机)[\\s\\S]{0,10}(?=断层)[\\s\\S]{0,10}(?=扫)[\\s\\S]*";
+        String rex="[\\s\\S]*(?=线断层)[^,;,;。]{0,8}(?=扫)[\\s\\S]*";
+        String rex1="[\\s\\S]*(?=计算机)[^,;,;。]{0,8}(?=断层)[^,;,;。]{0,7}(?=扫)[\\s\\S]*";
         String rex2="[\\s\\S]{0,5}(?=CT)[\\s\\S]{1,10}";
         //需要判断同时存在mr和IMRT等情况的发生
         if(str.contains("CT")) {

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

@@ -77,8 +77,8 @@ public class THR03115 extends QCCatalogue {
             return false;
         }
         String str = Str(string);
-        String rex="[\\s\\S]*(?=线断层)[\\s\\S]{0,10}(?=扫)[\\s\\S]*";
-        String rex1="[\\s\\S]*(?=计算机)[\\s\\S]{0,10}(?=断层)[\\s\\S]{0,10}(?=扫)[\\s\\S]*";
+        String rex="[\\s\\S]*(?=线断层)[^,;,;。]{0,8}(?=扫)[\\s\\S]*";
+        String rex1="[\\s\\S]*(?=计算机)[^,;,;。]{0,8}(?=断层)[^,;,;。]{0,7}(?=扫)[\\s\\S]*";
         if (str.contains("CT") || str.matches(rex)||str.matches(rex1)) {
             if(str.contains("CT")){
                 List<String> notCTList = Content.notCTList;
@@ -101,8 +101,8 @@ public class THR03115 extends QCCatalogue {
         boolean jsj=false;
         ArrayList<String> cfStrings = new ArrayList<>();
         String str = Str(string);
-        String rex="[\\s\\S]*(?=线断层)[\\s\\S]{0,10}(?=扫)[\\s\\S]*";
-        String rex1="[\\s\\S]*(?=计算机)[\\s\\S]{0,10}(?=断层)[\\s\\S]{0,10}(?=扫)[\\s\\S]*";
+        String rex="[\\s\\S]*(?=线断层)[^,;,;。]{0,8}(?=扫)[\\s\\S]*";
+        String rex1="[\\s\\S]*(?=计算机)[^,;,;。]{0,8}(?=断层)[^,;,;。]{0,7}(?=扫)[\\s\\S]*";
         String rex2="[\\s\\S]{0,5}(?=CT)[\\s\\S]{0,10}";
         //需要判断同时存在CT和OCT等情况的发生
         if(str.contains("CT")) {

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

@@ -106,12 +106,12 @@ public class THR03116 extends QCCatalogue {
         boolean flag=false;
         String str = Str(string);
         String rex="[\\s\\S]*(?=流式)[\\s\\S]*";
-        String rex1="[\\s\\S]*(?=穿透)[\\s\\S]{0,7}(?=层)[\\s\\S]*";
-        String rex2="[\\s\\S]*(?=癌)[\\s\\S]{0,7}(?=浸润)[\\s\\S]*";
+        String rex1="[\\s\\S]*(?=穿透)[^,;,;。]{0,7}(?=层)[\\s\\S]*";
+        String rex2="[\\s\\S]*(?=癌)[^,;,;。]{0,7}(?=浸润)[\\s\\S]*";
         String rex3="[\\s\\S]*(?=分化)[\\s\\S]*";
-        String rex4="[\\s\\S]*(?=淋巴结)[\\s\\S]{0,7}(?=转移)[\\s\\S]*";
-        String rex5="[\\s\\S]*(?=浸润性)[\\s\\S]{0,7}(?=癌)[\\s\\S]*";
-        String rex6="[\\s\\S]*(?=突破)[\\s\\S]{0,7}(?=层)[\\s\\S]*";
+        String rex4="[\\s\\S]*(?=淋巴结)[^,;,;。]{0,8}(?=转移)[\\s\\S]*";
+        String rex5="[\\s\\S]*(?=浸润性)[^,;,;。]{0,8}(?=癌)[\\s\\S]*";
+        String rex6="[\\s\\S]*(?=突破)[^,;,;。]{0,7}(?=层)[\\s\\S]*";
         List<String> reportCardPathologyList = Content.reportCardPathologyList;
         for (String reportCardPathology : reportCardPathologyList) {
             if(string.contains(reportCardPathology)){

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

@@ -108,12 +108,12 @@ public class THR03117 extends QCCatalogue {
         boolean flag=false;
         String str = Str(string);
         String rex="[\\s\\S]*(?=流式)[\\s\\S]*";
-        String rex1="[\\s\\S]*(?=穿透)[\\s\\S]{0,7}(?=层)[\\s\\S]*";
-        String rex2="[\\s\\S]*(?=癌)[\\s\\S]{0,7}(?=浸润)[\\s\\S]*";
+        String rex1="[\\s\\S]*(?=穿透)[^,;,;。]{0,7}(?=层)[\\s\\S]*";
+        String rex2="[\\s\\S]*(?=癌)[^,;,;。]{0,6}(?=浸润)[\\s\\S]*";
         String rex3="[\\s\\S]*(?=分化)[\\s\\S]*";
-        String rex4="[\\s\\S]*(?=淋巴结)[\\s\\S]{0,7}(?=转移)[\\s\\S]*";
-        String rex5="[\\s\\S]*(?=浸润性)[\\s\\S]{0,7}(?=癌)[\\s\\S]*";
-        String rex6="[\\s\\S]*(?=突破)[\\s\\S]{0,7}(?=层)[\\s\\S]*";
+        String rex4="[\\s\\S]*(?=淋巴结)[^,;,;。]{0,8}(?=转移)[\\s\\S]*";
+        String rex5="[\\s\\S]*(?=浸润性)[^,;,;。]{0,8}(?=癌)[\\s\\S]*";
+        String rex6="[\\s\\S]*(?=突破)[^,;,;。]{0,7}(?=层)[\\s\\S]*";
         String rex7="[\\s\\S]{0,10}(?=病理)[\\s\\S]{0,10}";
         List<String> cfPathologyList = Content.cfPathologyList;
         for (String cfPathology : cfPathologyList) {

+ 7 - 7
kernel/src/main/java/com/lantone/qc/kernel/catalogue/threelevelward/THR03120.java

@@ -140,7 +140,7 @@ public class THR03120 extends QCCatalogue {
             return false;
         }
         String str = Str(string);
-        String rex1="[\\s\\S]*(?=放射)[\\s\\S]{0,6}(?=治疗)[\\s\\S]*";
+        String rex1="[\\s\\S]*(?=放射)[^,;,;。]{0,7}(?=治疗)[\\s\\S]*";
         if(str.contains("放疗") || str.contains("伽马刀") || str.contains("γ刀") || str.contains("粒子植入") || str.contains("立体定向放射") ||
                 str.matches(rex1) ||str.contains("三维适形调强放疗")  ||str.contains("SRT") ||str.contains("靶区勾画")){
             return true;
@@ -153,10 +153,10 @@ public class THR03120 extends QCCatalogue {
             return false;
         }
         String str = Str(string);
-        String rex1="[\\s\\S]*(?=恶性)[\\s\\S]{0,10}(?=瘤)[\\s\\S]*";
-        String rex2="[\\s\\S]*(?=新辅)[\\s\\S]{0,10}(?=治疗)[\\s\\S]*";
-        String rex3="[\\s\\S]*(?=解救)[\\s\\S]{0,10}(?=治疗)[\\s\\S]*";
-        String rex4="[\\s\\S]*(?=恶性)[\\s\\S]{0,10}(?=肿瘤)[\\s\\S]{0,10}(?=全身)[\\s\\S]{0,10}(?=治疗)[\\s\\S]*";
+        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]*(?=恶性)[^,;,;。]{0,7}(?=肿瘤)[^,;,;。]{0,7}(?=全身)[^,;,;。]{0,7}(?=治疗)[\\s\\S]*";
         String rex5="(?<=CA)\\d";
         Pattern rex5_ = Pattern.compile(rex5, Pattern.CASE_INSENSITIVE);
         String rex6="(?<=can)\\d";
@@ -173,8 +173,8 @@ public class THR03120 extends QCCatalogue {
             return false;
         }
         String str = Str(string);
-        String rex1="[\\s\\S]*(?=化)[\\s\\S]{0,10}(?=疗)[\\s\\S]*";
-        String rex2="[\\s\\S]*(?=放)[\\s\\S]{0,10}(?=疗)[\\s\\S]*";
+        String rex1="[\\s\\S]*(?=化)[^,;,;。]{0,7}(?=疗)[\\s\\S]*";
+        String rex2="[\\s\\S]*(?=放)[^,;,;。]{0,7}(?=疗)[\\s\\S]*";
         if(str.contains("伽马刀") || str.contains("γ刀") || str.contains("粒子植入") || str.contains("立体定向放射") || str.contains("三维适形调强放疗")
                 || str.matches(rex1) ||  str.matches(rex2) ||str.contains("IMRT") ||str.contains("SRT") || str.contains("靶区勾画")
                 ||  str.contains("腹腔灌注")

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

@@ -137,13 +137,13 @@ public class THR03121 extends QCCatalogue {
         str = str.replaceAll("\\}", "\\\\}");
         str = str.replaceAll("\\|", "\\\\|");
         str = str.replaceAll("\\/", "\\\\/");
-        String rex1="[\\s\\S]*(?=痰)[\\s\\S]{0,10}(?=培养)[\\s\\S]*";
-        String rex2="[\\s\\S]*(?=尿)[\\s\\S]{0,10}(?=培养)[\\s\\S]*";
-        String rex3="[\\s\\S]*(?=细菌)[\\s\\S]{0,10}(?=培养)[\\s\\S]*";
-        String rex4="[\\s\\S]*(?=咽)[\\s\\S]{0,10}(?=拭子)[\\s\\S]*";
-        String rex5="[\\s\\S]*(?=血)[\\s\\S]{0,10}(?=培养)[\\s\\S]*";
+        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]*(?=咽)[^,;,;。]{0,7}(?=拭子)[\\s\\S]*";
+        String rex5="[\\s\\S]*(?=血)[^,;,;。]{0,7}(?=培养)[\\s\\S]*";
         String rex6="[\\s\\S]*(?=菌培养)[\\s\\S]*";
-        String rex7="[\\s\\S]*(?=骨髓)[\\s\\S]{0,10}(?=培养)[\\s\\S]*";
+        String rex7="[\\s\\S]*(?=骨髓)[^,;,;。]{0,7}(?=培养)[\\s\\S]*";
         if (str.contains("粪便培养") || str.matches(rex1)|| str.matches(rex2)|| str.matches(rex3)
                 || str.matches(rex4) || str.matches(rex5) || str.matches(rex6) ||str.matches(rex7)) {
             return true;

+ 11 - 11
kernel/src/main/java/com/lantone/qc/kernel/catalogue/threelevelward/THR03123.java

@@ -192,10 +192,10 @@ public class THR03123 extends QCCatalogue {
             return false;
         }
         String str = Str(string);
-        String rex1="[\\s\\S]*(?=化)[\\s\\S]{0,6}(?=疗)[\\s\\S]*";
-        String rex2="[\\s\\S]*(?=新辅)[\\s\\S]{0,6}(?=疗)[\\s\\S]*";
-        String rex3="[\\s\\S]*(?=解救)[\\s\\S]{0,6}(?=疗)[\\s\\S]*";
-        String rex4="[\\s\\S]*(?=恶性)[\\s\\S]{0,6}(?=肿瘤)[\\s\\S]{0,6}(?=全身)[\\s\\S]{0,6}(?=治疗)[\\s\\S]*";
+        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]*(?=恶性)[^,;,;。]{0,7}(?=肿瘤)[^,;,;。]{0,7}(?=全身)[^,;,;。]{0,7}(?=治疗)[\\s\\S]*";
         if(str.matches(rex1) ||  str.matches(rex2)||  str.matches(rex3)||  str.matches(rex4) ){
             return true;
         }
@@ -207,11 +207,11 @@ public class THR03123 extends QCCatalogue {
             return false;
         }
         String str = Str(string);
-        String rex1="[\\s\\S]*(?=恶性)[\\s\\S]{0,6}(?=瘤)[\\s\\S]*";
-        String rex2="[\\s\\S]*(?=新辅)[\\s\\S]{0,6}(?=治疗)[\\s\\S]*";
-        String rex3="[\\s\\S]*(?=解救)[\\s\\S]{0,6}(?=治疗)[\\s\\S]*";
-        String rex4="[\\s\\S]*(?=恶性)[\\s\\S]{0,6}(?=肿瘤)[\\s\\S]{0,10}(?=全身)[\\s\\S]{0,6}(?=治疗)[\\s\\S]*";
-        String rex5="[\\s\\S]*(?=化)[\\s\\S]{0,6}(?=疗)[\\s\\S]*";
+        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]*(?=恶性)[^,;,;。]{0,7}(?=肿瘤)[^,;,;。]{0,7}(?=全身)[^,;,;。]{0,7}(?=治疗)[\\s\\S]*";
+        String rex5="[\\s\\S]*(?=化)[^,;,;。]{0,7}(?=疗)[\\s\\S]*";
         if(str.contains("肉瘤") || str.contains("淋巴瘤") || str.contains("白血病") || str.contains("癌") || str.contains("canser") ||
                 str.matches(rex1) ||str.matches(rex2) ||str.matches(rex3) ||str.matches(rex4)||str.contains("can")||str.contains("CA")||str.matches(rex5)){
             return true;
@@ -224,8 +224,8 @@ public class THR03123 extends QCCatalogue {
             return false;
         }
         String str = Str(string);
-        String rex1="[\\s\\S]*(?=化)[\\s\\S]{0,6}(?=疗)[\\s\\S]*";
-        String rex2="[\\s\\S]*(?=放)[\\s\\S]{0,6}(?=疗)[\\s\\S]*";
+        String rex1="[\\s\\S]*(?=化)[^,;,;。]{0,7}(?=疗)[\\s\\S]*";
+        String rex2="[\\s\\S]*(?=放)[^,;,;。]{0,7}(?=疗)[\\s\\S]*";
         if(str.contains("伽马刀") || str.contains("γ刀") || str.contains("粒子植入") || str.contains("立体定向放射") || str.contains("三维适形调强放疗")
                 || str.matches(rex1) ||  str.matches(rex2) ||str.contains("IMRT") ||str.contains("SRT") || str.contains("靶区勾画")
                 ||  str.contains("腹腔灌注")