|
@@ -11,6 +11,7 @@ import com.diagbot.dto.BehospitalInfoDTO;
|
|
|
import com.diagbot.dto.MsgDTO;
|
|
|
import com.diagbot.dto.OutputInfo;
|
|
|
import com.diagbot.dto.QcCasesEntryDTO;
|
|
|
+import com.diagbot.dto.QcModeDTO;
|
|
|
import com.diagbot.dto.QcResultDTO;
|
|
|
import com.diagbot.dto.RecordContentDTO;
|
|
|
import com.diagbot.dto.Response;
|
|
@@ -80,6 +81,8 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
SysDictionaryFacade sysDictionaryFacade;
|
|
|
@Autowired
|
|
|
private QcresultInfoFacade qcresultInfoFacade;
|
|
|
+ @Autowired
|
|
|
+ QcModeFacade qcModeFacade;
|
|
|
|
|
|
public IPage<BehospitalInfoDTO> pageFac(BehospitalPageVO behospitalPageVO) {
|
|
|
|
|
@@ -104,31 +107,43 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
.eq("hospital_id", getDetailVO.getHospitalId())
|
|
|
.eq("behospital_code", getDetailVO.getBehospitalCode()), false
|
|
|
);
|
|
|
- BehosDTO behosDTO = new BehosDTO();
|
|
|
- if (behospitalInfo == null) {
|
|
|
- throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "该病历已删除!");
|
|
|
+
|
|
|
+ List<String> paramList = getDetailVO.getParamStr();// 参数列表
|
|
|
+
|
|
|
+ if (ListUtil.isEmpty(paramList) || paramList.contains("beHospital")) {
|
|
|
+ BehosDTO behosDTO = new BehosDTO();
|
|
|
+ if (behospitalInfo == null) {
|
|
|
+ throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "该病历已删除!");
|
|
|
+ }
|
|
|
+ BeanUtil.copyProperties(behospitalInfo, behosDTO);
|
|
|
+ res.put("beHospital", behosDTO);
|
|
|
}
|
|
|
- BeanUtil.copyProperties(behospitalInfo, behosDTO);
|
|
|
- res.put("beHospital", behosDTO);
|
|
|
|
|
|
- // 获取主表信息
|
|
|
- QcResultDTO qcResultDTO = qcresultInfoFacade.getByBehospitalCode(getDetailVO);
|
|
|
- if (qcResultDTO == null) {
|
|
|
- throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "该病历未评分!");
|
|
|
+ if (ListUtil.isEmpty(paramList) || paramList.contains("result") || paramList.contains("resultSimple")) {
|
|
|
+ // 获取结果主表信息
|
|
|
+ QcResultDTO qcResultDTO = qcresultInfoFacade.getByBehospitalCode(getDetailVO);
|
|
|
+ if (qcResultDTO == null) {
|
|
|
+ throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "该病历未评分!");
|
|
|
+ }
|
|
|
+ if (paramList.contains("resultSimple")) {
|
|
|
+ qcResultDTO.setPageData("");
|
|
|
+ qcResultDTO.setMenuData("");
|
|
|
+ }
|
|
|
+ res.put("result", qcResultDTO);
|
|
|
}
|
|
|
- res.put("result", qcResultDTO);
|
|
|
|
|
|
// 获取提示信息
|
|
|
- AnalyzeVO analyzeVO = new AnalyzeVO();
|
|
|
- BeanUtil.copyProperties(getDetailVO, analyzeVO);
|
|
|
- List<MsgDTO> msgDTOList = getMsg(analyzeVO);
|
|
|
- Map<String, List<MsgDTO>> msgMap = EntityUtil.makeEntityListMap(msgDTOList, "modelName");
|
|
|
- res.put("msg", msgMap);
|
|
|
+ if (ListUtil.isEmpty(paramList) || paramList.contains("msg")) {
|
|
|
+ AnalyzeVO analyzeVO = new AnalyzeVO();
|
|
|
+ BeanUtil.copyProperties(getDetailVO, analyzeVO);
|
|
|
+ List<MsgDTO> msgDTOList = getMsg(analyzeVO);
|
|
|
+ Map<String, List<MsgDTO>> msgMap = EntityUtil.makeEntityListMap(msgDTOList, "modelName");
|
|
|
+ res.put("msg", msgMap);
|
|
|
+ }
|
|
|
return res;
|
|
|
}
|
|
|
|
|
|
public AnalyzeDTO analyze(AnalyzeVO analyzeVO) {
|
|
|
- Map<String, Object> res = new HashMap<>(); // 返回结果
|
|
|
Long hospitalId = Long.parseLong(SysUserUtils.getCurrentHospitalID());
|
|
|
// Long hospitalId = 1L; // 写死
|
|
|
analyzeVO.setHospitalId(hospitalId);
|
|
@@ -211,10 +226,9 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
}
|
|
|
|
|
|
// 病案首页
|
|
|
- if (homePage != null ) {
|
|
|
- addDataWithFirstPage("病案首页", homePage, medrecVoList, dicMap,
|
|
|
- homePageList, homeOperationInfoList);
|
|
|
- }
|
|
|
+ addDataWithFirstPage("病案首页", homePage, medrecVoList, dicMap,
|
|
|
+ homePageList, homeOperationInfoList);
|
|
|
+
|
|
|
queryVo.setMedrec(medrecVoList);
|
|
|
|
|
|
// 调用质控接口
|
|
@@ -238,14 +252,19 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
algorithmVO.setQcResultAlgVOList(qcResultAlgVOList);
|
|
|
AlgorithmDTO algorithmDTO = algorithmFacade.getAlgorithmRes(algorithmVO);
|
|
|
//保存
|
|
|
- String pageData = JSON.toJSONString(outputInfo.getPageData());
|
|
|
- Date date = qcresultInfoFacade.saveQcResult(algorithmDTO, algorithmVO, analyzeVO, pageData);
|
|
|
- res.put("pageData", pageData);
|
|
|
+ Map<String, Object> pageMap = outputInfo.getPageData();
|
|
|
+ String pageData = JSON.toJSONString(pageMap);
|
|
|
+ // 获取菜单信息
|
|
|
+ List<QcModeDTO> qcModeDTOList = qcModeFacade.getMenu(pageMap);
|
|
|
+ String menuData = JSON.toJSONString(qcModeDTOList);
|
|
|
+
|
|
|
+ Date date = qcresultInfoFacade.saveQcResult(algorithmDTO, algorithmVO, analyzeVO, pageData, menuData);
|
|
|
|
|
|
// 返回提示信息
|
|
|
List<MsgDTO> msgDTOList = getMsg(analyzeVO);
|
|
|
Map<String, List<MsgDTO>> msgMap = EntityUtil.makeEntityListMap(msgDTOList, "modelName");
|
|
|
- res.put("msg", msgMap);
|
|
|
+
|
|
|
+
|
|
|
//返回参数组装
|
|
|
AnalyzeDTO analyzeDTO = new AnalyzeDTO();
|
|
|
analyzeDTO.setBehospitalCode(analyzeVO.getBehospitalCode());
|