|
@@ -1,5 +1,6 @@
|
|
package org.diagbot.service.impl;
|
|
package org.diagbot.service.impl;
|
|
|
|
|
|
|
|
+import com.alibaba.fastjson.JSONObject;
|
|
import org.diagbot.entity.node.LIS;
|
|
import org.diagbot.entity.node.LIS;
|
|
import org.diagbot.entity.node.Symptom;
|
|
import org.diagbot.entity.node.Symptom;
|
|
import org.diagbot.mapper.KnowledgeMapper;
|
|
import org.diagbot.mapper.KnowledgeMapper;
|
|
@@ -201,10 +202,17 @@ public class KnowledgeServiceImpl implements KnowledgeService {
|
|
@Override
|
|
@Override
|
|
public ResponseData getDis(SearchData searchData) {
|
|
public ResponseData getDis(SearchData searchData) {
|
|
ResponseData responseData = new ResponseData();
|
|
ResponseData responseData = new ResponseData();
|
|
|
|
+ String[] featureTypes = searchData.getFeatureType().split(",");
|
|
|
|
+ List<String> featureTypeList = Arrays.asList(featureTypes);
|
|
|
|
+ logger.info("前端传来的features :"+featureTypeList);
|
|
List<String> newList = new ArrayList<>();
|
|
List<String> newList = new ArrayList<>();
|
|
List<String> inputList = new ArrayList<>();
|
|
List<String> inputList = new ArrayList<>();
|
|
Map<String, Map<String, String>> inputs = searchData.getInputs();
|
|
Map<String, Map<String, String>> inputs = searchData.getInputs();
|
|
|
|
+ Integer diseaseType = searchData.getDisType();
|
|
|
|
+ logger.info("diseaseType为 :"+diseaseType);
|
|
Set<String> ss = inputs.keySet();
|
|
Set<String> ss = inputs.keySet();
|
|
|
|
+ logger.info("分词系统传来的词: "+ss);
|
|
|
|
+ logger.info("图谱开始根据传来的分词计算诊断.....");
|
|
inputList.addAll(ss);
|
|
inputList.addAll(ss);
|
|
//图谱计算是否有组合词
|
|
//图谱计算是否有组合词
|
|
List<Map<String, Object>> collectionWord = baseNodeRepository.getCollectionWord(inputList);
|
|
List<Map<String, Object>> collectionWord = baseNodeRepository.getCollectionWord(inputList);
|
|
@@ -222,7 +230,7 @@ public class KnowledgeServiceImpl implements KnowledgeService {
|
|
for (Map<String, Object> word:collectJYWord) {
|
|
for (Map<String, Object> word:collectJYWord) {
|
|
String fild = word.get("fild").toString();
|
|
String fild = word.get("fild").toString();
|
|
String[] typeCollect = (String[])word.get("typeCollect");
|
|
String[] typeCollect = (String[])word.get("typeCollect");
|
|
- if(typeCollect.length == 1 && "近义词".equals(typeCollect[0].toString())){
|
|
|
|
|
|
+ if(typeCollect.length == 1 && "近义词".equals(typeCollect[0])){
|
|
List<Map<String, Object>> jyWord = baseNodeRepository.getJYWord(fild);
|
|
List<Map<String, Object>> jyWord = baseNodeRepository.getJYWord(fild);
|
|
if(jyWord !=null && jyWord.size()>0){
|
|
if(jyWord !=null && jyWord.size()>0){
|
|
for (Map<String, Object> ji:jyWord) {
|
|
for (Map<String, Object> ji:jyWord) {
|
|
@@ -260,25 +268,43 @@ public class KnowledgeServiceImpl implements KnowledgeService {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ logger.info("图谱计算出来的诊断为: "+que);
|
|
List<FeatureRate> featureRates = new ArrayList<>();
|
|
List<FeatureRate> featureRates = new ArrayList<>();
|
|
if(que !=null && que.size()>0){
|
|
if(que !=null && que.size()>0){
|
|
for (String quezhen:que) {
|
|
for (String quezhen:que) {
|
|
- FeatureRate featureRate = new FeatureRate();
|
|
|
|
- featureRate.setFeatureName(quezhen);
|
|
|
|
- featureRate.setExtraProperty("");
|
|
|
|
- if("低血糖反应".equals(quezhen) || "胃肠道不良反应".equals(quezhen)){
|
|
|
|
- featureRate.setDesc("不良反应");
|
|
|
|
|
|
+ if(!"低血糖反应".equals(quezhen) && !"胃肠道不良反应".equals(quezhen)
|
|
|
|
+ && !"肾功能不全".equals(quezhen)){
|
|
|
|
+ FeatureRate featureRate = new FeatureRate();
|
|
|
|
+ featureRate.setFeatureName(quezhen);
|
|
|
|
+ featureRate.setExtraProperty("");
|
|
|
|
+ featureRate.setDesc(quezhen);
|
|
|
|
+ featureRate.setRate("neo4j");
|
|
|
|
+ featureRates.add(featureRate);
|
|
}
|
|
}
|
|
- featureRate.setDesc("");
|
|
|
|
- featureRate.setRate("neo4j");
|
|
|
|
- featureRates.add(featureRate);
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
String webDiag = searchData.getDiag();
|
|
String webDiag = searchData.getDiag();
|
|
- if(webDiag.trim()!=null){
|
|
|
|
- Map<String, Filnlly> mulDiseaseTreat = processTreat(webDiag, ss);
|
|
|
|
|
|
+ logger.info("界面输入的诊断为: "+webDiag);
|
|
|
|
+ if(webDiag.trim()!=null && webDiag.trim() !="" && featureTypeList.contains("8")){
|
|
|
|
+ logger.info("界面有诊断,并且features包含8,可以走治疗方案");
|
|
|
|
+ Map<String, Filnlly> mulDiseaseTreat = processTreat(webDiag, ss,diseaseType,que);
|
|
responseData.setTreat(mulDiseaseTreat);
|
|
responseData.setTreat(mulDiseaseTreat);
|
|
}
|
|
}
|
|
|
|
+ if(featureTypeList.contains("22") && que != null && que.size()>0){
|
|
|
|
+ logger.info("图谱推送有疑诊,并且features包含22,可以走右侧推送");
|
|
|
|
+ List<MedicalIndication> medicalIndicationList = new ArrayList<>();
|
|
|
|
+ MedicalIndication medicalIndication = this.getMedicalIndication(que);
|
|
|
|
+ medicalIndicationList.add(medicalIndication);
|
|
|
|
+ responseData.setMedicalIndications(medicalIndicationList);
|
|
|
|
+ }
|
|
|
|
+ if(featureTypeList.contains("11") && diseaseType == 1 && diseaseType !=null) {
|
|
|
|
+ logger.info("featureTypeList 包含11,走管理评估!!!");
|
|
|
|
+// MangementEvaluation mangementEvaluation = this.getMangementEvaluation();
|
|
|
|
+// Map<String, JSONObject> mangementEvaluation1 = mangementEvaluation.getMangementEvaluation();
|
|
|
|
+// responseData.setManagementEvaluation(mangementEvaluation1);
|
|
|
|
+ Map test = this.getTest();
|
|
|
|
+ responseData.setManagementEvaluation(test);
|
|
|
|
+ }
|
|
responseData.setDis(featureRates);
|
|
responseData.setDis(featureRates);
|
|
return responseData;
|
|
return responseData;
|
|
}
|
|
}
|
|
@@ -383,7 +409,7 @@ public class KnowledgeServiceImpl implements KnowledgeService {
|
|
* 处理治疗
|
|
* 处理治疗
|
|
* @param
|
|
* @param
|
|
*/
|
|
*/
|
|
- public Map<String, Filnlly> processTreat(String webDisease,Set<String> inputFilds){
|
|
|
|
|
|
+ public Map<String, Filnlly> processTreat(String webDisease,Set<String> inputFilds,Integer disType,List<String> que){
|
|
Map<String, Filnlly> diagTreat = new HashMap<>();
|
|
Map<String, Filnlly> diagTreat = new HashMap<>();
|
|
NumberFormat nf = NumberFormat.getPercentInstance();
|
|
NumberFormat nf = NumberFormat.getPercentInstance();
|
|
nf.setMinimumFractionDigits(0);//设置该百分比数字,保留2位小数;
|
|
nf.setMinimumFractionDigits(0);//设置该百分比数字,保留2位小数;
|
|
@@ -528,59 +554,317 @@ public class KnowledgeServiceImpl implements KnowledgeService {
|
|
drugsList.add(drugs);
|
|
drugsList.add(drugs);
|
|
}
|
|
}
|
|
Filnlly filnlly = new Filnlly();
|
|
Filnlly filnlly = new Filnlly();
|
|
- List<Indicators> indicatorsList1 = new ArrayList<>();
|
|
|
|
- List<Detail> detailList1 = new ArrayList<>();
|
|
|
|
- Detail detail1 = new Detail();
|
|
|
|
- detail1.setName("无");
|
|
|
|
- detail1.setValue(0);
|
|
|
|
- Detail detail2 = new Detail();
|
|
|
|
- detail2.setName("偶尔");
|
|
|
|
- detail2.setValue(0);
|
|
|
|
- Detail detail3 = new Detail();
|
|
|
|
- detail3.setName("频");
|
|
|
|
- detail3.setValue(0);
|
|
|
|
- detailList1.add(detail1);
|
|
|
|
- detailList1.add(detail2);
|
|
|
|
- detailList1.add(detail3);
|
|
|
|
- Indicators indicators1 = new Indicators();
|
|
|
|
- indicators1.setName("低血糖反应");
|
|
|
|
- indicators1.setControlType(2);
|
|
|
|
- indicators1.setDetails(detailList1);
|
|
|
|
- indicatorsList1.add(indicators1);
|
|
|
|
-
|
|
|
|
- List<Detail> detailList2 = new ArrayList<>();
|
|
|
|
- Detail detail11 = new Detail();
|
|
|
|
- detail11.setName("腹胀");
|
|
|
|
- detail11.setValue(0);
|
|
|
|
- Detail detail12 = new Detail();
|
|
|
|
- detail12.setName("厌食");
|
|
|
|
- detail12.setValue(0);
|
|
|
|
- Detail detail13 = new Detail();
|
|
|
|
- detail13.setName("嗳气");
|
|
|
|
- detail13.setValue(0);
|
|
|
|
- Detail detail14 = new Detail();
|
|
|
|
- detail14.setName("恶心");
|
|
|
|
- detail14.setValue(0);
|
|
|
|
- Detail detail15 = new Detail();
|
|
|
|
- detail15.setName("呕吐");
|
|
|
|
- detail15.setValue(0);
|
|
|
|
- detailList2.add(detail11);
|
|
|
|
- detailList2.add(detail12);
|
|
|
|
- detailList2.add(detail13);
|
|
|
|
- detailList2.add(detail14);
|
|
|
|
- detailList2.add(detail15);
|
|
|
|
- Indicators indicators11 = new Indicators();
|
|
|
|
- indicators11.setName("胃肠道不良反应");
|
|
|
|
- indicators11.setControlType(2);
|
|
|
|
- indicators11.setDetails(detailList2);
|
|
|
|
- indicatorsList1.add(indicators11);
|
|
|
|
- filnlly.setAdverseEvent(indicatorsList1);
|
|
|
|
|
|
+ //走不良反应
|
|
|
|
+ if(disType !=null && 1==disType){
|
|
|
|
+ logger.info("disType=1,可以走不良反应!!");
|
|
|
|
+ List<Indicators> indicatorsList1 = new ArrayList<>();
|
|
|
|
+ Indicators indicators1 = getAdverse(que, "低血糖反应");
|
|
|
|
+ Indicators indicators2 = getAdverse(que, "胃肠道不良反应");
|
|
|
|
+ indicatorsList1.add(indicators1);
|
|
|
|
+ indicatorsList1.add(indicators2);
|
|
|
|
+ filnlly.setAdverseEvent(indicatorsList1);
|
|
|
|
+ }
|
|
filnlly.setTreatment(drugsList);
|
|
filnlly.setTreatment(drugsList);
|
|
diagTreat.put(disFild.getKey(),filnlly);
|
|
diagTreat.put(disFild.getKey(),filnlly);
|
|
}
|
|
}
|
|
return diagTreat;
|
|
return diagTreat;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 量表和指标
|
|
|
|
+ * @param diseaseSet 图谱推出的诊断
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ public MedicalIndication getMedicalIndication(List<String> diseaseSet){
|
|
|
|
+ MedicalIndication medicalIndication = new MedicalIndication();
|
|
|
|
+ if(diseaseSet.contains("肾功能不全")){
|
|
|
|
+ logger.info("diseaseSet中包含肾功能不全");
|
|
|
|
+ //推送指标
|
|
|
|
+ medicalIndication.setName("肾功能不全");
|
|
|
|
+ List<MedicalIndicationDetail> medicalIndicationDetailList = new ArrayList<>();
|
|
|
|
+ //量表
|
|
|
|
+ MedicalIndicationDetail medicalIndicationDetail1 = new MedicalIndicationDetail();
|
|
|
|
+ medicalIndicationDetail1.setType(1);
|
|
|
|
+ JSONObject liangJson = new JSONObject();
|
|
|
|
+ liangJson.put("name","密西根糖尿病周围神经病评分(MDNS)");
|
|
|
|
+ medicalIndicationDetail1.setContent(liangJson);
|
|
|
|
+ //公式
|
|
|
|
+ MedicalIndicationDetail medicalIndicationDetail2 = new MedicalIndicationDetail();
|
|
|
|
+ medicalIndicationDetail2.setType(2);
|
|
|
|
+ JSONObject gongshiJson = new JSONObject();
|
|
|
|
+ gongshiJson.put("name","肾小球滤过率");
|
|
|
|
+ List<JSONObject> detailList = new ArrayList<>();
|
|
|
|
+ JSONObject ageJsonObject = new JSONObject();
|
|
|
|
+ ageJsonObject.put("controlType",2);
|
|
|
|
+ ageJsonObject.put("name","年龄");
|
|
|
|
+ ageJsonObject.put("value","");
|
|
|
|
+ ageJsonObject.put("uint","");
|
|
|
|
+ ageJsonObject.put("details",new ArrayList<>());
|
|
|
|
+ JSONObject indicationJsonObject = new JSONObject();
|
|
|
|
+ indicationJsonObject.put("controlType",2);
|
|
|
|
+ indicationJsonObject.put("name","血肌酐");
|
|
|
|
+ indicationJsonObject.put("value","");
|
|
|
|
+ indicationJsonObject.put("uint","mg/dL");
|
|
|
|
+ indicationJsonObject.put("details",new ArrayList<>());
|
|
|
|
+ JSONObject sexJson = new JSONObject();
|
|
|
|
+ sexJson.put("controlType",1);
|
|
|
|
+ sexJson.put("name","性别");
|
|
|
|
+ sexJson.put("value","");
|
|
|
|
+ sexJson.put("uint","");
|
|
|
|
+ List<JSONObject> sexList = new ArrayList<>();
|
|
|
|
+ JSONObject manJson = new JSONObject();
|
|
|
|
+ manJson.put("detailName","男");
|
|
|
|
+ manJson.put("value",1);
|
|
|
|
+ manJson.put("state",0);
|
|
|
|
+ JSONObject womanJson = new JSONObject();
|
|
|
|
+ womanJson.put("detailName","女");
|
|
|
|
+ womanJson.put("value",1.018);
|
|
|
|
+ womanJson.put("state",1);
|
|
|
|
+ sexList.add(manJson);
|
|
|
|
+ sexList.add(womanJson);
|
|
|
|
+ sexJson.put("details",sexList);
|
|
|
|
+ detailList.add(ageJsonObject);
|
|
|
|
+ detailList.add(indicationJsonObject);
|
|
|
|
+ detailList.add(sexJson);
|
|
|
|
+ gongshiJson.put("details",detailList);
|
|
|
|
+ JSONObject resultJson = new JSONObject();
|
|
|
|
+ resultJson.put("value","");
|
|
|
|
+ resultJson.put("unit","");
|
|
|
|
+ resultJson.put("text","");
|
|
|
|
+ gongshiJson.put("result",resultJson);
|
|
|
|
+ medicalIndicationDetail2.setContent(gongshiJson);
|
|
|
|
+ //其他
|
|
|
|
+ MedicalIndicationDetail medicalIndicationDetail3 = new MedicalIndicationDetail();
|
|
|
|
+ medicalIndicationDetail3.setType(3);
|
|
|
|
+ JSONObject shiFouJson = new JSONObject();
|
|
|
|
+ shiFouJson.put("name","是否");
|
|
|
|
+ shiFouJson.put("controlType",0);
|
|
|
|
+ List<JSONObject> shiFouList = new ArrayList<>();
|
|
|
|
+ JSONObject shiJsonObject = new JSONObject();
|
|
|
|
+ shiJsonObject.put("detailName","是");
|
|
|
|
+ shiJsonObject.put("state",0);
|
|
|
|
+ JSONObject fouJsonObject = new JSONObject();
|
|
|
|
+ fouJsonObject.put("detailName","否");
|
|
|
|
+ fouJsonObject.put("state",1);
|
|
|
|
+ shiFouList.add(shiJsonObject);
|
|
|
|
+ shiFouList.add(fouJsonObject);
|
|
|
|
+ shiFouJson.put("details",shiFouList);
|
|
|
|
+ medicalIndicationDetail3.setContent(shiFouJson);
|
|
|
|
+ medicalIndicationDetailList.add(medicalIndicationDetail1);
|
|
|
|
+ medicalIndicationDetailList.add(medicalIndicationDetail2);
|
|
|
|
+ medicalIndicationDetailList.add(medicalIndicationDetail3);
|
|
|
|
+ medicalIndication.setDetails(medicalIndicationDetailList);
|
|
|
|
+ }
|
|
|
|
+ return medicalIndication;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 管理评估
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ public MangementEvaluation getMangementEvaluation(){
|
|
|
|
+ MangementEvaluation mangementEvaluation = new MangementEvaluation();
|
|
|
|
+ Map<String,JSONObject> mangementMap = new HashMap<>();
|
|
|
|
+ JSONObject curativeJson = new JSONObject();
|
|
|
|
+ List<JSONObject> itemJson = new ArrayList<>();
|
|
|
|
+ JSONObject bloodPressure = new JSONObject();
|
|
|
|
+ bloodPressure.put("controltype",0);
|
|
|
|
+ bloodPressure.put("name","血压控制情况");
|
|
|
|
+ List<JSONObject> bloodPressureLevelList = new ArrayList<>();
|
|
|
|
+ String[] items= {"正常","1级","2级","3级"};
|
|
|
|
+ for (String item:items) {
|
|
|
|
+ JSONObject iJson = new JSONObject();
|
|
|
|
+ iJson.put("detailName",item);
|
|
|
|
+ iJson.put("state",0);
|
|
|
|
+ bloodPressureLevelList.add(iJson);
|
|
|
|
+ }
|
|
|
|
+ bloodPressure.put("details",bloodPressureLevelList);
|
|
|
|
+ itemJson.add(bloodPressure);
|
|
|
|
+
|
|
|
|
+ JSONObject bmiControl = new JSONObject();
|
|
|
|
+ bmiControl.put("controltype",0);
|
|
|
|
+ bmiControl.put("name","BMI控制情况");
|
|
|
|
+ List<JSONObject> bmiControlLevelList = new ArrayList<>();
|
|
|
|
+ String[] bmiControlitems= {"体重过低","体重达标","肥胖前期","肥胖"};
|
|
|
|
+ for (String item:bmiControlitems) {
|
|
|
|
+ JSONObject iJson = new JSONObject();
|
|
|
|
+ iJson.put("detailName",item);
|
|
|
|
+ iJson.put("state",0);
|
|
|
|
+ bmiControlLevelList.add(iJson);
|
|
|
|
+ }
|
|
|
|
+ bmiControl.put("details",bmiControlLevelList);
|
|
|
|
+ itemJson.add(bmiControl);
|
|
|
|
+
|
|
|
|
+ JSONObject bloodFatControl = new JSONObject();
|
|
|
|
+ bloodFatControl.put("controltype",0);
|
|
|
|
+ bloodFatControl.put("name","血脂控制情况");
|
|
|
|
+ List<JSONObject> bloodFatControlLevelList = new ArrayList<>();
|
|
|
|
+ String[] bloodFatControlitems= {"高血脂"};
|
|
|
|
+ for (String item:bloodFatControlitems) {
|
|
|
|
+ JSONObject iJson = new JSONObject();
|
|
|
|
+ iJson.put("detailName",item);
|
|
|
|
+ iJson.put("state",0);
|
|
|
|
+ bloodFatControlLevelList.add(iJson);
|
|
|
|
+ }
|
|
|
|
+ bloodFatControl.put("details",bmiControlLevelList);
|
|
|
|
+ itemJson.add(bloodFatControl);
|
|
|
|
+ curativeJson.put("rows",itemJson);
|
|
|
|
+ //分级管理
|
|
|
|
+ JSONObject gradeJson = new JSONObject();
|
|
|
|
+ List<JSONObject> gradItemJson = new ArrayList<>();
|
|
|
|
+ JSONObject bigGrad = new JSONObject();
|
|
|
|
+ bigGrad.put("name","血压控制情况");
|
|
|
|
+ bigGrad.put("controltype",0);
|
|
|
|
+ List<JSONObject> gradItemJ = new ArrayList<>();
|
|
|
|
+ String[] gradItem ={"常规管理","强化管理"};
|
|
|
|
+ for (String item:gradItem) {
|
|
|
|
+ JSONObject j =new JSONObject();
|
|
|
|
+ j.put("detailName",item);
|
|
|
|
+ j.put("state",0);
|
|
|
|
+ gradItemJ.add(j);
|
|
|
|
+ }
|
|
|
|
+ bigGrad.put("details",gradItemJ);
|
|
|
|
+ gradItemJson.add(bigGrad);
|
|
|
|
+ gradeJson.put("rows",gradItemJson);
|
|
|
|
+ mangementMap.put("疗效评估",curativeJson);
|
|
|
|
+ mangementMap.put("糖尿病分级管理",gradeJson);
|
|
|
|
+ mangementEvaluation.setMangementEvaluation(mangementMap);
|
|
|
|
+ return mangementEvaluation;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public Map getTest(){
|
|
|
|
+ Map result = new HashMap();
|
|
|
|
+ //疗效评估
|
|
|
|
+ Map liaoXiaoMap = new HashMap();
|
|
|
|
+ List<Map> rowList = new ArrayList<>();
|
|
|
|
+ Map item1 = new HashMap();
|
|
|
|
+ item1.put("controltype",0);
|
|
|
|
+ item1.put("name","血压控制情况");
|
|
|
|
+ List<Map> item1DetailList = new ArrayList<>();
|
|
|
|
+ Map de1= new HashMap();
|
|
|
|
+ de1.put("detailName","正常");
|
|
|
|
+ de1.put("state",1);
|
|
|
|
+ Map de2= new HashMap();
|
|
|
|
+ de2.put("detailName","1级");
|
|
|
|
+ de2.put("state",0);
|
|
|
|
+ Map de3= new HashMap();
|
|
|
|
+ de3.put("detailName","2级");
|
|
|
|
+ de3.put("state",0);
|
|
|
|
+ Map de4= new HashMap();
|
|
|
|
+ de4.put("detailName","3级");
|
|
|
|
+ de4.put("state",0);
|
|
|
|
+ item1DetailList.add(de1);
|
|
|
|
+ item1DetailList.add(de2);
|
|
|
|
+ item1DetailList.add(de3);
|
|
|
|
+ item1DetailList.add(de4);
|
|
|
|
+ item1.put("details",item1DetailList);
|
|
|
|
+
|
|
|
|
+ Map item2 = new HashMap();
|
|
|
|
+ item2.put("controltype",1);
|
|
|
|
+ item2.put("name","BMI控制情况");
|
|
|
|
+ List<Map> item2DetailList = new ArrayList<>();
|
|
|
|
+ Map be1= new HashMap();
|
|
|
|
+ be1.put("detailName","体重过低");
|
|
|
|
+ be1.put("state",1);
|
|
|
|
+ Map be2= new HashMap();
|
|
|
|
+ be2.put("detailName","体重达标");
|
|
|
|
+ be2.put("state",0);
|
|
|
|
+ Map be3= new HashMap();
|
|
|
|
+ be3.put("detailName","肥胖前期");
|
|
|
|
+ be3.put("state",0);
|
|
|
|
+ Map be4= new HashMap();
|
|
|
|
+ be4.put("detailName","肥胖");
|
|
|
|
+ be4.put("state",0);
|
|
|
|
+ item2DetailList.add(be1);
|
|
|
|
+ item2DetailList.add(be2);
|
|
|
|
+ item2DetailList.add(be3);
|
|
|
|
+ item2DetailList.add(be4);
|
|
|
|
+ item2.put("details",item2DetailList);
|
|
|
|
+
|
|
|
|
+ Map item3 = new HashMap();
|
|
|
|
+ item3.put("controltype",0);
|
|
|
|
+ item3.put("name","血脂控制情况");
|
|
|
|
+ List<Map> item3DetailList = new ArrayList<>();
|
|
|
|
+ Map xe1= new HashMap();
|
|
|
|
+ xe1.put("detailName","高血脂");
|
|
|
|
+ xe1.put("state",1);
|
|
|
|
+ item3DetailList.add(xe1);
|
|
|
|
+ item3.put("details",item3DetailList);
|
|
|
|
+
|
|
|
|
+ rowList.add(item1);
|
|
|
|
+ rowList.add(item2);
|
|
|
|
+ rowList.add(item3);
|
|
|
|
+ liaoXiaoMap.put("rows",rowList);
|
|
|
|
+ //分级管理
|
|
|
|
+ Map fenjiMap = new HashMap();
|
|
|
|
+ List<Map> ferowList = new ArrayList<>();
|
|
|
|
+ Map feitem1 = new HashMap();
|
|
|
|
+ feitem1.put("controltype",0);
|
|
|
|
+ feitem1.put("name","血压控制情况");
|
|
|
|
+ List<Map> feDetailList = new ArrayList<>();
|
|
|
|
+ Map fe1= new HashMap();
|
|
|
|
+ fe1.put("detailName","常规管理");
|
|
|
|
+ fe1.put("state",1);
|
|
|
|
+ Map fe2= new HashMap();
|
|
|
|
+ fe2.put("detailName","强化管理");
|
|
|
|
+ fe2.put("state",0);
|
|
|
|
+ feDetailList.add(fe1);
|
|
|
|
+ feDetailList.add(fe2);
|
|
|
|
+ feitem1.put("details",feDetailList);
|
|
|
|
+ ferowList.add(feitem1);
|
|
|
|
+ fenjiMap.put("rows",ferowList);
|
|
|
|
+
|
|
|
|
+ result.put("疗效评估",liaoXiaoMap);
|
|
|
|
+ result.put("糖尿病分级管理",fenjiMap);
|
|
|
|
+
|
|
|
|
+ return result;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 不良反应
|
|
|
|
+ * @param dis
|
|
|
|
+ * @param name
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ public Indicators getAdverse(List<String> dis,String name){
|
|
|
|
+ List<Detail> detailList1 = new ArrayList<>();
|
|
|
|
+ Indicators indicators1 = new Indicators();
|
|
|
|
+ indicators1.setName(name);
|
|
|
|
+ indicators1.setControlType(2);
|
|
|
|
+ Detail detail1 = new Detail();
|
|
|
|
+ detail1.setName("否");
|
|
|
|
+ detail1.setValue(0);
|
|
|
|
+ Detail detail2 = new Detail();
|
|
|
|
+ detail2.setName("是");
|
|
|
|
+ detail2.setValue(0);
|
|
|
|
+ if(dis.contains(name)){
|
|
|
|
+ detail2.setValue(1);
|
|
|
|
+ }
|
|
|
|
+ Detail detail3 = new Detail();
|
|
|
|
+ detail3.setName("轻度");
|
|
|
|
+ detail3.setValue(0);
|
|
|
|
+ Detail detail4 = new Detail();
|
|
|
|
+ detail4.setName("中度");
|
|
|
|
+ detail4.setValue(0);
|
|
|
|
+ Detail detail5 = new Detail();
|
|
|
|
+ detail5.setName("重度");
|
|
|
|
+ detail5.setValue(0);
|
|
|
|
+ Detail detail6 = new Detail();
|
|
|
|
+ detail6.setName("偶尔");
|
|
|
|
+ detail6.setValue(0);
|
|
|
|
+ Detail detail7 = new Detail();
|
|
|
|
+ detail7.setName("频繁");
|
|
|
|
+ detail7.setValue(0);
|
|
|
|
+ detailList1.add(detail1);
|
|
|
|
+ detailList1.add(detail2);
|
|
|
|
+ detailList1.add(detail3);
|
|
|
|
+ detailList1.add(detail4);
|
|
|
|
+ detailList1.add(detail5);
|
|
|
|
+ detailList1.add(detail6);
|
|
|
|
+ detailList1.add(detail7);
|
|
|
|
+ indicators1.setDetails(detailList1);
|
|
|
|
+ return indicators1;
|
|
|
|
+ }
|
|
@Override
|
|
@Override
|
|
public List<Map<String, Object>> getRecommendItem(QueryVo queryVo) {
|
|
public List<Map<String, Object>> getRecommendItem(QueryVo queryVo) {
|
|
List<Map<String, Object>> list = relationRepository.getRecommendItem(queryVo.getDiseaselist());
|
|
List<Map<String, Object>> list = relationRepository.getRecommendItem(queryVo.getDiseaselist());
|