|
@@ -946,8 +946,6 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
}
|
|
|
}
|
|
|
OutputInfo outputInfo = response.getData();
|
|
|
- //根据质控结果获取质控条目
|
|
|
- // QcResultAlgQueryVO qcResultAlgQueryVO = new QcResultAlgQueryVO();
|
|
|
List<String> codeList = new ArrayList<>();
|
|
|
// code和info的映射map
|
|
|
Map<String, String> codeToInfoMap = new LinkedHashMap<>();
|
|
@@ -959,28 +957,66 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
codeToInfoMap.put(key, mapInfo.get("info"));
|
|
|
}
|
|
|
}
|
|
|
- // List<QcResultAlgVO> qcResultAlgVOList = new ArrayList<>();
|
|
|
- // if (ListUtil.isNotEmpty(codeList)) {
|
|
|
- // qcResultAlgQueryVO.setCodeList(codeList);
|
|
|
- // qcResultAlgQueryVO.setHospitalId(hospitalId);
|
|
|
- // qcResultAlgVOList = qcCasesEntryFacade.getQcResultAlgVO(qcResultAlgQueryVO);
|
|
|
- // }
|
|
|
- //
|
|
|
- // // 评分
|
|
|
- // AlgorithmVO algorithmVO = new AlgorithmVO();
|
|
|
- // algorithmVO.setType(0);
|
|
|
- // algorithmVO.setQcResultAlgVOList(qcResultAlgVOList);
|
|
|
- // AlgorithmDTO algorithmDTO = algorithmFacade.getAlgorithmRes(algorithmVO);
|
|
|
|
|
|
- //保存
|
|
|
- // Map<String, Object> pageMap = outputInfo.getPageData();
|
|
|
- // String pageData = JSON.toJSONString(pageMap);
|
|
|
- // 获取菜单信息
|
|
|
- // List<QcModeDTO> qcModeDTOList = qcModeFacade.getMenu(pageMap);
|
|
|
- // String menuData = JSON.toJSONString(qcModeDTOList);
|
|
|
+ // 归档状态保存结果到数据库
|
|
|
+ if ("0".equals(analyzeRunVO.getIsPlacefile())) {
|
|
|
+ List<QcResultAlgVO> qcResultAlgVOList = new ArrayList<>();
|
|
|
+ if (ListUtil.isNotEmpty(codeList)) {
|
|
|
+ // 根据质控结果获取质控条目
|
|
|
+ QcResultAlgQueryVO qcResultAlgQueryVO = new QcResultAlgQueryVO();
|
|
|
+ qcResultAlgQueryVO.setCodeList(codeList);
|
|
|
+ qcResultAlgQueryVO.setHospitalId(hospitalId);
|
|
|
+ qcResultAlgVOList = qcCasesEntryFacade.getQcResultAlgVO(qcResultAlgQueryVO);
|
|
|
+ }
|
|
|
|
|
|
- // 运行质控不保存评分结果信息
|
|
|
- // Date date = qcresultInfoFacade.saveQcResult(algorithmDTO, algorithmVO, analyzeVO, pageData, menuData, analyzeVO.getIsTask());
|
|
|
+ // 对info赋值
|
|
|
+ for (QcResultAlgVO bean : qcResultAlgVOList) {
|
|
|
+ String info = codeToInfoMap.get(bean.getCode());
|
|
|
+ if (StringUtil.isNotBlank(info)) {
|
|
|
+ bean.setInfo(info);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // 评分
|
|
|
+ AlgorithmVO algorithmVO = new AlgorithmVO();
|
|
|
+ algorithmVO.setType(0);
|
|
|
+ algorithmVO.setQcResultAlgVOList(qcResultAlgVOList);
|
|
|
+ algorithmVO.setHospitalId(hospitalId);
|
|
|
+ algorithmVO.setBehospitalCode(analyzeVO.getBehospitalCode());
|
|
|
+ algorithmVO.setQcResultAlgVOList(qcResultAlgVOList);
|
|
|
+ AlgorithmDTO algorithmDTO = algorithmFacade.getAlgorithmRes(algorithmVO);
|
|
|
+
|
|
|
+ //保存
|
|
|
+ Map<String, Object> pageMap = outputInfo.getPageData();
|
|
|
+ // 手动拼接数据【知情同意书】【谈话告知书】
|
|
|
+ List<MedicalRecord> recordList = medicalRecordFacade.list(new QueryWrapper<MedicalRecord>()
|
|
|
+ .eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
+ .eq("behospital_code", analyzeVO.getBehospitalCode())
|
|
|
+ .eq("hospital_id", hospitalId)
|
|
|
+ .in("mode_id", Arrays.asList(53, 54, 16))
|
|
|
+ .orderByAsc("rec_date")
|
|
|
+ );
|
|
|
+ List<MedicalRecordDTO> medicalRecordDTOList = BeanUtil.listCopyTo(recordList, MedicalRecordDTO.class);
|
|
|
+ Map<Long, List<MedicalRecordDTO>> recordMap = EntityUtil.makeEntityListMap(medicalRecordDTOList, "modeId");
|
|
|
+ List<MedicalRecordDTO> recordDTOList = new ArrayList<>();
|
|
|
+ if (recordMap.get(53L) != null) {
|
|
|
+ recordDTOList.addAll(recordMap.get(53L)); // 知情同意书
|
|
|
+ }
|
|
|
+ if (recordMap.get(16L) != null) {
|
|
|
+ recordDTOList.addAll(recordMap.get(16L)); // 手术知情同意书
|
|
|
+ }
|
|
|
+ // 知情同意书 = 【知情同意书】 + 【手术知情同意书】
|
|
|
+ pageMap.put("知情同意书", recordDTOList);
|
|
|
+ pageMap.put("谈话告知书", recordMap.get(54L));
|
|
|
+
|
|
|
+ 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, analyzeVO.getIsTask(), null);
|
|
|
+ }
|
|
|
|
|
|
// 返回缺陷提示信息
|
|
|
List<MsgDTO> msgDTOList = new ArrayList<>();
|