|
@@ -65,10 +65,10 @@ public class THR03079 extends QCCatalogue {
|
|
|
.collect(Collectors.toList());
|
|
|
docAdvStruct.removeIf(x -> StringUtil.isNotBlank(x.get("给药方式")) && !filterKey.contains(x.get("给药方式")));
|
|
|
|
|
|
- //抗生素及开医嘱时间 <抗生素名,<抗生素用量,[抗生素使用时间...]>>
|
|
|
+ //激素及开医嘱时间 <激素名,<激素用量,[激素使用时间...]>>
|
|
|
Map<String, Map<String, List<Double>>> antibioticInfo = Maps.newLinkedHashMap();
|
|
|
Map<String, Map<Date, Integer>> antibioticDateTimes = Maps.newHashMap();
|
|
|
- //记录同一抗生素同一天内是否开过多次,用于医嘱中需要处理的抗生素过滤(一天内同一抗生素开过多次的抗生素直接过滤)
|
|
|
+ //记录同一激素同一天内是否开过多次,用于医嘱中需要处理的激素过滤(一天内同一激素开过多次的激素直接过滤)
|
|
|
getAntibioticTimes(docAdvStruct, antibioticDateTimes);
|
|
|
String drugName = null, value = null, startDateStr = null;
|
|
|
Date startDate = null;
|
|
@@ -76,24 +76,25 @@ public class THR03079 extends QCCatalogue {
|
|
|
drugName = structMap.get("医嘱项目名称");
|
|
|
value = structMap.get("医嘱单次剂量");
|
|
|
startDateStr = structMap.get("医嘱开始时间");
|
|
|
- startDate = DateUtil.dateZeroClear(StringUtil.parseDateTime(startDateStr));
|
|
|
- if (extData != null && extData.containsKey(startDate) && extData.get(startDate).equals(drugName)) {
|
|
|
- continue; //THR02985 医嘱有抗生素使用病程无记录,规则中没报未记录的抗生素继续走这条规则,报未记录的抗生素过滤
|
|
|
- }
|
|
|
- if (antibioticDateTimes.get(drugName).get(startDate) > 0) {
|
|
|
- continue; //一天内同一抗生素开过多次的抗生素直接过滤
|
|
|
- }
|
|
|
+ startDate = DateUtil.parseDateTime(startDateStr);
|
|
|
drugName = removeBracket(drugName).replaceAll("[^\u4e00-\u9fa5]", "");
|
|
|
String drugStandardWord = similarityUtil.getDrugStandardWord(drugName);
|
|
|
if (StringUtil.isNotBlank(drugStandardWord)) {
|
|
|
drugName = drugStandardWord;
|
|
|
}
|
|
|
+ if (extData != null && extData.containsKey(startDate) && extData.get(startDate).equals(drugName)) {
|
|
|
+ continue; //THR02986 医嘱有激素使用病程无记录,规则中没报未记录的激素继续走这条规则,报未记录的激素过滤
|
|
|
+ }
|
|
|
+ startDate = DateUtil.dateZeroClear(StringUtil.parseDateTime(startDateStr));
|
|
|
+ if (antibioticDateTimes.get(drugName).get(startDate) > 0) {
|
|
|
+ continue; //一天内同一激素开过多次的激素直接过滤
|
|
|
+ }
|
|
|
if (drugName.contains("甲泼尼龙") || drugName.contains("泼尼松") || drugName.contains("地塞米松") || drugName.contains("可的松")) {
|
|
|
collectAntibioticInfo(antibioticInfo, structMap.get("医嘱项目名称"), value, startDateStr);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- //抗生素及开医嘱时间 <抗生素名,<抗生素用量,[抗生素使用时间...]>>
|
|
|
+ //激素及开医嘱时间 <激素名,<激素用量,[激素使用时间...]>>
|
|
|
Map<String, Map<String, List<Double>>> antibioticWardInfo = Maps.newLinkedHashMap();
|
|
|
String dateStr = null;
|
|
|
/*********************************************首程治疗计划********************************************************/
|
|
@@ -157,10 +158,10 @@ public class THR03079 extends QCCatalogue {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 1.医嘱中开了抗生素,查房记录中没有该抗生素,则医嘱中该抗生素出现过的所有时间都会提示出来
|
|
|
- * 2.医嘱中开了抗生素,查房记录中有该抗生素:
|
|
|
- * 2.1 医嘱中该抗生素某使用量(如50),查房记录中没有该使用量(如只有100),则医嘱中该抗生素使用量出现过的所有时间都会提示出来
|
|
|
- * 2.2 医嘱中该抗生素某使用量(如50),查房记录中也有该使用量,对比这两个时间,若医嘱时间两天内的查房记录没有该使用量,则该医嘱时间会提示出来
|
|
|
+ * 1.医嘱中开了激素,查房记录中没有该激素,则医嘱中该激素出现过的所有时间都会提示出来
|
|
|
+ * 2.医嘱中开了激素,查房记录中有该激素:
|
|
|
+ * 2.1 医嘱中该激素某使用量(如50),查房记录中没有该使用量(如只有100),则医嘱中该激素使用量出现过的所有时间都会提示出来
|
|
|
+ * 2.2 医嘱中该激素某使用量(如50),查房记录中也有该使用量,对比这两个时间,若医嘱时间两天内的查房记录没有该使用量,则该医嘱时间会提示出来
|
|
|
*/
|
|
|
StringBuffer sb = new StringBuffer();
|
|
|
String drugKey = null;
|
|
@@ -183,7 +184,7 @@ 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
|
|
|
+ adDate = DateUtil.dateZeroClear(adDate);
|
|
|
if ((adDate.before(wardDate) && !CatalogueUtil.compareTime(adDate, wardDate, 48 * 60L))
|
|
|
|| (wardDate.before(adDate) && !CatalogueUtil.compareTime(wardDate, adDate, 24 * 60L))) {
|
|
|
boolean isWard = false;
|
|
@@ -210,11 +211,10 @@ public class THR03079 extends QCCatalogue {
|
|
|
status.set("-1");
|
|
|
info.set("医嘱:" + sb.toString().substring(0, sb.toString().length() - 1));
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 记录同一抗生素同一天内是否开过多次,用于医嘱中需要处理的抗生素过滤(一天内同一抗生素开过多次的抗生素直接过滤)
|
|
|
+ * 记录同一激素同一天内是否开过多次,用于医嘱中需要处理的激素过滤(一天内同一激素开过多次的激素直接过滤)
|
|
|
*
|
|
|
* @param docAdvStruct
|
|
|
* @param antibioticDateTimes
|
|
@@ -228,6 +228,10 @@ public class THR03079 extends QCCatalogue {
|
|
|
drugName = structMap.get("医嘱项目名称");
|
|
|
startDateStr = structMap.get("医嘱开始时间");
|
|
|
startDate = DateUtil.dateZeroClear(StringUtil.parseDateTime(startDateStr));
|
|
|
+ String drugStandardWord = similarityUtil.getDrugStandardWord(drugName);
|
|
|
+ if (StringUtil.isNotBlank(drugStandardWord)) {
|
|
|
+ drugName = drugStandardWord;
|
|
|
+ }
|
|
|
if (antibioticDateTimes.containsKey(drugName)) {
|
|
|
Map<Date, Integer> map = antibioticDateTimes.get(drugName);
|
|
|
if (map.containsKey(startDate)) {
|
|
@@ -270,12 +274,12 @@ public class THR03079 extends QCCatalogue {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 收集抗生素各种信息
|
|
|
+ * 收集激素各种信息
|
|
|
*
|
|
|
- * @param antibioticInfo 抗生素使用量及所有时间
|
|
|
- * @param drugName 抗生素名称
|
|
|
- * @param value 抗生素用量
|
|
|
- * @param startDateStr 抗生素使用时间(医嘱开始时间或查房时间)
|
|
|
+ * @param antibioticInfo 激素使用量及所有时间
|
|
|
+ * @param drugName 激素名称
|
|
|
+ * @param value 激素用量
|
|
|
+ * @param startDateStr 激素使用时间(医嘱开始时间或查房时间)
|
|
|
*/
|
|
|
private void collectAntibioticInfo(Map<String, Map<String, List<Double>>> antibioticInfo, String drugName, String value, String startDateStr) {
|
|
|
Map<String, List<Double>> antibioticValueList = null;
|
|
@@ -292,17 +296,17 @@ public class THR03079 extends QCCatalogue {
|
|
|
v = v / 1000;
|
|
|
}
|
|
|
if (!antibioticInfo.containsKey(drugName)) {
|
|
|
- //存该抗生素使用第1个值
|
|
|
+ //存该激素使用第1个值
|
|
|
antibioticValueList = Maps.newLinkedHashMap();
|
|
|
antibioticValueList.put(startDateStr, Lists.newArrayList(v));
|
|
|
antibioticInfo.put(drugName, antibioticValueList);
|
|
|
} else {
|
|
|
antibioticValueList = antibioticInfo.get(drugName);
|
|
|
- //存该抗生素使用时间时第n个量
|
|
|
+ //存该激素使用时间时第n个量
|
|
|
if (antibioticValueList.containsKey(startDateStr)) {
|
|
|
antibioticValueList.get(startDateStr).add(v);
|
|
|
} else {
|
|
|
- //存该抗生素使用时间时第1个量
|
|
|
+ //存该激素使用时间时第1个量
|
|
|
antibioticValueList.put(startDateStr, Lists.newArrayList(v));
|
|
|
}
|
|
|
}
|