浏览代码

5推送lis,6推送pacs

kongwz 6 年之前
父节点
当前提交
9366a486f8

+ 2 - 2
graph/src/main/java/org/diagbot/graph/jdbc/Neo4jAPI.java

@@ -663,7 +663,7 @@ public class Neo4jAPI {
             session = driver.session(AccessMode.WRITE);
             logger.info("session 为: " + session);
             //第一步查询是否有组合的词
-            query = propertiesUtil.getProperty("searchCollection").replace("fildList", fildList.toString());
+            query = propertiesUtil.getProperty("searchCollection1").replace("fildList", fildList.toString());
             result = session.run(query);
             while (result.hasNext()) {
                 Record next = result.next();
@@ -694,7 +694,7 @@ public class Neo4jAPI {
             newList.addAll(fildList);
             int i = 0;
             while (newList.size() > 0) {
-                query = propertiesUtil.getProperty("searchCondition").replace("newList", newList.toString()).replace("fildList", fildList.toString());
+                query = propertiesUtil.getProperty("searchCondition1").replace("newList", newList.toString()).replace("fildList", fildList.toString());
                 result = session.run(query);
                 newList.clear();
                 while (result.hasNext()) {

+ 6 - 8
graph/src/main/resources/bolt.properties

@@ -26,9 +26,8 @@ match (n)-[r:\u5C5E\u4E8E]->(m)-[r1:\u7EC4\u5408]->(k) \n \
 where n.name= row \n \
 return m.name as condition, count(distinct r)>=m.path as jundgement, labels(m)[0] as label,k.name as standName
 
-searchCollection1=with fildList as data \n \
-match (n)-[r:\u5C5E\u4E8E]->(m)-[r1:\u7EC4\u5408]->(k) \n \
-where n.name in data \n \
+searchCollection1=match (n)-[r:\u5C5E\u4E8E]->(m)-[r1:\u7EC4\u5408]->(k) \n \
+where n.name in fildList \n \
 return m.name as condition, count(distinct r)>=m.path as jundgement, labels(m)[0] as label,k.name as standName
 #\u67E5\u627E\u8FD1\u4E49\u8BCD\u7CBE\u534E\u7248
 serchCollect=match (n)-[r:\u8BCA\u65AD\u4F9D\u636E|:\u8FD1\u4E49\u8BCD]->(e) where n.name in fildList return n.name as fild,collect(distinct type(r)) as typeCollect
@@ -41,12 +40,11 @@ match (n)-[r:\u8BCA\u65AD\u4F9D\u636E]->(m)\n \
 where n.name= row\n \
 return m.name as condition, count(distinct r)>=m.path as jundgement, labels(m)[0] as label
 
-searchCondition1=with newList as data\n \
-match (l)-[r:\u8BCA\u65AD\u4F9D\u636E]->(m)\n \
-where l.name in data\n \
-with m,fildList as data1\n \
+searchCondition1=match (l)-[r:\u8BCA\u65AD\u4F9D\u636E]->(m)\n \
+where l.name in newList\n \
+with m,fildList\n \
 match (n)-[r:\u8BCA\u65AD\u4F9D\u636E]->(m)\n \
-where n.name in data1\n \
+where n.name in fildList\n \
 return m.name as condition, count(distinct r)>=m.path as jundgement, labels(m)[0] as label
 #\u67E5\u627E\u786E\u8BCA,\u62DF\u8BCA\u7684\u8BED\u53E5
 searchQuezhen=match (n)-[r:\u786E\u8BCA|:\u62DF\u8BCA]->(m:Disease)\n \

+ 6 - 2
push-web/src/main/java/org/diagbot/push/controller/AlgorithmController.java

@@ -108,10 +108,14 @@ public class AlgorithmController extends BaseController {
         //推送管理评估
         bigDataResponseData.setManagementEvaluation(graphResponseData.getManagementEvaluation());
         //知识图谱直接替换大数据中的检验检查数据
+        List<String> featrueList = Arrays.asList(searchData.getFeatureType().split(","));
         if(searchData.getDiag() !=null || searchData.getPushDiags() != null){
             graphResponseData = lisPacsCalculate.getLisPacs(request, searchData);
-            bigDataResponseData.setLabs(graphResponseData.getLabs());
-            bigDataResponseData.setPacs(graphResponseData.getPacs());
+            if(featrueList.contains("5")){
+                bigDataResponseData.setLabs(graphResponseData.getLabs());
+            }else if(featrueList.contains("6")){
+                bigDataResponseData.setPacs(graphResponseData.getPacs());
+            }
         }
         response.setData(bigDataResponseData);
         return response;