Selaa lähdekoodia

Merge remote-tracking branch 'origin/push-dev-filter' into push-test

# Conflicts:
#	push-web/src/main/resources/static/dist/js/push.js
kongwz 5 vuotta sitten
vanhempi
commit
7e0774c1ed

+ 27 - 3
common-push/src/main/java/org/diagbot/common/push/filter/ClassifyDiag.java

@@ -116,11 +116,12 @@ public class ClassifyDiag {
          * 这里处理一下可能诊断剔除的功能
          * 如果图谱推出的诊断和可能诊断有层级关系,就把对应的可能诊断剔除
          */
+        Set<String> queSet =null;
         List<String> newBIgDiagList = this.removeKeng(queDiagList, bigDiagList);
         System.out.println("图谱归一前数据 :"+queDiagList);
         if(queDiagList != null && queDiagList.size()>0){
             //图谱归一 ,图谱sign =0,大数据sign = 1
-            Set<String> queSet = this.diagProcess(queDiagList,0);
+            queSet = this.diagProcess(queDiagList,0);
             System.out.println("图谱归一后的数据    :"+queSet);
             if(queSet != null && queSet.size()>0){
                 for (String queDis:queSet) {
@@ -144,6 +145,15 @@ public class ClassifyDiag {
         if(newBIgDiagList!= null && newBIgDiagList.size()>0){
             //大数据的可能诊断归一和排序
             List<FeatureRate> featureRates = this.sortFeatureList(newBIgDiagList, updateFeatures);
+            //把可能诊断中和图谱相同的诊断去除
+            if(featureRates != null && featureRates.size()>0 && queSet !=null){
+                for (FeatureRate f:featureRates) {
+                    if(queSet.contains(f.getFeatureName())){
+                        featureRates.remove(f);
+                        continue;
+                    }
+                }
+            }
             finalDiagList.addAll(featureRates);
         }
 
@@ -393,12 +403,26 @@ public class ClassifyDiag {
                     //如果能找到就把相关联的rate加起来
                     testCollect.add(queDis);
 
-                    String s = diagClassifyCache.get(queDis);
+                    String s = null;
+                    s= diagClassifyCache.get(queDis);
                     if(s != null){
                         testCollect.add(s);
+                        s = diagClassifyCache.get(s);
+                        if(s != null){
+                            testCollect.add(s);
+                        }
                     }
-                    List<Object> key = this.getKey(diagClassifyCache, queDis);
+                    List<Object> key =null;
+                    key = this.getKey(diagClassifyCache, queDis);
                     testCollect.addAll(key);
+                    if(key != null && key.size()>0){
+                        for (Object o:key) {
+                            key = this.getKey(diagClassifyCache,o.toString());
+                            if(key!= null){
+                                testCollect.addAll(key);
+                            }
+                        }
+                    }
                     Double count = 0.0;
                     for (String dis:diss) {
                         if(testCollect.indexOf(dis) >= 0){

+ 3 - 3
graph-web/src/main/resources/url.properties

@@ -1,5 +1,5 @@
-highrisk.http.url=http://192.168.2.241:5004/knowledge/getHighRisk
-lisPacs.http.url=http://192.168.2.241:5004/knowledge/getLisPacs
-disease.http.url=http://192.168.2.241:5004/knowledge/getDisease
+highrisk.http.url=http://192.168.2.234:5004/knowledge/getHighRisk
+lisPacs.http.url=http://192.168.2.234:5004/knowledge/getLisPacs
+disease.http.url=http://192.168.2.234:5004/knowledge/getDisease
 #lisPacs.http.url=http://192.168.3.9:5004/knowledge/getLisPacs
 #highrisk.http.url=http://192.168.3.9:5004/knowledge/getHighRisk

+ 3 - 3
push-web/src/main/resources/static/dist/js/push.js

@@ -1,6 +1,6 @@
-var nlp_web_url = "http://192.168.2.241:5002/nlp-web";
-var bigdata_web_url = "http://192.168.2.241:5001/bigdata-web";
-var graph_web_url = "http://192.168.2.241:5003/graph-web";
+var nlp_web_url = "http://192.168.2.234:5002/nlp-web";
+var bigdata_web_url = "http://192.168.2.234:5001/bigdata-web";
+var graph_web_url = "http://192.168.2.234:5003/graph-web";
 // var push_web_url = "http://192.168.2.234:5008/push-web";
 
 // var nlp_web_url = "http://192.168.3.180:5002/nlp-web";