Browse Source

入院记录切割修改

rengb 5 years ago
parent
commit
b0cae5254b

+ 1 - 1
public/src/main/java/com/lantone/qc/pub/model/doc/BeHospitalizedDoc.java

@@ -9,7 +9,7 @@ import java.util.Map;
 
 /**
  * @ClassName : InHospitalDoc
- * @Description :
+ * @Description : 入院记录文档
  * @Author : 楼辉荣
  * @Date: 2020-03-03 18:58
  */

+ 3 - 3
public/src/main/java/com/lantone/qc/pub/model/keys/ModelStandardKeys.java

@@ -5,7 +5,7 @@ import com.google.common.collect.Lists;
 import java.util.List;
 
 /**
- * @Description:
+ * @Description: 各个模块标准key,各地公用
  * @author: rengb
  * @time: 2020/3/5 14:50
  */
@@ -34,8 +34,8 @@ public class ModelStandardKeys {
             "婚育史",
             "月经史",
             "家族史",
-            "体格检查(一)",
-            "体格检查(二)",
+            "体格检查",
+            "专科体格检查",
             "辅助检查",
             "初步诊断",
             "修正诊断",

+ 1 - 1
public/src/main/java/com/lantone/qc/pub/model/label/InitialDiagLabel.java

@@ -6,5 +6,5 @@ package com.lantone.qc.pub.model.label;
  * @Author : 楼辉荣
  * @Date: 2020-03-03 18:52
  */
-public class InitialDiagLabel {
+public class InitialDiagLabel extends GeneralLabel {
 }

+ 1 - 1
public/src/main/java/com/lantone/qc/pub/model/label/RevisedDiagLabel.java

@@ -6,5 +6,5 @@ package com.lantone.qc.pub.model.label;
  * @Author : 楼辉荣
  * @Date: 2020-03-03 18:51
  */
-public class RevisedDiagLabel {
+public class RevisedDiagLabel extends GeneralLabel {
 }

+ 1 - 1
public/src/main/java/com/lantone/qc/pub/model/label/SuppleDiagLabel.java

@@ -6,5 +6,5 @@ package com.lantone.qc.pub.model.label;
  * @Author : 楼辉荣
  * @Date: 2020-03-03 18:53
  */
-public class SuppleDiagLabel {
+public class SuppleDiagLabel extends GeneralLabel{
 }

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

@@ -2,6 +2,9 @@ package com.lantone.qc.trans;
 
 import com.lantone.qc.pub.model.InputInfo;
 import com.lantone.qc.pub.model.vo.QueryVo;
+import com.lantone.qc.trans.comsis.ModelDocGenerate;
+import com.lantone.qc.trans.comsis.Preproc;
+import lombok.Getter;
 
 /**
  * @ClassName : DocTrans
@@ -9,6 +12,16 @@ import com.lantone.qc.pub.model.vo.QueryVo;
  * @Author : 楼辉荣
  * @Date: 2020-03-03 19:47
  */
+@Getter
 public abstract class DocTrans {
     protected abstract InputInfo extract(QueryVo queryVo);
+
+    private Preproc preproc;
+    private ModelDocGenerate modelDocGenerate;
+
+    public DocTrans() {
+        preproc = new Preproc();
+        modelDocGenerate = new ModelDocGenerate();
+    }
+
 }

+ 20 - 0
trans/src/main/java/com/lantone/qc/trans/ModelDocTrans.java

@@ -0,0 +1,20 @@
+package com.lantone.qc.trans;
+
+import com.lantone.qc.trans.comsis.ModelDocGenerate;
+import com.lantone.qc.trans.comsis.Preproc;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:
+ * @author: rengb
+ * @time: 2020/3/6 10:46
+ */
+@Getter
+@Setter
+public class ModelDocTrans {
+
+    private Preproc preproc;
+    private ModelDocGenerate modelDocGenerate;
+
+}

+ 17 - 11
trans/src/main/java/com/lantone/qc/trans/changx/BeHospitalizedDocTrans.java

@@ -3,26 +3,32 @@ package com.lantone.qc.trans.changx;
 import com.lantone.qc.pub.model.doc.BeHospitalizedDoc;
 import com.lantone.qc.pub.model.keys.ModelStandardKeys;
 import com.lantone.qc.pub.model.vo.MedrecVo;
-import com.lantone.qc.pub.model.vo.QueryVo;
-import com.lantone.qc.trans.comsis.Preproc;
+import com.lantone.qc.pub.util.ListUtil;
+import com.lantone.qc.trans.ModelDocTrans;
 
 import java.util.Map;
 
 /**
- * @Description:
+ * @Description: 入院记录文档生成
  * @author: rengb
  * @time: 2020/3/5 15:47
  */
-public class BeHospitalizedDocTrans {
+public class BeHospitalizedDocTrans extends ModelDocTrans {
 
     public BeHospitalizedDoc extract(MedrecVo medrecVo) {
-        BeHospitalizedDoc beHospitalizedDoc = new BeHospitalizedDoc();
-        Preproc preproc = new Preproc();
-        beHospitalizedDoc.setStructureMap(preproc.extract_doc_pub(
-                false,
-                ModelStandardKeys.beHospitalized,
-                medrecVo.getContent().get("content").toString()));
-        return beHospitalizedDoc;
+        Map<String, String> structureMap =
+                getPreproc().extract_doc_pub(
+                        false,
+                        ListUtil.isEmpty(medrecVo.getLabel()) ? ModelStandardKeys.beHospitalized : medrecVo.getLabel(),
+                        medrecVo.getContent().get("content").toString()
+                );
+
+        structureMap.put("体格检查", structureMap.get("体格检查(一)"));
+        structureMap.put("专科体格检查", structureMap.get("体格检查(二)"));
+        structureMap.remove("体格检查(一)");
+        structureMap.remove("体格检查(二)");
+
+        return getModelDocGenerate().beHospitalizedDocGen(structureMap);
     }
 
 }

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

@@ -4,6 +4,8 @@ import com.lantone.qc.pub.model.InputInfo;
 import com.lantone.qc.pub.model.vo.MedrecVo;
 import com.lantone.qc.pub.model.vo.QueryVo;
 import com.lantone.qc.trans.DocTrans;
+import com.lantone.qc.trans.comsis.ModelDocGenerate;
+import com.lantone.qc.trans.comsis.Preproc;
 
 /**
  * @ClassName : TaiZhouDocTrans
@@ -19,6 +21,8 @@ public class ChangxDocTrans extends DocTrans {
         for (MedrecVo i : queryVo.getMedrec()) {
             if (i.getTitle().equals("入院记录")) {
                 BeHospitalizedDocTrans beHospitalizedDocTrans = new BeHospitalizedDocTrans();
+                beHospitalizedDocTrans.setPreproc(getPreproc());
+                beHospitalizedDocTrans.setModelDocGenerate(getModelDocGenerate());
                 inputInfo.setBeHospitalizedDoc(beHospitalizedDocTrans.extract(i));
             }
         }

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

@@ -0,0 +1,94 @@
+package com.lantone.qc.trans.comsis;
+
+import com.lantone.qc.pub.model.doc.BeHospitalizedDoc;
+import com.lantone.qc.pub.model.label.ChiefLabel;
+import com.lantone.qc.pub.model.label.FamilyLabel;
+import com.lantone.qc.pub.model.label.InitialDiagLabel;
+import com.lantone.qc.pub.model.label.MaritalLabel;
+import com.lantone.qc.pub.model.label.MenstrualLabel;
+import com.lantone.qc.pub.model.label.PacsLabel;
+import com.lantone.qc.pub.model.label.PastLabel;
+import com.lantone.qc.pub.model.label.PersonalLabel;
+import com.lantone.qc.pub.model.label.PresentLabel;
+import com.lantone.qc.pub.model.label.RevisedDiagLabel;
+import com.lantone.qc.pub.model.label.SuppleDiagLabel;
+import com.lantone.qc.pub.model.label.VitalLabel;
+import com.lantone.qc.pub.model.label.VitalLabelSpecial;
+
+import java.util.Map;
+
+/**
+ * 各个模块文档生成,各地公用
+ *
+ * @Description:
+ * @author: rengb
+ * @time: 2020/3/6 10:15
+ */
+public class ModelDocGenerate {
+
+    /**
+     * 入院记录
+     *
+     * @param structureMap
+     * @return
+     */
+    public BeHospitalizedDoc beHospitalizedDocGen(Map<String, String> structureMap) {
+        BeHospitalizedDoc beHospitalizedDoc = new BeHospitalizedDoc();
+        beHospitalizedDoc.setStructureMap(structureMap);
+
+        ChiefLabel chiefLabel = new ChiefLabel();
+        chiefLabel.setText(structureMap.get("主诉"));
+        beHospitalizedDoc.setChiefLabel(chiefLabel);
+
+        PresentLabel presentLabel = new PresentLabel();
+        presentLabel.setText(structureMap.get("现病史"));
+        beHospitalizedDoc.setPresentLabel(presentLabel);
+
+        PastLabel pastLabel = new PastLabel();
+        pastLabel.setText(structureMap.get("既往史"));
+        beHospitalizedDoc.setPastLabel(pastLabel);
+
+        PersonalLabel personalLabel = new PersonalLabel();
+        personalLabel.setText(structureMap.get("个人史"));
+        beHospitalizedDoc.setPersonalLabel(personalLabel);
+
+        MaritalLabel maritalLabel = new MaritalLabel();
+        maritalLabel.setText(structureMap.get("婚育史"));
+        beHospitalizedDoc.setMaritalLabel(maritalLabel);
+
+        MenstrualLabel menstrualLabel = new MenstrualLabel();
+        menstrualLabel.setText(structureMap.get("月经史"));
+        beHospitalizedDoc.setMenstrualLabel(menstrualLabel);
+
+        FamilyLabel familyLabel = new FamilyLabel();
+        familyLabel.setText(structureMap.get("家族史"));
+        beHospitalizedDoc.setFamilyLabel(familyLabel);
+
+        VitalLabel vitalLabel = new VitalLabel();
+        vitalLabel.setText(structureMap.get("体格检查"));
+        beHospitalizedDoc.setVitalLabel(vitalLabel);
+
+        VitalLabelSpecial vitalLabelSpecial = new VitalLabelSpecial();
+        vitalLabelSpecial.setText(structureMap.get("专科体格检查"));
+        beHospitalizedDoc.setVitalLabelSpecial(vitalLabelSpecial);
+
+        PacsLabel pacsLabel = new PacsLabel();
+        pacsLabel.setText(structureMap.get("辅助检查"));
+        beHospitalizedDoc.setPacsLabel(pacsLabel);
+
+        InitialDiagLabel initialDiagLabel = new InitialDiagLabel();
+        initialDiagLabel.setText(structureMap.get("初步诊断"));
+        beHospitalizedDoc.setInitialDiagLabel(initialDiagLabel);
+
+        RevisedDiagLabel revisedDiagLabel = new RevisedDiagLabel();
+        revisedDiagLabel.setText(structureMap.get("修正诊断"));
+        beHospitalizedDoc.setRevisedDiagLabel(revisedDiagLabel);
+
+        SuppleDiagLabel suppleDiagLabel = new SuppleDiagLabel();
+        suppleDiagLabel.setText(structureMap.get("补充诊断"));
+        beHospitalizedDoc.setSuppleDiagLabel(suppleDiagLabel);
+
+        return beHospitalizedDoc;
+    }
+
+}