Selaa lähdekoodia

首次病程录 诊疗计划ai入参修改

hujing 5 vuotta sitten
vanhempi
commit
83daf7f787

+ 5 - 16
kernel/src/main/java/com/lantone/qc/kernel/structure/ai/FirstCourseRecordAI.java

@@ -43,6 +43,7 @@ public class FirstCourseRecordAI extends ModelAI {
         FirstCourseRecordDoc firstCourseRecordDoc = inputInfo.getFirstCourseRecordDoc();
         if (firstCourseRecordDoc != null) {
             Map<String, String> structureMap = firstCourseRecordDoc.getStructureMap();
+
             //病历特点
             //putContent(crfContent, medicalTextType.get(0), firstCourseRecordDoc.getCaseCharacteristicLabel().getText(), Content.case_feature);
             //初步诊断
@@ -77,9 +78,10 @@ public class FirstCourseRecordAI extends ModelAI {
                 putContent(crfContent, medicalTextType.get(1), diffDiag, "鉴别诊断");
             }
             //诊疗计划
-            List<String> keys = Lists.newArrayList("需求评估", "预期目标", "诊疗计划", "治疗监测计划");
-            String treatPlanJoin = treatPlanJoin(structureMap, keys);
-            putContent(crfContent, medicalTextType.get(2), treatPlanJoin, "诊疗计划");
+            TreatPlanLabel treatPlanLabel = firstCourseRecordDoc.getTreatPlanLabel();
+            if (treatPlanLabel != null && StringUtil.isNotBlank(treatPlanLabel.getAiText())) {
+                putContent(crfContent, medicalTextType.get(2), treatPlanLabel.getAiText(), "诊疗计划");
+            }
             /*
             if (StringUtils.isNotEmpty(structureMap.get("诊疗计划")) && StringUtils.isNotEmpty(structureMap.get("需求评估"))) {
                 putContent(crfContent, medicalTextType.get(2), structureMap.get("诊疗计划") + structureMap.get("需求评估"), "诊疗计划");
@@ -227,17 +229,4 @@ public class FirstCourseRecordAI extends ModelAI {
         treatPlanLabel.setText(inputInfo.getFirstCourseRecordDoc().getTreatPlanLabel().getText());
         inputInfo.getFirstCourseRecordDoc().setTreatPlanLabel(treatPlanLabel);
     }
-
-    /**
-     * 拼接诊疗计划
-     **/
-    private String treatPlanJoin(Map<String, String> structureMap, List<String> keys) {
-        String treatPlan = "";
-        for (String key : keys) {
-            if (StringUtil.isNotBlank(structureMap.get(key))) {
-                treatPlan += key + ":" + structureMap.get(key) + "\n";
-            }
-        }
-        return treatPlan;
-    }
 }

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

@@ -17,6 +17,7 @@ import java.util.Map;
 @Getter
 public class GeneralLabel {
     private String text;
+    private String aiText;
     private boolean crfLabel = true;
     protected  <T> void add(List<T> list, T obj) {
         list.add(obj);

+ 19 - 3
trans/src/main/java/com/lantone/qc/trans/comsis/ModelDocGenerate.java

@@ -1,5 +1,6 @@
 package com.lantone.qc.trans.comsis;
 
+import com.google.common.collect.Lists;
 import com.lantone.qc.pub.model.doc.*;
 import com.lantone.qc.pub.model.doc.consultation.ConsultationApplicationDoc;
 import com.lantone.qc.pub.model.doc.consultation.ConsultationRecordDoc;
@@ -9,9 +10,6 @@ import com.lantone.qc.pub.model.doc.operation.OperationInformedConsentDoc;
 import com.lantone.qc.pub.model.doc.operation.OperationRecordDoc;
 import com.lantone.qc.pub.model.doc.operation.OperationSafetyChecklistDoc;
 import com.lantone.qc.pub.model.doc.operation.PreoperativeDiscussionDoc;
-import com.lantone.qc.pub.model.doc.transferrecord.TransferIntoDoc;
-import com.lantone.qc.pub.model.doc.transferrecord.TransferOutDoc;
-import com.lantone.qc.pub.model.doc.transferrecord.TransferRecordDoc;
 import com.lantone.qc.pub.model.label.CaseCharacteristicLabel;
 import com.lantone.qc.pub.model.label.ChiefLabel;
 import com.lantone.qc.pub.model.label.DiagLabel;
@@ -26,7 +24,9 @@ import com.lantone.qc.pub.model.label.PresentLabel;
 import com.lantone.qc.pub.model.label.TreatPlanLabel;
 import com.lantone.qc.pub.model.label.VitalLabel;
 import com.lantone.qc.pub.model.label.VitalLabelSpecial;
+import com.lantone.qc.pub.util.StringUtil;
 
+import java.util.List;
 import java.util.Map;
 
 /**
@@ -365,6 +365,9 @@ public class ModelDocGenerate {
 
         TreatPlanLabel treatPlanLabel = new TreatPlanLabel();
         treatPlanLabel.setText(structureMap.get("诊疗计划"));
+        List<String> keys = Lists.newArrayList("需求评估", "预期目标", "诊疗计划", "治疗监测计划");
+        String treatPlanJoin = structureMapJoin(structureMap, keys);
+        treatPlanLabel.setAiText(treatPlanJoin);
         firstCourseRecordDoc.setTreatPlanLabel(treatPlanLabel);
 //        structureMap.remove("诊疗计划");
 
@@ -454,4 +457,17 @@ public class ModelDocGenerate {
         return threeLevelWardDoc;
     }
 
+    /**
+     * 拼接结构化数据
+     **/
+    private static String structureMapJoin(Map<String, String> structureMap, List<String> keys) {
+        String textJoin = "";
+        for (String key : keys) {
+            if (StringUtil.isNotBlank(structureMap.get(key))) {
+                textJoin += key + ":" + structureMap.get(key) + "\n";
+            }
+        }
+        return textJoin;
+    }
+
 }