rengb 5 роки тому
батько
коміт
37eb85309d

+ 6 - 2
kernel/src/main/java/com/lantone/qc/kernel/catalogue/QCCatalogue.java

@@ -17,9 +17,10 @@ public class QCCatalogue {
 
     protected String status = "-1";
     protected Map<String, String> resultDetail;
+    private String className = this.getClass().getSimpleName();
 
     public QCCatalogue() {
-        CatalogueUtil.qcCatalogueMap.put(this.getClass().getSimpleName(), this);
+        CatalogueUtil.qcCatalogueMap.put(className, this);
     }
 
     /**
@@ -29,10 +30,13 @@ public class QCCatalogue {
      * }
      */
     public void execute(InputInfo inputInfo, OutputInfo outputInfo) {
+        if (outputInfo.getResult().get(className) != null) {
+            return;
+        }
         resultDetail = new HashMap<>();
         resultDetail.put("info", "");
         start(inputInfo, outputInfo);
-        outputInfo.getResult().put(this.getClass().getSimpleName(), resultDetail);
+        outputInfo.getResult().put(className, resultDetail);
     }
 
     protected void start(InputInfo inputInfo, OutputInfo outputInfo) {

+ 8 - 3
kernel/src/main/java/com/lantone/qc/kernel/catalogue/behospitalized/BEH0041.java

@@ -3,10 +3,11 @@ 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.util.StringUtil;
 import org.springframework.stereotype.Component;
 
 /**
- * @Description:
+ * @Description: 个人史未填写
  * @author: rengb
  * @time: 2020/3/10 14:02
  */
@@ -15,6 +16,10 @@ public class BEH0041 extends QCCatalogue {
 
     @Override
     public void start(InputInfo inputInfo, OutputInfo outputInfo) {
-        
+        if (StringUtil.isNotBlank(inputInfo.getBeHospitalizedDoc().getPersonalLabel().getText())) {
+            status = "0";
+        }
+        resultDetail.put("status", status);
     }
-}
+
+}

+ 15 - 1
trans/src/main/java/com/lantone/qc/trans/comsis/ModelDocGenerate.java

@@ -34,59 +34,73 @@ public class ModelDocGenerate {
      */
     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);
+        structureMap.remove("主诉");
 
         PresentLabel presentLabel = new PresentLabel();
         presentLabel.setText(structureMap.get("现病史"));
         beHospitalizedDoc.setPresentLabel(presentLabel);
+        structureMap.remove("现病史");
 
         PastLabel pastLabel = new PastLabel();
         pastLabel.setText(structureMap.get("既往史"));
         beHospitalizedDoc.setPastLabel(pastLabel);
+        structureMap.remove("既往史");
 
         PersonalLabel personalLabel = new PersonalLabel();
         personalLabel.setText(structureMap.get("个人史"));
         beHospitalizedDoc.setPersonalLabel(personalLabel);
+        structureMap.remove("个人史");
 
         MaritalLabel maritalLabel = new MaritalLabel();
         maritalLabel.setText(structureMap.get("婚育史"));
         beHospitalizedDoc.setMaritalLabel(maritalLabel);
+        structureMap.remove("婚育史");
 
         MenstrualLabel menstrualLabel = new MenstrualLabel();
         menstrualLabel.setText(structureMap.get("月经史"));
         beHospitalizedDoc.setMenstrualLabel(menstrualLabel);
+        structureMap.remove("月经史");
 
         FamilyLabel familyLabel = new FamilyLabel();
         familyLabel.setText(structureMap.get("家族史"));
         beHospitalizedDoc.setFamilyLabel(familyLabel);
+        structureMap.remove("家族史");
 
         VitalLabel vitalLabel = new VitalLabel();
         vitalLabel.setText(structureMap.get("体格检查"));
         beHospitalizedDoc.setVitalLabel(vitalLabel);
+        structureMap.remove("体格检查");
 
         VitalLabelSpecial vitalLabelSpecial = new VitalLabelSpecial();
         vitalLabelSpecial.setText(structureMap.get("专科体格检查"));
         beHospitalizedDoc.setVitalLabelSpecial(vitalLabelSpecial);
+        structureMap.remove("专科体格检查");
 
         PacsLabel pacsLabel = new PacsLabel();
         pacsLabel.setText(structureMap.get("辅助检查"));
         beHospitalizedDoc.setPacsLabel(pacsLabel);
+        structureMap.remove("辅助检查");
 
         InitialDiagLabel initialDiagLabel = new InitialDiagLabel();
         initialDiagLabel.setText(structureMap.get("初步诊断"));
         beHospitalizedDoc.setInitialDiagLabel(initialDiagLabel);
+        structureMap.remove("初步诊断");
 
         RevisedDiagLabel revisedDiagLabel = new RevisedDiagLabel();
         revisedDiagLabel.setText(structureMap.get("修正诊断"));
         beHospitalizedDoc.setRevisedDiagLabel(revisedDiagLabel);
+        structureMap.remove("修正诊断");
 
         SuppleDiagLabel suppleDiagLabel = new SuppleDiagLabel();
         suppleDiagLabel.setText(structureMap.get("补充诊断"));
         beHospitalizedDoc.setSuppleDiagLabel(suppleDiagLabel);
+        structureMap.remove("补充诊断");
+
+        beHospitalizedDoc.setStructureMap(structureMap);
 
         return beHospitalizedDoc;
     }