Преглед изворни кода

检验检查使用知识图谱

louhr пре 6 година
родитељ
комит
1050a99d96

+ 9 - 7
push-web/src/main/java/org/diagbot/push/controller/AlgorithmController.java

@@ -52,12 +52,6 @@ public class AlgorithmController extends BaseController {
         Response<ResponseData> response = new Response();
         AlgorithmCore core = new AlgorithmCore();
         ResponseData bigDataResponseData = core.algorithm(request, searchData);
-        //推送出的诊断信息作为参数传入知识图谱
-        List<String> pushDiags = new ArrayList<>();
-        for (FeatureRate fr : bigDataResponseData.getDis()) {
-            pushDiags.add(fr.getFeatureName());
-        }
-        searchData.setPushDiags(pushDiags);
 
         GraphCalculate graphCalculate = new GraphCalculate();
         ResponseData graphResponseData = graphCalculate.calculate(request, searchData);
@@ -82,9 +76,17 @@ public class AlgorithmController extends BaseController {
             //大数据推送疾病数据用知识图谱替换
             bigDataResponseData.setDis(graphFeatureRates);
         }
-        bigDataResponseData.setTreat(graphResponseData.getTreat());
 
+        //推送出的诊断信息作为参数传入知识图谱
+        List<String> pushDiags = new ArrayList<>();
+        for (FeatureRate fr : bigDataResponseData.getDis()) {
+            pushDiags.add(fr.getFeatureName());
+        }
+        searchData.setPushDiags(pushDiags);
+
+        bigDataResponseData.setTreat(graphResponseData.getTreat());
         //知识图谱直接替换大数据中的检验检查数据
+        graphResponseData = graphCalculate.getLisPacs(request, searchData);
 //        if (!StringUtils.isEmpty(searchData.getDiag())) {
         bigDataResponseData.setLabs(graphResponseData.getLabs());
         bigDataResponseData.setPacs(graphResponseData.getPacs());

+ 21 - 21
push-web/src/main/resources/static/pages/algorithm/list.html

@@ -349,22 +349,22 @@
         var symptom = $("#symptom").val();
         if (diag != '' && symptom == '') {
             $('#diag_list').html("");
-            startDiag('/algorithm/page_neural', '#symptom_list', '1', resourceType, '111');
-            startDiag('/algorithm/page_neural', '#vital_list', '3', resourceType, '131');
-            startDiag('/algorithm/page_neural', '#lis_list', '4', resourceType, '141');
-            startDiag('/algorithm/page_neural', '#pacs_list', '5', resourceType, '151');
+            startDiag('/algorithm/page_neural', '#symptom_list', '1,2,3,4,5', resourceType, '111', '1');
+            startDiag('/algorithm/page_neural', '#vital_list', '1,2,3,4,5', resourceType, '131', '3');
+            startDiag('/algorithm/page_neural', '#lis_list', '1,2,3,4,5', resourceType, '141', '4');
+            startDiag('/algorithm/page_neural', '#pacs_list', '1,2,3,4,5', resourceType, '151', '5');
 
         } else {
-            startDiag('/algorithm/page_neural', '#symptom_list', '1', resourceType, '11');
-            startDiag('/algorithm/page_neural', '#vital_list', '3', resourceType, '31');
-            startDiag('/algorithm/page_neural', '#lis_list', '4', resourceType, '41');
-            startDiag('/algorithm/page_neural', '#pacs_list', '5', resourceType, '51');
+            startDiag('/algorithm/page_neural', '#symptom_list', '1,2,3,4,5', resourceType, '11', '1');
+            startDiag('/algorithm/page_neural', '#vital_list', '1,2,3,4,5', resourceType, '31', '3');
+            startDiag('/algorithm/page_neural', '#lis_list', '1,2,3,4,5', resourceType, '41', '4');
+            startDiag('/algorithm/page_neural', '#pacs_list', '1,2,3,4,5', resourceType, '51', '5');
 
-            startDiagMapping('/algorithm/page_neural', '#diag_list', '2', resourceType, '21');
+            startDiagMapping('/algorithm/page_neural', '#diag_list', '1,2,3,4,5', resourceType, '21', '2');
         }
     }
 
-    function startDiagMapping(url, obj, featureType, resourceType, algorithmClassify) {
+    function startDiagMapping(url, obj, featureType, resourceType, algorithmClassify, tp) {
         $(obj).DataTable({
             "paging": false,
             "bPaginate" : true,
@@ -431,23 +431,23 @@
                     });
                     $("#feature_inputs_div").html(h);
 
-                    if (featureType == '1') {
+                    if (tp == '1') {
                         $("#participle_symptom").html(json.data.participleSymptom);
                         json.data = json.data.symptom;
                     }
-                    if (featureType == '2') {
+                    if (tp == '2') {
                         $("#participle_diag").html(json.data.participleSymptom);
                         json.data = json.data.dis;
                     }
-                    if (featureType == '3') {
+                    if (tp == '3') {
                         $("#participle_vital").html(json.data.participleSymptom);
                         json.data = json.data.vitals;
                     }
-                    if (featureType == '4') {
+                    if (tp == '4') {
                         $("#participle_lis").html(json.data.participleSymptom);
                         json.data = json.data.labs;
                     }
-                    if (featureType == '5') {
+                    if (tp == '5') {
                         $("#participle_pacs").html(json.data.participleSymptom);
                         json.data = json.data.pacs;
                     }
@@ -459,7 +459,7 @@
     }
 
 
-    function startDiag(url, obj, featureType, resourceType, algorithmClassify) {
+    function startDiag(url, obj, featureType, resourceType, algorithmClassify, tp) {
         $(obj).DataTable({
             "paging": false,
             "bPaginate" : true,
@@ -531,23 +531,23 @@
                     });
                     $("#feature_inputs_div").html(h);
 
-                    if (featureType == '1') {
+                    if (tp == '1') {
                         $("#participle_symptom").html(json.data.participleSymptom);
                         json.data = json.data.symptom;
                     }
-                    if (featureType == '2') {
+                    if (tp == '2') {
                         $("#participle_diag").html(json.data.participleSymptom);
                         json.data = json.data.dis;
                     }
-                    if (featureType == '3') {
+                    if (tp == '3') {
                         $("#participle_vital").html(json.data.participleSymptom);
                         json.data = json.data.vitals;
                     }
-                    if (featureType == '4') {
+                    if (tp == '4') {
                         $("#participle_lis").html(json.data.participleSymptom);
                         json.data = json.data.labs;
                     }
-                    if (featureType == '5') {
+                    if (tp == '5') {
                         $("#participle_pacs").html(json.data.participleSymptom);
                         json.data = json.data.pacs;
                     }