|
@@ -10,6 +10,7 @@ import com.lantone.qc.pub.model.doc.FirstCourseRecordDoc;
|
|
|
import com.lantone.qc.pub.model.doc.LeaveHospitalDoc;
|
|
|
import com.lantone.qc.pub.model.doc.PacsDoc;
|
|
|
import com.lantone.qc.pub.model.doc.ThreeLevelWardDoc;
|
|
|
+import com.lantone.qc.pub.util.DateUtil;
|
|
|
import com.lantone.qc.pub.util.StringUtil;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
@@ -36,11 +37,13 @@ public class THR03071 extends QCCatalogue {
|
|
|
StringBuffer sb = new StringBuffer();
|
|
|
Map<String, List<String>> pacsMap = Maps.newHashMap();
|
|
|
Map<String, Integer> pacsCount = Maps.newHashMap();
|
|
|
+ Map<String, List<String>> pacsDate = Maps.newHashMap();
|
|
|
String splitRegex = "[;;]";
|
|
|
for (PacsDoc pacsDoc : pacsDocs) {
|
|
|
Map<String, String> structureMap = pacsDoc.getStructureMap();
|
|
|
String itemName = structureMap.get("报告名称");
|
|
|
String itemDiag = structureMap.get("检查结果诊断");
|
|
|
+ String itemDate = structureMap.get("报告创建时间");
|
|
|
if (StringUtil.isBlank(itemName) || StringUtil.isBlank(itemDiag)) {
|
|
|
continue;
|
|
|
}
|
|
@@ -49,10 +52,13 @@ public class THR03071 extends QCCatalogue {
|
|
|
// }
|
|
|
String[] itemDiags = itemDiag.split(splitRegex);
|
|
|
List<String> itemDiagList = Lists.newArrayList(itemDiags);
|
|
|
+ List<String> itemDateList = Lists.newArrayList(itemDate);
|
|
|
if (pacsMap.containsKey(itemName)) {
|
|
|
pacsMap.get(itemName).addAll(itemDiagList);
|
|
|
+ pacsDate.get(itemName).addAll(itemDateList);
|
|
|
} else {
|
|
|
pacsMap.put(itemName, itemDiagList);
|
|
|
+ pacsDate.put(itemName, itemDateList);
|
|
|
}
|
|
|
}
|
|
|
//检查项目对应数据初始化
|
|
@@ -78,21 +84,22 @@ public class THR03071 extends QCCatalogue {
|
|
|
findPacs(pacsMap, pacsCount, content);
|
|
|
}
|
|
|
|
|
|
+ String reptNm = null;
|
|
|
List<String> pacsMiss = Lists.newArrayList();
|
|
|
for (Map.Entry<String, Integer> pacs : pacsCount.entrySet()) {
|
|
|
+ reptNm = pacs.getKey().split("=")[0];
|
|
|
if (pacs.getValue() == 0) {
|
|
|
pacsMiss.add(pacs.getKey());
|
|
|
}
|
|
|
-
|
|
|
- infoAppend(sb,pacsMiss.get(0));
|
|
|
+ if (pacsMiss.size() > 0) {
|
|
|
+ infoAppend(sb, reptNm, pacsDate);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
- if (pacsMiss.size() > 0) {
|
|
|
+ if (sb.toString().length() > 0) {
|
|
|
status.set("-1");
|
|
|
-// info.set(pacsMiss.toString().replaceAll("[\\[\\]]", ""));
|
|
|
- info.set("医嘱:"+sb.toString());
|
|
|
+ info.set("检查:" + sb.toString().substring(0, sb.toString().length() - 1));
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -112,25 +119,23 @@ public class THR03071 extends QCCatalogue {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-// /**
|
|
|
-// * 拼接提示信息
|
|
|
-// *
|
|
|
-// * @param sb
|
|
|
-// * @param drugKey
|
|
|
-// * @param date
|
|
|
-// */
|
|
|
-// private void infoAppend(StringBuffer sb, String drugKey, String date) {
|
|
|
-// sb.append(drugKey).append("(").append(date).append(")").append("、");
|
|
|
-// }
|
|
|
+
|
|
|
/**
|
|
|
- * 拼接提示信息
|
|
|
- *
|
|
|
- * @param sb
|
|
|
- * @param drugKey
|
|
|
- * @param date
|
|
|
- */
|
|
|
- private void infoAppend(StringBuffer sb, String drugKey) {
|
|
|
- sb.append(drugKey).append("、");
|
|
|
+ * 拼接提示信息
|
|
|
+ *
|
|
|
+ * @param sb
|
|
|
+ * @param reptNm
|
|
|
+ * @param pacsDate
|
|
|
+ */
|
|
|
+ private void infoAppend(StringBuffer sb, String reptNm, Map<String, List<String>> pacsDate) {
|
|
|
+
|
|
|
+ for (Map.Entry<String, List<String>> map : pacsDate.entrySet()) {
|
|
|
+ if (reptNm.equals(map.getKey())) {
|
|
|
+ for (String date : map.getValue()) {
|
|
|
+ sb.append(reptNm).append("(").append(DateUtil.formatDate(StringUtil.parseDateTime(date))).append(")").append("、");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
}
|