|
@@ -2,6 +2,7 @@ package com.lantone.qc.kernel.catalogue.threelevelward;
|
|
|
|
|
|
import com.google.common.collect.Lists;
|
|
import com.google.common.collect.Lists;
|
|
import com.google.common.collect.Maps;
|
|
import com.google.common.collect.Maps;
|
|
|
|
+import com.google.common.collect.Sets;
|
|
import com.lantone.qc.kernel.catalogue.QCCatalogue;
|
|
import com.lantone.qc.kernel.catalogue.QCCatalogue;
|
|
import com.lantone.qc.kernel.util.CatalogueUtil;
|
|
import com.lantone.qc.kernel.util.CatalogueUtil;
|
|
import com.lantone.qc.kernel.util.SimilarityUtil;
|
|
import com.lantone.qc.kernel.util.SimilarityUtil;
|
|
@@ -172,6 +173,7 @@ public class THR02985 extends QCCatalogue {
|
|
|
|
|
|
StringBuffer sb = new StringBuffer();
|
|
StringBuffer sb = new StringBuffer();
|
|
Map<Object, Object> data = Maps.newHashMap();
|
|
Map<Object, Object> data = Maps.newHashMap();
|
|
|
|
+ Set<String> existDrug = Sets.newHashSet();
|
|
String infoStr = "";
|
|
String infoStr = "";
|
|
for (Map.Entry<Date, String> doctorAdviceDrug : doctorAdviceDrugMap.entrySet()) {
|
|
for (Map.Entry<Date, String> doctorAdviceDrug : doctorAdviceDrugMap.entrySet()) {
|
|
Date doctorAdviceDate = doctorAdviceDrug.getKey();
|
|
Date doctorAdviceDate = doctorAdviceDrug.getKey();
|
|
@@ -185,7 +187,7 @@ public class THR02985 extends QCCatalogue {
|
|
/**********************************************先文本匹配************************************************/
|
|
/**********************************************先文本匹配************************************************/
|
|
String missDrug = "";
|
|
String missDrug = "";
|
|
for (Map.Entry<String, Date> map : info.entrySet()) {
|
|
for (Map.Entry<String, Date> map : info.entrySet()) {
|
|
- missDrug = getMissDrug(map.getKey(), map.getValue(), doctorAdviceDate, splitDrugs, 2, missDrug);
|
|
|
|
|
|
+ missDrug = getMissDrug(map.getKey(), map.getValue(), doctorAdviceDate, splitDrugs, 2, missDrug, existDrug);
|
|
//当前抗生素药(drugs)在info中已找到,直接跳出当前循环
|
|
//当前抗生素药(drugs)在info中已找到,直接跳出当前循环
|
|
if (StringUtil.isBlank(missDrug)) {
|
|
if (StringUtil.isBlank(missDrug)) {
|
|
break;
|
|
break;
|
|
@@ -294,7 +296,7 @@ public class THR02985 extends QCCatalogue {
|
|
* @param days
|
|
* @param days
|
|
* @return 如果文本中找到该药,则返回空字符串
|
|
* @return 如果文本中找到该药,则返回空字符串
|
|
*/
|
|
*/
|
|
- private String getMissDrug(String content, Date wardDate, Date doctorAdviceDate, Set<String> drugs, int days, String missDrug) {
|
|
|
|
|
|
+ private String getMissDrug(String content, Date wardDate, Date doctorAdviceDate, Set<String> drugs, int days, String missDrug, Set<String> existDrug) {
|
|
if ("时间不匹配".equals(missDrug)) {
|
|
if ("时间不匹配".equals(missDrug)) {
|
|
missDrug = "";//初始化缺失药物
|
|
missDrug = "";//初始化缺失药物
|
|
}
|
|
}
|
|
@@ -307,9 +309,10 @@ public class THR02985 extends QCCatalogue {
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
if (content.contains(drug.replaceAll("[^\\u4e00-\\u9fa5]", ""))
|
|
if (content.contains(drug.replaceAll("[^\\u4e00-\\u9fa5]", ""))
|
|
- || regexFind(content, "继续", "治疗") || regexFind(content, "维持", "治疗")
|
|
|
|
- || regexFind(content, "继续", "抗感染") || regexFind(content, "治疗", "同前")) {
|
|
|
|
|
|
+ || (existDrug.contains(drug) && (regexFind(content, "继续", "治疗") || regexFind(content, "维持", "治疗")
|
|
|
|
+ || regexFind(content, "继续", "抗感染") || regexFind(content, "治疗", "同前")))) {
|
|
findDrug = true;
|
|
findDrug = true;
|
|
|
|
+ existDrug.add(drug);
|
|
break;
|
|
break;
|
|
} else {
|
|
} else {
|
|
missDrug = concatInfo(missDrug, drug);
|
|
missDrug = concatInfo(missDrug, drug);
|