|
@@ -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,9 +196,16 @@ public class PreProcess {
|
|
|
for (Rule rule : rules) {
|
|
|
if (rule.getMin_operator().equals("=") && otherval.contains(rule.getMin_value())) {
|
|
|
MedicalIndication medind = new MedicalIndication();
|
|
|
- medind.setSource(2);
|
|
|
+ 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.setDescription(detailname + ": " + otherval+ ", " +rule.getRemind() );
|
|
|
+ medind.setDetails(k);
|
|
|
reminder.add(medind);
|
|
|
|
|
|
System.out.println(medind.getRule() + " -> " + medind.getName());
|
|
@@ -236,9 +245,16 @@ public class PreProcess {
|
|
|
|
|
|
if (minmatch && maxmatch) {
|
|
|
MedicalIndication medind = new MedicalIndication();
|
|
|
- medind.setSource(2);
|
|
|
+ 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.setDescription(detailname + ": " + numval + " " + unit+ "," +rule.getRemind());
|
|
|
+ medind.setDetails(k);
|
|
|
reminder.add(medind);
|
|
|
|
|
|
System.out.println(medind.getRule() + " -> " + medind.getName());
|