Pārlūkot izejas kodu

修改疾病对象生成方式

louhr 5 gadi atpakaļ
vecāks
revīzija
2484ee2299

+ 2 - 2
kernel/src/main/java/com/lantone/qc/kernel/structure/ai/process/EntityProcessFamily.java

@@ -4,6 +4,7 @@ package com.lantone.qc.kernel.structure.ai.process;
 import com.alibaba.fastjson.JSONObject;
 import com.lantone.qc.kernel.structure.ai.model.EntityEnum;
 import com.lantone.qc.kernel.structure.ai.model.Lemma;
+import com.lantone.qc.kernel.util.DiagEnhancer;
 import com.lantone.qc.pub.model.entity.*;
 import com.lantone.qc.pub.model.label.FamilyLabel;
 
@@ -126,8 +127,7 @@ public class EntityProcessFamily extends EntityProcess {
      * @return
      */
     private Diag addDiags(Lemma diagLemma) {
-        Diag diag = new Diag();
-        diag.setName(diagLemma.getText());
+        Diag diag = DiagEnhancer.create(diagLemma.getText());
         if (diagLemma.isHaveChildren()) {
             diag.setNegative(findNegative(diagLemma));
         }

+ 1 - 2
kernel/src/main/java/com/lantone/qc/kernel/structure/ai/process/EntityProcessPast.java

@@ -72,8 +72,7 @@ public class EntityProcessPast extends EntityProcess {
                     //手术原因
                     for (Lemma relationLemma : lemma.getRelationLemmas()) {
                         if (relationLemma.getProperty().equals(EntityEnum.DIEASE.toString())) {
-                            Diag diag = new Diag();
-                            diag.setName(relationLemma.getText());
+                            Diag diag = DiagEnhancer.create(relationLemma.getText());
                             operation.setDiag(diag);
                         }
                     }