瀏覽代碼

推送危急值,detail里的名字修改

kongwz 5 年之前
父節點
當前提交
152b62051b
共有 1 個文件被更改,包括 9 次插入2 次删除
  1. 9 2
      push-web/src/main/java/org/diagbot/push/convert/PreProcess.java

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

@@ -195,12 +195,15 @@ public class PreProcess {
             if (null == numval && otherval.trim().length() > 0) {
                 for (Rule rule : rules) {
                     if (rule.getMin_operator().equals("=") && otherval.contains(rule.getMin_value())) {
+                        StringBuffer rulesContent = new StringBuffer();
+                        StringBuffer append = rulesContent.append(rule.getIdx_name()).append(rule.getMin_operator()).append(rule.getMin_value()).append(rule.getMin_unit())
+                                .append(rule.getMax_operator()).append(rule.getMax_value()).append(rule.getMax_unit());
                         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("name",otherval);
+                        jsonObject.put("name",append.toString());
                         jsonObject.put("controlType",2);
                         mid.setType(4);
                         mid.setContent(jsonObject);
@@ -245,12 +248,16 @@ public class PreProcess {
                     } else { maxmatch = true; }
 
                     if (minmatch && maxmatch) {
+                        StringBuffer rulesContent = new StringBuffer();
+                        StringBuffer append = rulesContent.append(rule.getIdx_name()).append(rule.getMin_operator()).append(rule.getMin_value()).append(rule.getMin_unit())
+                                .append(rule.getMax_operator()).append(rule.getMax_value()).append(rule.getMax_unit());
+
                         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("name", numval + " " + unit);
+                        jsonObject.put("name", append.toString());
                         jsonObject.put("controlType",2);
                         mid.setType(4);
                         mid.setContent(jsonObject);