ソースを参照

1、修改三级查房结构,拆分为主治医师查房、主任医师查房、普通医师查房

louhr 5 年 前
コミット
6741e2a280

+ 23 - 0
public/src/main/java/com/lantone/qc/pub/model/doc/ThreeLevelWardDoc.java

@@ -20,6 +20,8 @@ import java.util.*;
 @Setter
 public class ThreeLevelWardDoc extends ModelDoc {
     private List<ThreeLevelWardLabel> threeLevelWardLabel = new ArrayList<>();
+    //所有的查房记录
+    private List<ThreeLevelWardDoc> allDoctorWradDocs = new ArrayList<>();
     //主任医师查房
     private List<DirectorDoctorWardDoc> directorDoctorWardDocs = new ArrayList<>();
     //主治医师查房
@@ -27,6 +29,27 @@ public class ThreeLevelWardDoc extends ModelDoc {
     //普通医师查房
     private List<GeneralDoctorWardDoc> generalDoctorWardDocs = new ArrayList<>();
 
+    /**
+     * 总的查房记录集合
+     * @param allDoctorWradDoc
+     */
+    public void addAllDoctorWradDoc(ThreeLevelWardDoc allDoctorWradDoc) {
+        Map<Date, ThreeLevelWardDoc> dateRecord = new TreeMap<>(new Comparator<Date>() {
+            @Override
+            public int compare(Date o1, Date o2) {
+                // 升序排列
+                return o1.compareTo(o2);
+            }
+        });//按时间key排序,存放抢救记录、查房记录\
+        dateRecord.put(StringUtil.parseDateTime(allDoctorWradDoc.getStructureMap().get("查房日期")), allDoctorWradDoc);
+        allDoctorWradDocs.stream().forEach(
+                doc ->  dateRecord.put(StringUtil.parseDateTime(doc.getStructureMap().get("查房日期")), doc)
+        );
+
+        List<ThreeLevelWardDoc> docs = new ArrayList<>(dateRecord.values());
+        allDoctorWradDocs = docs;
+    }
+
     public void addDirectorDoctorWardDoc(DirectorDoctorWardDoc directorDoctorWardDoc) {
         Map<Date, DirectorDoctorWardDoc> dateRecord = new TreeMap<>(new Comparator<Date>() {
             @Override

+ 10 - 0
trans/src/main/java/com/lantone/qc/trans/taizhou/TaiZhouThreeLevelWardDocTrans.java

@@ -51,6 +51,15 @@ public class TaiZhouThreeLevelWardDocTrans extends ModelDocTrans {
         if (StringUtils.isEmpty(structureMap.get("查房标题")) && StringUtils.isNotEmpty(structureMap.get("上级查房医生职称"))) {
             structureMap.put("查房标题", structureMap.get("上级查房医生职称"));
         }
+        if (StringUtils.isEmpty(structureMap.get("查房标题")) && StringUtils.isNotEmpty(structureMap.get("查房类别"))) {
+            structureMap.put("查房标题", structureMap.get("查房类别"));
+        }
+        //总的查房记录 汇总
+        ThreeLevelWardDoc allDoctorWradDoc = new ThreeLevelWardDoc();
+        allDoctorWradDoc.setStructureMap(structureMap);
+        allDoctorWradDoc.setPageData((Map)sourceMap);
+        result.addAllDoctorWradDoc(allDoctorWradDoc);
+
         //主任医师查房
         DirectorDoctorWardDoc directorDoctorWardDoc = findDirectorDoctorWardDoc(sourceMap, structureMap);
         if (directorDoctorWardDoc != null) {
@@ -119,6 +128,7 @@ public class TaiZhouThreeLevelWardDocTrans extends ModelDocTrans {
 
     private List<String> keyContrasts = Lists.newArrayList(
             "事件日期=记录时间",
+            "事件日期=查房日期",
             "医生=记录医师"
     );