Browse Source

Merge remote-tracking branch 'origin/beilun/dev' into beilun/dev

fangqw 4 years ago
parent
commit
462b3df02c

+ 28 - 4
kernel/src/main/java/com/lantone/qc/kernel/catalogue/beilun/threelevelward/THR03077.java

@@ -276,7 +276,7 @@ public class THR03077 extends QCCatalogue {
         }
     }
 
-    List<String> usageWords = Lists.newArrayList("WB", "wb", "泵","静滴");
+    List<String> usageWords = Lists.newArrayList("WB", "wb", "泵", "静滴");
 
     /**
      * 收集各模块药品信息
@@ -289,6 +289,8 @@ public class THR03077 extends QCCatalogue {
         StringBuffer sb = null;
         for (Drug drug : drugs) {
             sb = new StringBuffer();
+            String behindWord = "";
+            String lastBehindWord = "";
             String wardDrug = drug.getName();
             int position = content.indexOf(wardDrug);
             int lastPosition = content.lastIndexOf(wardDrug);
@@ -304,8 +306,8 @@ public class THR03077 extends QCCatalogue {
                     continue;
                 }
 
-                String behindWord = content.substring(position, Math.min(position + 15, content.toCharArray().length));
-                String lastBehindWord = content.substring(lastPosition, Math.min(lastPosition + 10, content.toCharArray().length));
+                behindWord = content.substring(position, Math.min(position + 20, content.toCharArray().length));
+                lastBehindWord = content.substring(lastPosition, Math.min(lastPosition + 20, content.toCharArray().length));
                 if (behindWord != lastBehindWord) {
                     if (lastBehindWord.contains("阴性")) {
                         continue;
@@ -322,8 +324,15 @@ public class THR03077 extends QCCatalogue {
                 wardDrug = drugStandardWord;
             }
             if (drug.getConsumption() == null) {
-                concatInfo(dateStr, sb, "用量");
+                if (StringUtil.isBlank(behindWord)) {
+                    concatInfo(dateStr, sb, "用量");
+                } else {
+                    if (!hasDigit(behindWord) && !hasDigit(lastBehindWord)) {
+                        concatInfo(dateStr, sb, "用量");
+                    }
+                }
             }
+
             int index = content.indexOf(drugUsageWard);
             String drugContent = content.substring(Math.max(0, index));
             boolean isUsage = true;
@@ -351,6 +360,21 @@ public class THR03077 extends QCCatalogue {
         }
     }
 
+    /**
+     * 判断一个字符串是否含有数字
+     *
+     * @param content
+     */
+    public boolean hasDigit(String content) {
+        boolean flag = false;
+        Pattern p = Pattern.compile(".*\\d+.*");
+        Matcher m = p.matcher(content);
+        if (m.matches()) {
+            flag = true;
+        }
+        return flag;
+    }
+
     /**
      * 拼接抗生素缺失信息
      *

+ 2 - 1
trans/src/main/java/com/lantone/qc/trans/beilun/util/BeiLunThreeLevelWardHtmlAnalysis.java

@@ -40,7 +40,8 @@ public class BeiLunThreeLevelWardHtmlAnalysis implements BeiLunHtmlAnalysis {
             }
             String htmlText = BeiLunHtmlAnalysisUtil.blockDivToStr(bigDivElement, true);
             htmlText = htmlText.replace("注意:上级医师查房主要记 录:患者病情、诊断、鉴别诊断、当前治疗措施和疗效的分析及下一步诊疗意见等,能反应上级医 师的水平。", "")
-                    .replace("提醒:有创诊疗操作记录内容包括操作名称、时间、步骤、结果及患者的一般情况,记录操作过 程是否顺利,有无不良反应,术后注意事项,操作医师签名、记录时间等。 手术室完成的、治疗性质的及全麻下完成的有创诊疗操作参照手术管理。(包括介入治疗、胃肠镜 下肿瘤切除/粘膜下肿瘤剥除等)", "");
+                    .replace("提醒:有创诊疗操作记录内容包括操作名称、时间、步骤、结果及患者的一般情况,记录操作过 程是否顺利,有无不良反应,术后注意事项,操作医师签名、记录时间等。 手术室完成的、治疗性质的及全麻下完成的有创诊疗操作参照手术管理。(包括介入治疗、胃肠镜 下肿瘤切除/粘膜下肿瘤剥除等)", "")
+                    .replace(" ", "");
             CommonAnalysisUtil.extractWardInfo(recTitle, htmlText, structureMap);
             BeiLunHtmlAnalysisUtil.insertModuleId(modeId, recTypeId, structureMap);
         } catch (Exception e) {