|
@@ -127,12 +127,7 @@ public class PushFacade {
|
|
in("tag_name", disMap.keySet()).
|
|
in("tag_name", disMap.keySet()).
|
|
eq("type", QuestionTypeEnum.Disease.getKey());
|
|
eq("type", QuestionTypeEnum.Disease.getKey());
|
|
List<QuestionInfo> disList = questionFacade.list(questionInfoQueryWrapper);
|
|
List<QuestionInfo> disList = questionFacade.list(questionInfoQueryWrapper);
|
|
- Map<String, QuestionInfo> questionInfoMap = EntityUtil.makeEntityMap(disList, "tagName");
|
|
|
|
- for (Map.Entry<String, Object> entry : disMap.entrySet()) {
|
|
|
|
- if (questionInfoMap.get(entry.getKey()) != null) {
|
|
|
|
- entry.setValue(questionInfoMap.get(entry.getKey()).getId());
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+ disMap = getTagByMap(disMap, disList, pushVO);
|
|
pushDTO.setDisMap(disMap);
|
|
pushDTO.setDisMap(disMap);
|
|
}
|
|
}
|
|
//症状(主诉 type=1;现病史 type=2) 返回 tagName+填写单
|
|
//症状(主诉 type=1;现病史 type=2) 返回 tagName+填写单
|
|
@@ -141,17 +136,8 @@ public class PushFacade {
|
|
questionInfoQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey()).
|
|
questionInfoQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey()).
|
|
in("tag_name", symptomMap.keySet()).
|
|
in("tag_name", symptomMap.keySet()).
|
|
eq("type", QuestionTypeEnum.Symptom.getKey());
|
|
eq("type", QuestionTypeEnum.Symptom.getKey());
|
|
- List<QuestionInfo> questionInfoList = questionFacade.list(questionInfoQueryWrapper);
|
|
|
|
- Map<String, QuestionInfo> questionInfoMap = EntityUtil.makeEntityMap(questionInfoList, "tagName");
|
|
|
|
- for (Map.Entry<String, Object> entry : symptomMap.entrySet()) {
|
|
|
|
- if (questionInfoMap.get(entry.getKey()) != null) {
|
|
|
|
- QuestionVO questionVO = new QuestionVO();
|
|
|
|
- questionVO.setAge(pushVO.getAge());
|
|
|
|
- questionVO.setSexType(pushVO.getSex());
|
|
|
|
- questionVO.setId(questionInfoMap.get(entry.getKey()).getId());
|
|
|
|
- entry.setValue(questionFacade.getById(questionVO));
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+ List<QuestionInfo> symptomList = questionFacade.list(questionInfoQueryWrapper);
|
|
|
|
+ symptomMap = getTagByMap(symptomMap, symptomList, pushVO);
|
|
pushDTO.setSymptomMap(symptomMap);
|
|
pushDTO.setSymptomMap(symptomMap);
|
|
}
|
|
}
|
|
//查体 返回模板
|
|
//查体 返回模板
|
|
@@ -199,6 +185,27 @@ public class PushFacade {
|
|
return pushDTO;
|
|
return pushDTO;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 获取返回结果标签
|
|
|
|
+ *
|
|
|
|
+ * @param map
|
|
|
|
+ * @param questionInfoList
|
|
|
|
+ * @param pushVO
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ public Map<String, Object> getTagByMap(Map<String, Object> map, List<QuestionInfo> questionInfoList, PushVO pushVO) {
|
|
|
|
+ Map<String, QuestionInfo> questionMap = EntityUtil.makeEntityMap(questionInfoList, "tagName");
|
|
|
|
+ for (Map.Entry<String, Object> entry : map.entrySet()) {
|
|
|
|
+ if (questionMap.get(entry.getKey()) != null) {
|
|
|
|
+ QuestionVO questionVO = new QuestionVO();
|
|
|
|
+ questionVO.setAge(pushVO.getAge());
|
|
|
|
+ questionVO.setSexType(pushVO.getSex());
|
|
|
|
+ questionVO.setId(questionMap.get(entry.getKey()).getId());
|
|
|
|
+ entry.setValue(questionFacade.getById(questionVO));
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ return map;
|
|
|
|
+ }
|
|
|
|
|
|
/**
|
|
/**
|
|
* 推理接口-快易检
|
|
* 推理接口-快易检
|