|
@@ -20,6 +20,7 @@ import com.diagbot.enums.QuestionTypeEnum;
|
|
|
import com.diagbot.exception.CommonErrorCode;
|
|
|
import com.diagbot.exception.CommonException;
|
|
|
import com.diagbot.util.EntityUtil;
|
|
|
+import com.diagbot.util.FastJsonUtils;
|
|
|
import com.diagbot.util.StringUtil;
|
|
|
import com.diagbot.vo.LisKYJVO;
|
|
|
import com.diagbot.vo.PushKYJVO;
|
|
@@ -114,7 +115,6 @@ public class PushFacade {
|
|
|
Map<String, String> treat = data.getTreat();
|
|
|
|
|
|
Map<String, Object> symptomMap = list2Map(symptom);
|
|
|
- Map<String, Object> disMap = list2Map(dis);
|
|
|
Map<String, Object> labMap = list2Map(labs);
|
|
|
Map<String, Object> pacsMap = list2Map(pacs);
|
|
|
|
|
@@ -128,10 +128,28 @@ public class PushFacade {
|
|
|
}
|
|
|
//诊断 返回tagName+标签
|
|
|
if (featureTypeSet.contains(String.valueOf(QuestionTypeEnum.Disease.getKey()))) {
|
|
|
- List<QuestionDTO> disDTO = getTagListByMap(disMap, pushVO, QuestionTypeEnum.Disease.getKey());
|
|
|
Map<String, List<QuestionDTO>> disMapDTO = new LinkedHashMap<>();
|
|
|
- //当前返回诊断都按疑似诊断处理,待大数据提供诊断分类
|
|
|
- disMapDTO.put("疑似诊断:", disDTO);
|
|
|
+ Map<String, List<FeatureRate>> disFeatureMap=new LinkedHashMap<>();
|
|
|
+ //诊断分类
|
|
|
+ for(FeatureRate featureRate:dis) {
|
|
|
+ if (StringUtil.isBlank(featureRate.getDesc())) {
|
|
|
+ featureRate.setDesc("{\"可能诊断\":\"\"}");
|
|
|
+ }
|
|
|
+ Map<String, Object> descMap = FastJsonUtils.getJsonToMap(featureRate.getDesc());
|
|
|
+ for(String disClass:descMap.keySet()) {
|
|
|
+ List<FeatureRate> featureRateList = Lists.newLinkedList();
|
|
|
+ if (disFeatureMap.get(disClass) != null) {
|
|
|
+ featureRateList = disFeatureMap.get(disClass);
|
|
|
+ }
|
|
|
+ featureRateList.add(featureRate);
|
|
|
+ disFeatureMap.put(disClass, featureRateList);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ for (Map.Entry<String, List<FeatureRate>> entry : disFeatureMap.entrySet()) {
|
|
|
+ Map<String, Object> disMap = list2Map(entry.getValue());
|
|
|
+ List<QuestionDTO> disDTO = getTagListByMap(disMap, pushVO, QuestionTypeEnum.Disease.getKey());
|
|
|
+ disMapDTO.put(entry.getKey(), disDTO);
|
|
|
+ }
|
|
|
pushDTO.setDis(disMapDTO);
|
|
|
}
|
|
|
//症状(主诉 type=1;现病史 type=2) 返回 tagName+填写单
|