|
@@ -34,12 +34,12 @@ public class THR0131 extends QCCatalogue {
|
|
|
return;
|
|
|
}
|
|
|
List<ThreeLevelWardDoc> threeLevelWardDocs = inputInfo.getThreeLevelWardDocs();
|
|
|
- Map<String, String> doctorRecord = extractWardRecord(
|
|
|
+ Map<String, Map<String, String>> doctorRecord = extractWardRecord(
|
|
|
threeLevelWardDocs,
|
|
|
admisTime,
|
|
|
48 * 60);
|
|
|
if (doctorRecord.containsKey(Content.indications)) {
|
|
|
- if (doctorRecord.get("病情记录").contains("鉴别诊断")) {
|
|
|
+ if (doctorRecord.get(Content.indications).get("病情记录").contains("鉴别诊断")) {
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
@@ -66,10 +66,10 @@ public class THR0131 extends QCCatalogue {
|
|
|
* @param duration
|
|
|
* @return
|
|
|
*/
|
|
|
- private static Map<String, String> extractWardRecord(List<ThreeLevelWardDoc> threeLevelWardDocs, String admisTime, int duration) {
|
|
|
- Map<Date, String> dateRecord = new HashMap<>();
|
|
|
- List<String> sortRecord = new ArrayList<>();
|
|
|
- Map<String, String> doctorRecord = new HashMap<>();
|
|
|
+ private static Map<String, Map<String, String>> extractWardRecord(List<ThreeLevelWardDoc> threeLevelWardDocs, String admisTime, int duration) {
|
|
|
+ Map<Date, Map<String, String>> dateRecord = new HashMap<>();
|
|
|
+ List<Map<String, String>> sortRecord = new ArrayList<>();
|
|
|
+ Map<String, Map<String, String>> doctorRecord = new HashMap<>();
|
|
|
String recordTime = "";
|
|
|
Date admisDate = StringUtil.parseDateTime(admisTime);
|
|
|
if (admisDate == null) {
|
|
@@ -83,25 +83,26 @@ public class THR0131 extends QCCatalogue {
|
|
|
continue;
|
|
|
}
|
|
|
if (admisDate.before(recordDate) && !CatalogueUtil.compareTime(admisDate, recordDate, Long.valueOf(duration))) {
|
|
|
- String wardTitle = threeLevelWardStructureMap.get("查房标题");
|
|
|
- wardTitle = StringUtil.isBlank(wardTitle) ? "" : wardTitle;
|
|
|
- dateRecord.put(recordDate, wardTitle);
|
|
|
+ if (StringUtil.isBlank(threeLevelWardStructureMap.get("查房标题"))) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ dateRecord.put(recordDate, threeLevelWardStructureMap);
|
|
|
}
|
|
|
}
|
|
|
dateRecord.entrySet().stream().sorted(Map.Entry.comparingByKey()).forEachOrdered(
|
|
|
x -> sortRecord.add(x.getValue())
|
|
|
);
|
|
|
//按时间排好序查房记录的第一条主治医师查房记录存进doctorRecord
|
|
|
- for (String record : sortRecord) {
|
|
|
- if (!CatalogueUtil.subTitle(record).contains(Content.indications)) {
|
|
|
+ for (Map<String, String> record : sortRecord) {
|
|
|
+ if (!CatalogueUtil.subTitle(record.get("查房标题")).contains(Content.indications)) {
|
|
|
continue;
|
|
|
}
|
|
|
doctorRecord.put(Content.indications, record);
|
|
|
break;
|
|
|
}
|
|
|
//按时间排好序查房记录的第一条主任医师/副主任医师查房记录存进doctorRecord
|
|
|
- for (String record : sortRecord) {
|
|
|
- if (!CatalogueUtil.subTitle(record).contains(Content.director)) {
|
|
|
+ for (Map<String, String> record : sortRecord) {
|
|
|
+ if (!CatalogueUtil.subTitle(record.get("查房标题")).contains(Content.director)) {
|
|
|
continue;
|
|
|
}
|
|
|
doctorRecord.put(Content.director, record);
|