Browse Source

commonservice调整

kongwz 6 years ago
parent
commit
ce0e0c216e

+ 1 - 1
graph-web/src/main/java/org/diagbot/graphWeb/work/LisDetail.java

@@ -1,4 +1,4 @@
-package org.diagbot.graphWeb.work;
+package org.diagbot.common.work;
 
 public class LisDetail {
     private String detailName;

+ 5 - 3
common-service/src/main/java/org/diagbot/common/work/ResponseData.java

@@ -1,5 +1,7 @@
 package org.diagbot.common.work;
 
+import com.alibaba.fastjson.JSONObject;
+
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
@@ -18,7 +20,7 @@ public class ResponseData {
     private List<FeatureRate> pacs = new ArrayList<>(10);
     private List<FeatureRate> history = new ArrayList<>(10);
 
-    private Map<String, String> treat = new HashMap<>();
+    private Map<String, JSONObject> treat = new HashMap<>();
 
     private Map<String, Map<String, String>> inputs = new HashMap<>(10,0.5f);
 
@@ -78,11 +80,11 @@ public class ResponseData {
         this.inputs = inputs;
     }
 
-    public Map<String, String> getTreat() {
+    public Map<String, JSONObject> getTreat() {
         return treat;
     }
 
-    public void setTreat(Map<String, String> treat) {
+    public void setTreat(Map<String, JSONObject> treat) {
         this.treat = treat;
     }
 

+ 11 - 1
common-service/src/main/java/org/diagbot/common/work/SearchData.java

@@ -1,6 +1,8 @@
 package org.diagbot.common.work;
 
+import java.util.ArrayList;
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 
 public class SearchData {
@@ -19,7 +21,7 @@ public class SearchData {
     protected String resourceType;
     //外部系统编码 用于返回映射数据,如果sysCode为空或null,则返回kl_standard_info标准名称
     protected String sysCode;
-
+    private List<LisDetail> lisArr = new ArrayList<>();
     protected String symptom = "";
     protected String vital = "";
     protected String lis = "";
@@ -30,6 +32,14 @@ public class SearchData {
 
     private Map<String, Map<String, String>> inputs = new HashMap<>(10, 0.8f);
 
+    public List<LisDetail> getLisArr() {
+        return lisArr;
+    }
+
+    public void setLisArr(List<LisDetail> lisArr) {
+        this.lisArr = lisArr;
+    }
+
     public int getLength() {
         return length;
     }

+ 5 - 0
graph-web/pom.xml

@@ -30,6 +30,11 @@
 			<artifactId>public</artifactId>
 			<version>1.0.0</version>
 		</dependency>
+		<dependency>
+			<groupId>org.diagbot</groupId>
+			<artifactId>common-service</artifactId>
+			<version>1.0.0</version>
+		</dependency>
 		<dependency>
 			<groupId>org.diagbot</groupId>
 			<artifactId>nlp</artifactId>

+ 3 - 3
graph-web/src/main/java/org/diagbot/graphWeb/controller/PushController.java

@@ -5,10 +5,10 @@ import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import org.diagbot.graph.jdbc.DriverManager;
 import org.diagbot.graph.jdbc.Neo4jAPI;
-import org.diagbot.graphWeb.work.FeatureRate;
+import org.diagbot.common.work.FeatureRate;
 import org.diagbot.graphWeb.work.ParamsDataProxy;
-import org.diagbot.graphWeb.work.ResponseData;
-import org.diagbot.graphWeb.work.SearchData;
+import org.diagbot.common.work.ResponseData;
+import org.diagbot.common.work.SearchData;
 import org.diagbot.nlp.feature.FeatureAnalyze;
 import org.diagbot.nlp.feature.FeatureType;
 import org.diagbot.pub.api.Response;

+ 0 - 43
graph-web/src/main/java/org/diagbot/graphWeb/work/FeatureRate.java

@@ -1,43 +0,0 @@
-package org.diagbot.graphWeb.work;
-
-/**
- * Created by fyeman on 2018/1/17.
- */
-public class FeatureRate {
-    private String featureName;
-    private String extraProperty;
-    private String desc;
-    private String rate;
-
-    public String getFeatureName() {
-        return featureName;
-    }
-
-    public void setFeatureName(String featureName) {
-        this.featureName = featureName;
-    }
-
-    public String getRate() {
-        return rate;
-    }
-
-    public void setRate(String rate) {
-        this.rate = rate;
-    }
-
-    public String getExtraProperty() {
-        return extraProperty;
-    }
-
-    public void setExtraProperty(String extraProperty) {
-        this.extraProperty = extraProperty;
-    }
-
-    public String getDesc() {
-        return desc;
-    }
-
-    public void setDesc(String desc) {
-        this.desc = desc;
-    }
-}

+ 0 - 98
graph-web/src/main/java/org/diagbot/graphWeb/work/ResponseData.java

@@ -1,98 +0,0 @@
-package org.diagbot.graphWeb.work;
-
-import com.alibaba.fastjson.JSONObject;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- * Created by fyeman on 2018/2/2.
- */
-public class ResponseData {
-    private String participleSymptom = "";
-
-    private List<FeatureRate> symptom = new ArrayList<>(10);
-    private List<FeatureRate> vitals = new ArrayList<>(10);
-    private List<FeatureRate> dis = new ArrayList<>(10);
-    private List<FeatureRate> labs = new ArrayList<>(10);
-    private List<FeatureRate> pacs = new ArrayList<>(10);
-    private List<FeatureRate> history = new ArrayList<>(10);
-
-    private Map<String, JSONObject> treat = new HashMap<>();
-
-    private Map<String, Map<String, String>> inputs = new HashMap<>(10,0.5f);
-
-    public String getParticipleSymptom() {
-        return participleSymptom;
-    }
-
-    public void setParticipleSymptom(String participleSymptom) {
-        this.participleSymptom = participleSymptom;
-    }
-
-    public List<FeatureRate> getSymptom() {
-        return symptom;
-    }
-
-    public void setSymptom(List<FeatureRate> symptom) {
-        this.symptom = symptom;
-    }
-
-    public List<FeatureRate> getVitals() {
-        return vitals;
-    }
-
-    public void setVitals(List<FeatureRate> vitals) {
-        this.vitals = vitals;
-    }
-
-    public List<FeatureRate> getDis() {
-        return dis;
-    }
-
-    public void setDis(List<FeatureRate> dis) {
-        this.dis = dis;
-    }
-
-    public List<FeatureRate> getLabs() {
-        return labs;
-    }
-
-    public void setLabs(List<FeatureRate> labs) {
-        this.labs = labs;
-    }
-
-    public List<FeatureRate> getPacs() {
-        return pacs;
-    }
-
-    public void setPacs(List<FeatureRate> pacs) {
-        this.pacs = pacs;
-    }
-
-    public Map<String, Map<String, String>> getInputs() {
-        return inputs;
-    }
-
-    public void setInputs(Map<String, Map<String, String>> inputs) {
-        this.inputs = inputs;
-    }
-
-    public Map<String, JSONObject> getTreat() {
-        return treat;
-    }
-
-    public void setTreat(Map<String, JSONObject> treat) {
-        this.treat = treat;
-    }
-
-    public List<FeatureRate> getHistory() {
-        return history;
-    }
-
-    public void setHistory(List<FeatureRate> history) {
-        this.history = history;
-    }
-}

+ 0 - 207
graph-web/src/main/java/org/diagbot/graphWeb/work/SearchData.java

@@ -1,207 +0,0 @@
-package org.diagbot.graphWeb.work;
-
-import org.algorithm.util.AlgorithmClassify;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-public class SearchData {
-    private int length = 10;
-    private int age_start = 0;
-    private int age_end = 200;
-    private int age = 0;
-    private String sex;
-    // 搜索结果的贝叶斯阈值
-    private String threshold = "0";
-    //特征类别
-    private String featureType;
-    //特征类别对","进行分割后数据
-    private String[] featureTypes;
-    //门诊 住院分类
-    private String resourceType;
-    //模型
-    private AlgorithmClassify algorithmClassify[];
-    //模型
-    private String algorithmClassifyValue;
-    //外部系统编码 用于返回映射数据,如果sysCode为空或null,则返回kl_standard_info标准名称
-    private String sysCode;
-    private List<LisDetail> lisArr = new ArrayList<>();
-    private String symptom = "";
-    private String vital = "";
-    private String lis = "";
-    private String pacs = "";
-
-    public List<LisDetail> getLisArr() {
-        return lisArr;
-    }
-
-    public void setLisArr(List<LisDetail> lisArr) {
-        this.lisArr = lisArr;
-    }
-
-    private String diag = "";
-    private String past = "";
-    private String other = "";
-
-    private Map<String, Map<String, String>> inputs = new HashMap<>(10, 0.8f);
-
-    public int getLength() {
-        return length;
-    }
-
-    public void setLength(int length) {
-        this.length = length;
-    }
-
-    public int getAge_start() {
-        return age_start;
-    }
-
-    public void setAge_start(int age_start) {
-        this.age_start = age_start;
-    }
-
-    public int getAge_end() {
-        return age_end;
-    }
-
-    public void setAge_end(int age_end) {
-        this.age_end = age_end;
-    }
-
-    public int getAge() {
-        return age;
-    }
-
-    public void setAge(int age) {
-        this.age = age;
-    }
-
-    public String getSex() {
-        return sex;
-    }
-
-    public void setSex(String sex) {
-        this.sex = sex;
-    }
-
-    public String getFeatureType() {
-        return featureType;
-    }
-
-    public void setFeatureType(String featureType) {
-        this.featureType = featureType;
-    }
-
-    public String[] getFeatureTypes() {
-        return featureTypes;
-    }
-
-    public void setFeatureTypes(String[] featureTypes) {
-        this.featureTypes = featureTypes;
-    }
-
-    public String getResourceType() {
-        return resourceType;
-    }
-
-    public void setResourceType(String resourceType) {
-        this.resourceType = resourceType;
-    }
-
-    public String getSysCode() {
-        return sysCode;
-    }
-
-    public void setSysCode(String sysCode) {
-        this.sysCode = sysCode;
-    }
-
-    public void setThreshold(String threshold) {
-        this.threshold = threshold;
-    }
-
-    public float getThreshold() { return Float.parseFloat(threshold); }
-
-    public Map<String, Map<String, String>> getInputs() {
-        return inputs;
-    }
-
-    public void setInputs(Map<String, Map<String, String>> inputs) {
-        this.inputs = inputs;
-    }
-
-    public String getAlgorithmClassifyValue() {
-        return algorithmClassifyValue;
-    }
-
-    public void setAlgorithmClassifyValue(String algorithmClassifyValue) {
-        this.algorithmClassifyValue = algorithmClassifyValue;
-    }
-
-    public AlgorithmClassify[] getAlgorithmClassify() {
-        return algorithmClassify;
-    }
-
-    public void setAlgorithmClassify(AlgorithmClassify[] algorithmClassify) {
-        this.algorithmClassify = algorithmClassify;
-    }
-
-    public String getSymptom() {
-        return symptom;
-    }
-
-    public void setSymptom(String symptom) {
-        this.symptom = symptom;
-    }
-
-    public String getVital() {
-        return vital;
-    }
-
-    public void setVital(String vital) {
-        this.vital = vital;
-    }
-
-    public String getLis() {
-        return lis;
-    }
-
-    public void setLis(String lis) {
-        this.lis = lis;
-    }
-
-    public String getPacs() {
-        return pacs;
-    }
-
-    public void setPacs(String pacs) {
-        this.pacs = pacs;
-    }
-
-    public String getDiag() {
-        return diag;
-    }
-
-    public void setDiag(String diag) {
-        this.diag = diag;
-    }
-
-    public String getPast() {
-        return past;
-    }
-
-    public void setPast(String past) {
-        this.past = past;
-    }
-
-    public String getOther() {
-        return other;
-    }
-
-    public void setOther(String other) {
-        this.other = other;
-    }
-}

+ 1 - 0
push-web/src/main/resources/static/index.html

@@ -68,6 +68,7 @@
             <li class="active"><a href="/push-web/extract/index"><i class="fa fa-circle-o"></i>提取特征</a></li>
             <li class="active"><a href="/push-web/relation/index"><i class="fa fa-circle-o"></i>关系抽取</a></li>
             <li class="active"><a href="/push-web/algorithm/index"><i class="fa fa-circle-o"></i>算法分析</a></li>
+            <li class="active"><a href="/push-web/graph/index"><i class="fa fa-circle-o"></i>知识图谱分析</a></li>
           </ul>
         </li>
       </ul>