فهرست منبع

体征bug修改

kwzbigdata 4 سال پیش
والد
کامیت
8053714dbf

+ 57 - 57
src/main/java/com/diagbot/model/ai/process/EntityProcessVital.java

@@ -1,57 +1,57 @@
-package com.diagbot.model.ai.process;
-
-import com.alibaba.fastjson.JSONObject;
-import com.diagbot.model.ai.model.EntityEnum;
-import com.diagbot.model.entity.*;
-import org.apache.commons.lang3.StringUtils;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-public class EntityProcessVital extends EntityProcess {
-    public List<Vital> extractEntity(JSONObject outputs) {
-        List<Vital> vitals = new ArrayList<>();
-        Vital vital =null;
-        List<Map<String, String>> vitalEntityList = processJson(outputs, EntityEnum.SIGN.toString());
-        for (Map<String, String> vitalEntityMap : vitalEntityList) {
-            if (StringUtils.isEmpty(vitalEntityMap.get(EntityEnum.SIGN.toString()))) {
-                continue;
-            }
-            vital = new Vital();
-            for (String key:vitalEntityMap.keySet()) {
-                String entity = vitalEntityMap.get(key);
-                switch (EntityEnum.parseOfValue(key)) {
-                    case SIGN:
-                        vital.setVitalName(entity);
-                        break;
-                    case NEGATIVE:
-                        Negative negative = new Negative();
-                        negative.setName(entity);
-                        vital.setNegative(negative);
-                        break;
-                    case BODY:
-                        BodyPart bodyPart = new BodyPart();
-                        bodyPart.setName(entity);
-                        vital.setBodyPart(bodyPart);
-                        break;
-                    case INDEX_VALUE:
-                        vital.setValue(StringUtils.isEmpty(entity)?"":entity);
-                        PD pd =new PD();
-                        pd.setValue(StringUtils.isEmpty(entity)?"":entity);
-                        vital.setPd(pd);
-                        break;
-                    case MODIFICATION:
-                        if(entity.contains("度")){
-                            Degree degree = new Degree();
-                            degree.setName(entity);
-                            vital.setDegree(degree);
-                        }
-                        break;
-                }
-            }
-            vitals.add(vital);
-        }
-        return vitals;
-    }
-}
+package com.diagbot.model.ai.process;
+
+import com.alibaba.fastjson.JSONObject;
+import com.diagbot.model.ai.model.EntityEnum;
+import com.diagbot.model.entity.*;
+import org.apache.commons.lang3.StringUtils;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+public class EntityProcessVital extends EntityProcess {
+    public List<Vital> extractEntity(JSONObject outputs) {
+        List<Vital> vitals = new ArrayList<>();
+        Vital vital =null;
+        List<Map<String, String>> vitalEntityList = processJson(outputs, EntityEnum.SIGN.toString());
+        for (Map<String, String> vitalEntityMap : vitalEntityList) {
+            if (StringUtils.isEmpty(vitalEntityMap.get(EntityEnum.SIGN.toString()))) {
+                continue;
+            }
+            vital = new Vital();
+            for (String key:vitalEntityMap.keySet()) {
+                String entity = vitalEntityMap.get(key);
+                switch (EntityEnum.parseOfValue(key)) {
+                    case SIGN:
+                        vital.setName(entity);
+                        break;
+                    case NEGATIVE:
+                        Negative negative = new Negative();
+                        negative.setName(entity);
+                        vital.setNegative(negative);
+                        break;
+                    case BODY:
+                        BodyPart bodyPart = new BodyPart();
+                        bodyPart.setName(entity);
+                        vital.setBodyPart(bodyPart);
+                        break;
+                    case INDEX_VALUE:
+                        vital.setValue(StringUtils.isEmpty(entity)?"":entity);
+                        PD pd =new PD();
+                        pd.setValue(StringUtils.isEmpty(entity)?"":entity);
+                        vital.setPd(pd);
+                        break;
+                    case MODIFICATION:
+                        if(entity.contains("度")){
+                            Degree degree = new Degree();
+                            degree.setName(entity);
+                            vital.setDegree(degree);
+                        }
+                        break;
+                }
+            }
+            vitals.add(vital);
+        }
+        return vitals;
+    }
+}

+ 2 - 2
src/main/java/com/diagbot/repository/BaseRelationRepository.java

@@ -1,7 +1,7 @@
 package com.diagbot.repository;
 
-import com.diagbot.entity.node.base.BaseNode;
-import com.diagbot.entity.relationship.*;
+//import com.diagbot.entity.node.base.BaseNode;
+//import com.diagbot.entity.relationship.*;
 
 //import org.springframework.data.neo4j.annotation.Query;
 //import org.springframework.data.neo4j.repository.Neo4jRepository;