|
@@ -24,10 +24,7 @@ import com.lantone.qc.pub.util.StringUtil;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
-import java.util.Date;
|
|
|
-import java.util.List;
|
|
|
-import java.util.Map;
|
|
|
-import java.util.Objects;
|
|
|
+import java.util.*;
|
|
|
import java.util.regex.Matcher;
|
|
|
import java.util.regex.Pattern;
|
|
|
import java.util.stream.Collectors;
|
|
@@ -64,7 +61,7 @@ public class THR03079 extends QCCatalogue {
|
|
|
.filter(Objects::nonNull)
|
|
|
.map(DoctorAdviceDoc::getStructureMap)
|
|
|
.filter(x -> StringUtil.isNotBlank(x.get("药品类型")) && x.get("药品类型").contains("激素") && StringUtil.isNotBlank(x.get("医嘱单次剂量")))
|
|
|
- .filter(x -> StringUtil.isNotBlank(x.get("医嘱状态判别")) && !x.get("医嘱状态判别").contains("已停止"))
|
|
|
+// .filter(x -> StringUtil.isNotBlank(x.get("医嘱状态判别")) && !x.get("医嘱状态判别").contains("已停止"))
|
|
|
.collect(Collectors.toList());
|
|
|
docAdvStruct.removeIf(x -> StringUtil.isNotBlank(x.get("给药方式")) && !filterKey.contains(x.get("给药方式")));
|
|
|
|
|
@@ -86,17 +83,14 @@ public class THR03079 extends QCCatalogue {
|
|
|
if (antibioticDateTimes.get(drugName).get(startDate) > 0) {
|
|
|
continue; //一天内同一抗生素开过多次的抗生素直接过滤
|
|
|
}
|
|
|
-// drugName = removeBracket(drugName).replaceAll("[^\u4e00-\u9fa5]", "");
|
|
|
-// String drugStandardWord = similarityUtil.getDrugStandardWord(drugName);
|
|
|
-// if (StringUtil.isNotBlank(drugStandardWord)) {
|
|
|
-// drugName = drugStandardWord;
|
|
|
-// }
|
|
|
+ drugName = removeBracket(drugName).replaceAll("[^\u4e00-\u9fa5]", "");
|
|
|
+ String drugStandardWord = similarityUtil.getDrugStandardWord(drugName);
|
|
|
+ if (StringUtil.isNotBlank(drugStandardWord)) {
|
|
|
+ drugName = drugStandardWord;
|
|
|
+ }
|
|
|
if (drugName.contains("甲泼尼龙") || drugName.contains("泼尼松") || drugName.contains("地塞米松") || drugName.contains("可的松")) {
|
|
|
-// doctorAdviceDrugMap.put(startDate, adviceDoc.get("医嘱项目名称"));
|
|
|
- collectAntibioticInfo(antibioticInfo, drugName, value, startDateStr);
|
|
|
+ collectAntibioticInfo(antibioticInfo, structMap.get("医嘱项目名称"), value, startDateStr);
|
|
|
}
|
|
|
-
|
|
|
-// collectAntibioticInfo(antibioticInfo, drugName, value, startDateStr);
|
|
|
}
|
|
|
|
|
|
//抗生素及开医嘱时间 <抗生素名,<抗生素用量,[抗生素使用时间...]>>
|
|
@@ -189,19 +183,26 @@ public class THR03079 extends QCCatalogue {
|
|
|
String wardDateStr = wdvMap.getKey();
|
|
|
Date wardDate = StringUtil.parseDateTime(wardDateStr);
|
|
|
List<Double> wardUsage = wdvMap.getValue();
|
|
|
+ wardUsage.removeAll(adUsage);//比如adUsage有1.0、2.0,wardUsage中有2.0、3.0,removeAll之后wardUsage只剩3.0
|
|
|
if ((adDate.before(wardDate) && !CatalogueUtil.compareTime(adDate, wardDate, 48 * 60L))
|
|
|
|| (wardDate.before(adDate) && !CatalogueUtil.compareTime(wardDate, adDate, 24 * 60L))) {
|
|
|
+ boolean isWard = false;
|
|
|
wardUsage.removeAll(adUsage);//比如adUsage有1.0、2.0,wardUsage中有2.0、3.0,removeAll之后wardUsage只剩3.0
|
|
|
if (wardUsage.size() == 0) {
|
|
|
- match = true;
|
|
|
- }
|
|
|
- adDateStr = DateUtil.formatDate(adDate);
|
|
|
- if (!match && wardUsage.size() > 0 && !sb.toString().contains(drugKey + "(" + adDateStr + ")")) {
|
|
|
- infoAppend(sb, ai.getKey(), adDateStr);
|
|
|
- break;
|
|
|
+ isWard = true;
|
|
|
}
|
|
|
+// adDateStr = DateUtil.formatDate(adDate);
|
|
|
+// if (!match && wardUsage.size() > 0 && !sb.toString().contains(drugKey + "(" + adDateStr + ")")) {
|
|
|
+// infoAppend(sb, ai.getKey(), adDateStr);
|
|
|
+// }
|
|
|
+ match = isWard;
|
|
|
}
|
|
|
}
|
|
|
+ adDateStr = DateUtil.formatDate(adDate);
|
|
|
+ if (!match && !sb.toString().contains(drugKey + "(" + adDateStr + ")")) {
|
|
|
+ infoAppend(sb, ai.getKey(), adDateStr);
|
|
|
+ break;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -210,6 +211,7 @@ public class THR03079 extends QCCatalogue {
|
|
|
status.set("-1");
|
|
|
info.set("医嘱:" + sb.toString().substring(0, sb.toString().length() - 1));
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
|
|
|
/**
|