|
@@ -19,6 +19,7 @@ import com.diagbot.dto.PushDTO;
|
|
import com.diagbot.dto.PushEMRDTO;
|
|
import com.diagbot.dto.PushEMRDTO;
|
|
import com.diagbot.dto.PushKYJDTO;
|
|
import com.diagbot.dto.PushKYJDTO;
|
|
import com.diagbot.dto.QuestionDTO;
|
|
import com.diagbot.dto.QuestionDTO;
|
|
|
|
+import com.diagbot.dto.RespDTO;
|
|
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;
|
|
@@ -36,6 +37,7 @@ import com.diagbot.util.BeanUtil;
|
|
import com.diagbot.util.EntityUtil;
|
|
import com.diagbot.util.EntityUtil;
|
|
import com.diagbot.util.FastJsonUtils;
|
|
import com.diagbot.util.FastJsonUtils;
|
|
import com.diagbot.util.ListUtil;
|
|
import com.diagbot.util.ListUtil;
|
|
|
|
+import com.diagbot.util.RespDTOUtil;
|
|
import com.diagbot.util.StringUtil;
|
|
import com.diagbot.util.StringUtil;
|
|
import com.diagbot.vo.EMRPushVO;
|
|
import com.diagbot.vo.EMRPushVO;
|
|
import com.diagbot.vo.HosCodeVO;
|
|
import com.diagbot.vo.HosCodeVO;
|
|
@@ -155,13 +157,13 @@ public class PushFacade {
|
|
* @return ResponseData
|
|
* @return ResponseData
|
|
*/
|
|
*/
|
|
public ResponseData pushAipt(SearchData searchData) {
|
|
public ResponseData pushAipt(SearchData searchData) {
|
|
- Response<ResponseData> res = aiptServiceClient.aiptData(searchData);
|
|
|
|
|
|
+ RespDTO<ResponseData> res = aiptServiceClient.aiptData(searchData);
|
|
if (null == res) {
|
|
if (null == res) {
|
|
throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "中间层没有返回结果");
|
|
throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "中间层没有返回结果");
|
|
- } else if (null == res.getData()) {
|
|
|
|
- throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, res.getMsg());
|
|
|
|
|
|
+ } else if (null == res.data) {
|
|
|
|
+ throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, res.msg);
|
|
}
|
|
}
|
|
- return res.getData();
|
|
|
|
|
|
+ return res.data;
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -171,11 +173,11 @@ public class PushFacade {
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
public Map<String, Object> scale(SearchData searchData) {
|
|
public Map<String, Object> scale(SearchData searchData) {
|
|
- Response<Map<String, Object>> res = aiptServiceClient.scale(searchData);
|
|
|
|
- if (null == res || null == res.getData()) {
|
|
|
|
|
|
+ RespDTO<Map<String, Object>> res = aiptServiceClient.scale(searchData);
|
|
|
|
+ if (RespDTOUtil.respIsNG(res)) {
|
|
throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "量表数据暂无内容");
|
|
throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "量表数据暂无内容");
|
|
}
|
|
}
|
|
- return res.getData();
|
|
|
|
|
|
+ return res.data;
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -288,9 +290,9 @@ public class PushFacade {
|
|
highRiskMap.put("disease", String.join(",", nameList));
|
|
highRiskMap.put("disease", String.join(",", nameList));
|
|
SearchData searchData = new SearchData();
|
|
SearchData searchData = new SearchData();
|
|
searchData.setDiag(String.join(",", nameList));
|
|
searchData.setDiag(String.join(",", nameList));
|
|
- Response<GdbResponse> graphRes = aiptServiceClient.highRisk(searchData);
|
|
|
|
- if (graphRes != null && graphRes.getData() != null) {
|
|
|
|
- Map<String, String> graphResult = graphRes.getData().getResult();
|
|
|
|
|
|
+ RespDTO<GdbResponse> graphRes = aiptServiceClient.highRisk(searchData);
|
|
|
|
+ if (RespDTOUtil.respIsOK(graphRes)) {
|
|
|
|
+ Map<String, String> graphResult = graphRes.data.getResult();
|
|
if (graphResult.size() > 0) {
|
|
if (graphResult.size() > 0) {
|
|
List<String> hrNameList = Lists.newLinkedList();
|
|
List<String> hrNameList = Lists.newLinkedList();
|
|
for (Map.Entry<String, String> entry : graphResult.entrySet()) {
|
|
for (Map.Entry<String, String> entry : graphResult.entrySet()) {
|
|
@@ -756,8 +758,8 @@ public class PushFacade {
|
|
//警惕
|
|
//警惕
|
|
searchData = new SearchData();
|
|
searchData = new SearchData();
|
|
searchData.setDiag(String.join(",", disNameList));
|
|
searchData.setDiag(String.join(",", disNameList));
|
|
- Response<GdbResponse> graphRes = aiptServiceClient.highRisk(searchData);
|
|
|
|
- Map<String, String> graphResult = graphRes.getData().getResult();
|
|
|
|
|
|
+ RespDTO<GdbResponse> graphRes = aiptServiceClient.highRisk(searchData);
|
|
|
|
+ Map<String, String> graphResult = graphRes.data.getResult();
|
|
if (graphResult.size() > 0) {
|
|
if (graphResult.size() > 0) {
|
|
List<EMRQuestionDTO> highRiskDisList = Lists.newLinkedList();
|
|
List<EMRQuestionDTO> highRiskDisList = Lists.newLinkedList();
|
|
for (Map.Entry<String, String> entry : graphResult.entrySet()) {
|
|
for (Map.Entry<String, String> entry : graphResult.entrySet()) {
|