소스 검색

Merge remote-tracking branch 'origin/push-grade' into push-test

kongwz 5 년 전
부모
커밋
2cc73d3fd1

+ 1 - 0
common-service/src/main/java/org/diagbot/common/javabean/MedicalIndication.java

@@ -34,4 +34,5 @@ public class MedicalIndication {
     public void setDetails(List<MedicalIndicationDetail> details) {
         this.details = details;
     }
+
 }

+ 1 - 1
common-service/src/main/java/org/diagbot/common/javabean/MedicalIndicationDetail.java

@@ -3,7 +3,7 @@ package org.diagbot.common.javabean;
 import com.alibaba.fastjson.JSONObject;
 
 public class MedicalIndicationDetail {
-    private Integer type;//1-量表,2-公式,3-其他指标
+    private Integer type;//1-量表,2-公式,3-其他指标,4-危急值
     private JSONObject content;
 
     public Integer getType() {

+ 1 - 10
push-web/src/main/java/org/diagbot/push/controller/AlgorithmController.java

@@ -164,16 +164,7 @@ public class AlgorithmController extends BaseController {
         List<MedicalIndication> medicalIndications = graphResponseData.getMedicalIndications();
         if (medicalIndications != null && medicalIndications.size() > 0) {
             logger.info("指标推送!!!!!!!!!");
-            if(ruleMedicalIndications.size()>0){
-                for (MedicalIndication m:ruleMedicalIndications
-                     ) {
-                    MedicalIndication mI = new MedicalIndication();
-                    mI.setName(m.getName());
-                    medicalIndications.add(mI);
-                }
-            }
-
-            bigDataResponseData.setMedicalIndications(medicalIndications);
+           bigDataResponseData.getMedicalIndications().addAll(medicalIndications);
         }
         //推送管理评估
         bigDataResponseData.setManagementEvaluation(graphResponseData.getManagementEvaluation());

+ 20 - 2
push-web/src/main/java/org/diagbot/push/convert/PreProcess.java

@@ -1,7 +1,9 @@
 package org.diagbot.push.convert;
 
+import com.alibaba.fastjson.JSONObject;
 import org.diagbot.bigdata.common.ApplicationCacheUtil;
 import org.diagbot.common.javabean.MedicalIndication;
+import org.diagbot.common.javabean.MedicalIndicationDetail;
 import org.diagbot.common.javabean.Rule;
 import org.diagbot.common.work.LisDetail;
 import org.diagbot.common.work.ResponseData;
@@ -194,8 +196,16 @@ public class PreProcess {
                 for (Rule rule : rules) {
                     if (rule.getMin_operator().equals("=") && otherval.contains(rule.getMin_value())) {
                         MedicalIndication medind = new MedicalIndication();
+                        List<MedicalIndicationDetail> k = new ArrayList<>();
+                        MedicalIndicationDetail mid = new MedicalIndicationDetail();
+                        JSONObject jsonObject = new JSONObject();
+                        jsonObject.put("name",detailname + ": " + otherval+ ", " +rule.getRemind());
+                        jsonObject.put("controlType",2);
+                        mid.setType(4);
+                        mid.setContent(jsonObject);
+                        k.add(mid);
                         medind.setName(rule.getRemind());
-                        medind.setRule(detailname + ": " + otherval);
+                        medind.setDetails(k);
                         reminder.add(medind);
 
                         System.out.println(medind.getRule() + " -> " + medind.getName());
@@ -235,8 +245,16 @@ public class PreProcess {
 
                     if (minmatch && maxmatch) {
                         MedicalIndication medind = new MedicalIndication();
+                        List<MedicalIndicationDetail> k = new ArrayList<>();
+                        MedicalIndicationDetail mid = new MedicalIndicationDetail();
+                        JSONObject jsonObject = new JSONObject();
+                        jsonObject.put("name",detailname + ": " + numval + " " + unit+ "," +rule.getRemind());
+                        jsonObject.put("controlType",2);
+                        mid.setType(4);
+                        mid.setContent(jsonObject);
+                        k.add(mid);
                         medind.setName(rule.getRemind());
-                        medind.setRule(detailname + ": " + numval + " " + unit);
+                        medind.setDetails(k);
                         reminder.add(medind);
 
                         System.out.println(medind.getRule() + " -> " + medind.getName());