|
@@ -18,6 +18,7 @@ import com.diagbot.dto.ScaleDTO;
|
|
import com.diagbot.entity.DeptInfo;
|
|
import com.diagbot.entity.DeptInfo;
|
|
import com.diagbot.entity.DeptVital;
|
|
import com.diagbot.entity.DeptVital;
|
|
import com.diagbot.entity.QuestionInfo;
|
|
import com.diagbot.entity.QuestionInfo;
|
|
|
|
+import com.diagbot.entity.ScaleContent;
|
|
import com.diagbot.enums.DisTypeEnum;
|
|
import com.diagbot.enums.DisTypeEnum;
|
|
import com.diagbot.enums.FeatureTypeEnum;
|
|
import com.diagbot.enums.FeatureTypeEnum;
|
|
import com.diagbot.enums.InputModeEnum;
|
|
import com.diagbot.enums.InputModeEnum;
|
|
@@ -75,6 +76,8 @@ public class PushFacade {
|
|
private LisMappingFacade lisMappingFacade;
|
|
private LisMappingFacade lisMappingFacade;
|
|
@Autowired
|
|
@Autowired
|
|
private DisTypeFacade disTypeFacade;
|
|
private DisTypeFacade disTypeFacade;
|
|
|
|
+ @Autowired
|
|
|
|
+ private ScaleContentFacade scaleContentFacade;
|
|
|
|
|
|
/**
|
|
/**
|
|
* 推理接口
|
|
* 推理接口
|
|
@@ -93,6 +96,10 @@ public class PushFacade {
|
|
searchData.setPast(pushVO.getPast());
|
|
searchData.setPast(pushVO.getPast());
|
|
searchData.setOther(pushVO.getOther());
|
|
searchData.setOther(pushVO.getOther());
|
|
searchData.setDiag(pushVO.getDiag());
|
|
searchData.setDiag(pushVO.getDiag());
|
|
|
|
+ searchData.setDisType(pushVO.getDisType());
|
|
|
|
+ searchData.setAdverseEvent(pushVO.getAdverseReactions());
|
|
|
|
+ searchData.setScaleName(pushVO.getScaleName());
|
|
|
|
+ searchData.setIndications(pushVO.getMedicalIndications());
|
|
switch (pushVO.getSex()) {
|
|
switch (pushVO.getSex()) {
|
|
case 1:
|
|
case 1:
|
|
searchData.setSex("M");
|
|
searchData.setSex("M");
|
|
@@ -132,6 +139,7 @@ public class PushFacade {
|
|
if (null == res || null == res.getData()) {
|
|
if (null == res || null == res.getData()) {
|
|
throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "AI没有返回结果");
|
|
throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "AI没有返回结果");
|
|
}
|
|
}
|
|
|
|
+ System.out.println(res.getData().getTreat());
|
|
return res.getData();
|
|
return res.getData();
|
|
}
|
|
}
|
|
|
|
|
|
@@ -274,11 +282,17 @@ public class PushFacade {
|
|
"{\"name\":\"中度\",\"isSelected\":1},{\"name\":\"重度\",\"isSelected\":0}]}";
|
|
"{\"name\":\"中度\",\"isSelected\":1},{\"name\":\"重度\",\"isSelected\":0}]}";
|
|
JSONObject scaleJson = JSONObject.parseObject(scaleStr);
|
|
JSONObject scaleJson = JSONObject.parseObject(scaleStr);
|
|
scale = new LinkedHashMap<>();
|
|
scale = new LinkedHashMap<>();
|
|
- scale.put("密西根糖尿病周围神经病筛查表", scaleJson);
|
|
|
|
|
|
+ scale.put("高血压量表1", scaleJson);
|
|
pushDTO.setScale(scale);
|
|
pushDTO.setScale(scale);
|
|
|
|
+ String scaleContent = "";
|
|
|
|
+ if (scale.get(pushVO.getScaleName()) != null) {
|
|
|
|
+ scaleContent = scale.get(pushVO.getScaleName()).toJSONString();
|
|
|
|
+ }
|
|
|
|
+ List<ScaleContent> scaleContentList = scaleContentFacade.getContent(pushVO.getScaleId(), scaleContent);
|
|
|
|
+ pushDTO.setScaleContent(scaleContentList);
|
|
}
|
|
}
|
|
|
|
|
|
- //管理评估 featuretype=11 && disType=0(慢病)
|
|
|
|
|
|
+ //管理评估 featuretype=11 && disType=1(慢病)
|
|
if (featureTypeSet.contains(String.valueOf(FeatureTypeEnum.ManagementEvaluation.getKey()))) {
|
|
if (featureTypeSet.contains(String.valueOf(FeatureTypeEnum.ManagementEvaluation.getKey()))) {
|
|
if (pushVO.getDisType().equals(DisTypeEnum.CHRONIC.getKey())) {
|
|
if (pushVO.getDisType().equals(DisTypeEnum.CHRONIC.getKey())) {
|
|
pushDTO.setManagementEvaluation(managementEvaluation);
|
|
pushDTO.setManagementEvaluation(managementEvaluation);
|
|
@@ -550,9 +564,12 @@ public class PushFacade {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
PushDTO data = pushInner(pushVO, InputModeEnum.Structured.getKey());
|
|
PushDTO data = pushInner(pushVO, InputModeEnum.Structured.getKey());
|
|
- Map<String, JSONObject> scaleMap = data.getScale();
|
|
|
|
- scaleMap.get(pushVO.getScaleName()).toJSONString();
|
|
|
|
- return scaleMap.get(pushVO.getScaleName()).toJSONString();
|
|
|
|
|
|
+ Map<String, JSONObject> scale = data.getScale();
|
|
|
|
+ String scaleContent = "";
|
|
|
|
+ if (scale.get(pushVO.getScaleName()) != null) {
|
|
|
|
+ scaleContent = scale.get(pushVO.getScaleName()).toJSONString();
|
|
|
|
+ }
|
|
|
|
+ return scaleContent;
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|