|
@@ -45,7 +45,7 @@ public class THR03075 extends QCCatalogue {
|
|
//抗生素减用集合 key:抗生素名 value: 0:未减用,1及以上:减用次数
|
|
//抗生素减用集合 key:抗生素名 value: 0:未减用,1及以上:减用次数
|
|
Map<String, Integer> antibioticStatus = Maps.newHashMap();
|
|
Map<String, Integer> antibioticStatus = Maps.newHashMap();
|
|
//抗生素及各初始剂量 key:抗生素名 value:抗生素第一次使用时剂量
|
|
//抗生素及各初始剂量 key:抗生素名 value:抗生素第一次使用时剂量
|
|
- Map<String, Double> antibioticValue = Maps.newHashMap();
|
|
|
|
|
|
+ Map<String, List<Double>> antibioticValue = Maps.newHashMap();
|
|
|
|
|
|
List<Map<String, String>> docAdvStruct = doctorAdviceDocs
|
|
List<Map<String, String>> docAdvStruct = doctorAdviceDocs
|
|
.stream()
|
|
.stream()
|
|
@@ -88,7 +88,7 @@ public class THR03075 extends QCCatalogue {
|
|
//查房记录中抗生素减用集合 key:抗生素名 value: 0:未减用,1及以上:减用次数
|
|
//查房记录中抗生素减用集合 key:抗生素名 value: 0:未减用,1及以上:减用次数
|
|
Map<String, Integer> antibioticStatusWard = Maps.newHashMap();
|
|
Map<String, Integer> antibioticStatusWard = Maps.newHashMap();
|
|
//查房记录中抗生素及各初始剂量 key:抗生素名 value:抗生素第一次使用时剂量
|
|
//查房记录中抗生素及各初始剂量 key:抗生素名 value:抗生素第一次使用时剂量
|
|
- Map<String, Double> antibioticValueWard = Maps.newHashMap();
|
|
|
|
|
|
+ Map<String, List<Double>> antibioticValueWard = Maps.newHashMap();
|
|
List<ThreeLevelWardDoc> allDoctorWradDocs = threeLevelWardDocs.get(0).getAllDoctorWradDocs();
|
|
List<ThreeLevelWardDoc> allDoctorWradDocs = threeLevelWardDocs.get(0).getAllDoctorWradDocs();
|
|
for (ThreeLevelWardDoc doc : allDoctorWradDocs) {
|
|
for (ThreeLevelWardDoc doc : allDoctorWradDocs) {
|
|
if (doc.getThreeLevelWardLabel().size() == 0) {
|
|
if (doc.getThreeLevelWardLabel().size() == 0) {
|
|
@@ -110,11 +110,11 @@ public class THR03075 extends QCCatalogue {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
//把查房记录中没减用过的抗生素删除
|
|
//把查房记录中没减用过的抗生素删除
|
|
- for (Map.Entry<String, Integer> as : antibioticStatusWard.entrySet()) {
|
|
|
|
|
|
+ /*for (Map.Entry<String, Integer> as : antibioticStatusWard.entrySet()) {
|
|
if (as.getValue() == 0) {
|
|
if (as.getValue() == 0) {
|
|
antibioticDateWard.remove(as.getKey());
|
|
antibioticDateWard.remove(as.getKey());
|
|
}
|
|
}
|
|
- }
|
|
|
|
|
|
+ }*/
|
|
|
|
|
|
List<String> miss = Lists.newArrayList();
|
|
List<String> miss = Lists.newArrayList();
|
|
String drugKey = null, start = null, change = null, wardStartStr = null, wardChangeStr = null;
|
|
String drugKey = null, start = null, change = null, wardStartStr = null, wardChangeStr = null;
|
|
@@ -125,14 +125,25 @@ public class THR03075 extends QCCatalogue {
|
|
miss.add(drugKey);
|
|
miss.add(drugKey);
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
|
|
+ List<Double> antibioticValueList = antibioticValue.get(drugKey);
|
|
|
|
+ List<Double> antibioticValueWardList = antibioticValueWard.get(drugKey);
|
|
|
|
+ int findNum = 0;
|
|
|
|
+ for (int i = 1; i < antibioticValueList.size(); i++) {//从减用的值开始,如果减用过的值查房记录中都有,则不报该药
|
|
|
|
+ if (antibioticValueWardList.contains(antibioticValueList.get(i))) {
|
|
|
|
+ findNum++;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if (findNum == antibioticValueList.size() - 1) {
|
|
|
|
+ continue;
|
|
|
|
+ }
|
|
dateList = ad.getValue();
|
|
dateList = ad.getValue();
|
|
int matchNum = 0;
|
|
int matchNum = 0;
|
|
|
|
+ List<String> wardDateStr = antibioticDateWard.get(drugKey);
|
|
for (int i = 0; i < dateList.size() - 1; i++) {
|
|
for (int i = 0; i < dateList.size() - 1; i++) {
|
|
start = dateList.get(i); //抗生素开医嘱时间
|
|
start = dateList.get(i); //抗生素开医嘱时间
|
|
change = dateList.get(i + 1); //抗生素用量改变时间
|
|
change = dateList.get(i + 1); //抗生素用量改变时间
|
|
Date adStart = StringUtil.parseDateTime(start);
|
|
Date adStart = StringUtil.parseDateTime(start);
|
|
Date adChange = StringUtil.parseDateTime(change);
|
|
Date adChange = StringUtil.parseDateTime(change);
|
|
- List<String> wardDateStr = antibioticDateWard.get(drugKey);
|
|
|
|
for (int j = 0; j < wardDateStr.size() - 1; j++) {
|
|
for (int j = 0; j < wardDateStr.size() - 1; j++) {
|
|
wardStartStr = wardDateStr.get(j); //查房记录开抗生素时间
|
|
wardStartStr = wardDateStr.get(j); //查房记录开抗生素时间
|
|
wardChangeStr = wardDateStr.get(j + 1); //查房记录改变抗生素用量时间
|
|
wardChangeStr = wardDateStr.get(j + 1); //查房记录改变抗生素用量时间
|
|
@@ -164,7 +175,7 @@ public class THR03075 extends QCCatalogue {
|
|
* @param value 抗生素用量
|
|
* @param value 抗生素用量
|
|
* @param startDateStr 抗生素使用时间(医嘱开始时间或查房时间)
|
|
* @param startDateStr 抗生素使用时间(医嘱开始时间或查房时间)
|
|
*/
|
|
*/
|
|
- private void collectAntibioticInfo(Map<String, List<String>> antibioticDate, Map<String, Integer> antibioticStatus, Map<String, Double> antibioticValue, String drugName, String value, String startDateStr) {
|
|
|
|
|
|
+ private void collectAntibioticInfo(Map<String, List<String>> antibioticDate, Map<String, Integer> antibioticStatus, Map<String, List<Double>> antibioticValue, String drugName, String value, String startDateStr) {
|
|
double v = -1;
|
|
double v = -1;
|
|
try {
|
|
try {
|
|
v = Double.parseDouble(getNumber(value));
|
|
v = Double.parseDouble(getNumber(value));
|
|
@@ -175,13 +186,14 @@ public class THR03075 extends QCCatalogue {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
if (!antibioticValue.containsKey(drugName)) {
|
|
if (!antibioticValue.containsKey(drugName)) {
|
|
- antibioticValue.put(drugName, v);
|
|
|
|
|
|
+ antibioticValue.put(drugName, Lists.newArrayList(v));
|
|
antibioticDate.put(drugName, Lists.newArrayList(startDateStr));
|
|
antibioticDate.put(drugName, Lists.newArrayList(startDateStr));
|
|
antibioticStatus.put(drugName, 0);
|
|
antibioticStatus.put(drugName, 0);
|
|
} else {
|
|
} else {
|
|
- double beforeValue = antibioticValue.get(drugName);
|
|
|
|
- if (beforeValue > v) {
|
|
|
|
- antibioticValue.put(drugName, v);//更新该抗生素使用值为更小的值
|
|
|
|
|
|
+ List<Double> beforeValue = antibioticValue.get(drugName);
|
|
|
|
+ if (beforeValue.get(beforeValue.size() - 1) > v) {
|
|
|
|
+ beforeValue.add(v);
|
|
|
|
+ antibioticValue.put(drugName, beforeValue);//添减该抗生素更小的值
|
|
antibioticStatus.put(drugName, antibioticStatus.get(drugName) + 1);
|
|
antibioticStatus.put(drugName, antibioticStatus.get(drugName) + 1);
|
|
antibioticDate.get(drugName).add(startDateStr);
|
|
antibioticDate.get(drugName).add(startDateStr);
|
|
}
|
|
}
|