瀏覽代碼

辅检结构调整

zhoutg 4 年之前
父節點
當前提交
98b8033866

+ 13 - 0
src/main/java/com/diagbot/model/ai/process/EntityProcess.java

@@ -8,6 +8,7 @@ import com.diagbot.model.ai.model.Relation;
 import com.diagbot.model.entity.Negative;
 import com.diagbot.model.entity.PD;
 import com.diagbot.util.CatalogueUtil;
+import com.diagbot.util.StringUtil;
 import org.apache.commons.beanutils.BeanUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.stereotype.Component;
@@ -392,4 +393,16 @@ public class EntityProcess {
         }
         return res;
     }
+
+    public PD getPd(String text) {
+        PD pd = new PD();
+        String[] val_unit = new String[2];
+        if (StringUtil.isNotBlank(text)) {
+            val_unit = extract_digit_new(text);
+            pd.setName(text);
+            pd.setValue(val_unit[0]);
+            pd.setUnit(val_unit[1]);
+        }
+        return pd;
+    }
 }

+ 13 - 2
src/main/java/com/diagbot/model/ai/process/EntityProcessPacsNew.java

@@ -4,9 +4,9 @@ import com.alibaba.fastjson.JSONObject;
 import com.diagbot.model.ai.model.EntityEnum;
 import com.diagbot.model.ai.model.Lemma;
 import com.diagbot.model.entity.BodyPart;
+import com.diagbot.model.entity.PD;
 import com.diagbot.model.entity.Pacs;
 import com.diagbot.model.entity.PacsNew;
-import com.diagbot.model.label.PacsLabel;
 import com.diagbot.util.ListUtil;
 
 import java.util.ArrayList;
@@ -40,7 +40,7 @@ public class EntityProcessPacsNew extends EntityProcess {
             }
         }
 
-        //辅检描述情况
+        //辅助检查
         List<Lemma> pacsAll = createEntityTree(aiOut, EntityEnum.AUXILIARY_EXAMINATION.toString());
 
         Map<String, PacsNew> map = new HashMap<>();
@@ -57,6 +57,17 @@ public class EntityProcessPacsNew extends EntityProcess {
                         if (ListUtil.isNotEmpty(bodyMap.get(relationLemma.getText()))) {
                             desc.setBodyPartList(bodyMap.get(relationLemma.getText()));
                         }
+                        // 指标值暂不用
+                        if (relationLemma.isHaveChildren()) {
+                            for (Lemma re : relationLemma.getRelationLemmas()) {
+                                if (re.getProperty().equals(EntityEnum.INDEX_VALUE.toString())) {
+                                    EntityProcess entityProcess = new EntityProcess();
+                                    PD pd = entityProcess.getPd(re.getText());
+                                    desc.setPd(pd);
+                                    break;
+                                }
+                            }
+                        }
                         descList.add(desc);
                     } else if (relationLemma.getProperty().equals(EntityEnum.DIEASE.toString())) {
                         // 辅检诊断信息