Procházet zdrojové kódy

三级查房文档转换更新

rengb před 5 roky
rodič
revize
3489417212

+ 26 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/behospitalized/BEH0400.java

@@ -0,0 +1,26 @@
+package com.lantone.qc.kernel.catalogue.behospitalized;
+
+import com.lantone.qc.kernel.catalogue.QCCatalogue;
+import com.lantone.qc.pub.model.InputInfo;
+import com.lantone.qc.pub.model.OutputInfo;
+import com.lantone.qc.pub.model.label.PastLabel;
+import com.lantone.qc.pub.util.StringUtil;
+import org.springframework.stereotype.Component;
+
+/**
+ * @Description: 既往史未填写
+ * @author: rengb
+ * @time: 2020/3/10 14:02
+ */
+@Component
+public class BEH0400 extends QCCatalogue {
+
+    @Override
+    public void start(InputInfo inputInfo, OutputInfo outputInfo) {
+        PastLabel pastLabel = inputInfo.getBeHospitalizedDoc().getPastLabel();
+        if (pastLabel != null || StringUtil.isNotBlank(pastLabel.getText())) {
+            status = "0";
+        }
+    }
+
+}

+ 2 - 2
public/src/main/java/com/lantone/qc/pub/model/InputInfo.java

@@ -41,7 +41,7 @@ public class InputInfo {
     //入院记录
     private BeHospitalizedDoc beHospitalizedDoc;
     //输血/血制品病程记录
-    private List<ClinicalBloodDoc> clinicalBloodDoc = new ArrayList<>();
+    private List<ClinicalBloodDoc> clinicalBloodDocs = new ArrayList<>();
     //会诊记录
     private List<ConsultationDoc> consultationDocs = new ArrayList<>();
     //死亡病例讨论记录
@@ -67,7 +67,7 @@ public class InputInfo {
     //抢救记录
     private List<RescueDoc> rescueDocs = new ArrayList<>();
     //查房记录
-    private ThreeLevelWardDoc threeLevelWardDoc;
+    private List<ThreeLevelWardDoc> threeLevelWardDocs = new ArrayList<>();
 
     //新增记录
     public <T> void addDoc(List<T> list, T obj) {

+ 2 - 2
trans/src/main/java/com/lantone/qc/trans/changx/ChangxDocTrans.java

@@ -23,7 +23,7 @@ public class ChangxDocTrans extends DocTrans {
             }
             if (i.getTitle().equals("输血/血制品病程记录")) {
                 ChangxClinicalBloodDocTrans clinicalBloodDocTrans = new ChangxClinicalBloodDocTrans();
-                inputInfo.setClinicalBloodDoc(clinicalBloodDocTrans.extract(i));
+                inputInfo.setClinicalBloodDocs(clinicalBloodDocTrans.extract(i));
             }
             if (i.getTitle().equals("会诊记录")) {
                 ChangxConsultationDocTrans consultationDocTrans = new ChangxConsultationDocTrans();
@@ -75,7 +75,7 @@ public class ChangxDocTrans extends DocTrans {
             }
             if (i.getTitle().equals("查房记录")) {
                 ChangxThreeLevelWardDocTrans threeLevelWardDocTrans = new ChangxThreeLevelWardDocTrans();
-                inputInfo.setThreeLevelWardDoc(threeLevelWardDocTrans.extract(i));
+                inputInfo.setThreeLevelWardDocs(threeLevelWardDocTrans.extract(i));
             }
         }
         return inputInfo;

+ 31 - 1
trans/src/main/java/com/lantone/qc/trans/changx/ChangxThreeLevelWardDocTrans.java

@@ -1,6 +1,16 @@
 package com.lantone.qc.trans.changx;
 
+import com.google.common.collect.Lists;
+import com.lantone.qc.pub.model.doc.ThreeLevelWardDoc;
+import com.lantone.qc.pub.model.keys.ModelStandardKeys;
+import com.lantone.qc.pub.model.vo.MedrecVo;
+import com.lantone.qc.pub.util.ListUtil;
 import com.lantone.qc.trans.ModelDocTrans;
+import com.lantone.qc.trans.comsis.ModelDocGenerate;
+import com.lantone.qc.trans.comsis.Preproc;
+
+import java.util.List;
+import java.util.Map;
 
 /**
  * @Description: 查房记录文档生成
@@ -8,4 +18,24 @@ import com.lantone.qc.trans.ModelDocTrans;
  * @time: 2020/3/17 13:27
  */
 public class ChangxThreeLevelWardDocTrans extends ModelDocTrans {
-}
+
+    @Override
+    public List<ThreeLevelWardDoc> extract(MedrecVo medrecVo) {
+        List<ThreeLevelWardDoc> retList = Lists.newArrayList();
+        List<String> contents = (List) medrecVo.getContent().get("content");
+        contents.forEach(content -> {
+            Map<String, String> structureMap =
+                    Preproc.extract_doc_pub(
+                            false,
+                            ListUtil.isEmpty(medrecVo.getLabel()) ? ModelStandardKeys.threeLevelWard : medrecVo.getLabel(),
+                            content
+                    );
+
+            ThreeLevelWardDoc threeLevelWardDoc = ModelDocGenerate.threeLevelWardDocGen(structureMap);
+            threeLevelWardDoc.setText(content);
+            retList.add(threeLevelWardDoc);
+        });
+        return retList;
+    }
+
+}

+ 13 - 0
trans/src/main/java/com/lantone/qc/trans/comsis/ModelDocGenerate.java

@@ -2,6 +2,7 @@ package com.lantone.qc.trans.comsis;
 
 import com.lantone.qc.pub.model.doc.BeHospitalizedDoc;
 import com.lantone.qc.pub.model.doc.LeaveHospitalDoc;
+import com.lantone.qc.pub.model.doc.ThreeLevelWardDoc;
 import com.lantone.qc.pub.model.label.ChiefLabel;
 import com.lantone.qc.pub.model.label.DiagLabel;
 import com.lantone.qc.pub.model.label.FamilyLabel;
@@ -128,4 +129,16 @@ public class ModelDocGenerate {
         return leaveHospitalDoc;
     }
 
+    /**
+     * 单次查房记录
+     *
+     * @param structureMap
+     * @return
+     */
+    public static ThreeLevelWardDoc threeLevelWardDocGen(Map<String, String> structureMap) {
+        ThreeLevelWardDoc threeLevelWardDoc = new ThreeLevelWardDoc();
+        threeLevelWardDoc.setStructureMap(structureMap);
+        return threeLevelWardDoc;
+    }
+
 }