|
@@ -14,6 +14,8 @@ import com.diagbot.entity.HomeDiagnoseInfo;
|
|
|
import com.diagbot.entity.HomeOperationInfo;
|
|
|
import com.diagbot.entity.HomePage;
|
|
|
import com.diagbot.enums.IsDeleteEnum;
|
|
|
+import com.diagbot.exception.CommonErrorCode;
|
|
|
+import com.diagbot.exception.CommonException;
|
|
|
import com.diagbot.service.impl.BehospitalInfoServiceImpl;
|
|
|
import com.diagbot.util.BeanUtil;
|
|
|
import com.diagbot.util.EntityUtil;
|
|
@@ -65,6 +67,8 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
BasHospitalInfoFacade basHospitalInfoFacade;
|
|
|
@Autowired
|
|
|
private AlgorithmFacade algorithmFacade;
|
|
|
+ @Autowired
|
|
|
+ private QcresultInfoFacade qcresultInfoFacade;
|
|
|
|
|
|
public IPage<BehospitalInfoDTO> pageFac(BehospitalPageVO behospitalPageVO) {
|
|
|
|
|
@@ -82,7 +86,7 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
|
|
|
public Map<String, Object> analyze(AnalyzeVO analyzeVO) {
|
|
|
|
|
|
-// Long hospitalId = Long.parseLong(SysUserUtils.getCurrentHospitalID());
|
|
|
+ // Long hospitalId = Long.parseLong(SysUserUtils.getCurrentHospitalID());
|
|
|
Long hospitalId = 1L; // 写死
|
|
|
analyzeVO.setHospitalId(hospitalId);
|
|
|
// 获取质控条目
|
|
@@ -151,19 +155,27 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
// 手术
|
|
|
addDataWithKey("手术", recMap, medrecVoList,
|
|
|
Arrays.asList("术后首次病程及谈话记录", "手术记录",
|
|
|
- "术前讨论、术前小结", "手术知情同意书", "手术安全核查表"));
|
|
|
+ "术前讨论、术前小结", "手术知情同意书", "手术安全核查表"));
|
|
|
|
|
|
|
|
|
// 医嘱
|
|
|
|
|
|
|
|
|
-
|
|
|
queryVo.setMedrec(medrecVoList); // 设置
|
|
|
|
|
|
// 调用质控接口
|
|
|
Response<OutputInfo> response = qcServiceClient.extract(queryVo);
|
|
|
+ if (response == null || response.getData() == null) {
|
|
|
+ throw new CommonException(CommonErrorCode.RPC_ERROR, "远程质控接口没有返回数据!");
|
|
|
+ }
|
|
|
+ OutputInfo outputInfo = response.getData();
|
|
|
//根据质控结果获取质控条目
|
|
|
QcResultAlgQueryVO qcResultAlgQueryVO = new QcResultAlgQueryVO();
|
|
|
+ List<String> codeList = new ArrayList<>();
|
|
|
+ for (Map.Entry<String, Map<String, String>> output : outputInfo.getResult().entrySet()) {
|
|
|
+ codeList.add(output.getKey());
|
|
|
+ }
|
|
|
+ qcResultAlgQueryVO.setCodeList(codeList);
|
|
|
qcResultAlgQueryVO.setHospitalId(hospitalId);
|
|
|
List<QcResultAlgVO> qcResultAlgVOList = qcCasesEntryFacade.getQcResultAlgVO(qcResultAlgQueryVO);
|
|
|
// 评分
|
|
@@ -171,9 +183,8 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
algorithmVO.setType(0);
|
|
|
algorithmVO.setQcResultAlgVOList(qcResultAlgVOList);
|
|
|
AlgorithmDTO algorithmDTO = algorithmFacade.getAlgorithmRes(algorithmVO);
|
|
|
- // TODO 保存
|
|
|
-
|
|
|
-
|
|
|
+ //保存
|
|
|
+ qcresultInfoFacade.saveQcResult(algorithmDTO, algorithmVO, analyzeVO);
|
|
|
return null;
|
|
|
}
|
|
|
|
|
@@ -207,7 +218,7 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
* @param medrecVoList
|
|
|
*/
|
|
|
public void addDataWithKey(String key, Map<String, List<RecordContentDTO>> recMap,
|
|
|
- List<MedrecVo> medrecVoList, List<String> keyList) {
|
|
|
+ List<MedrecVo> medrecVoList, List<String> keyList) {
|
|
|
MedrecVo medrecVo = new MedrecVo();
|
|
|
medrecVo.setTitle(key);
|
|
|
Map<String, Object> content = new HashMap<>();
|
|
@@ -239,7 +250,7 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
medrecVo.setTitle(key);
|
|
|
Map<String, Object> content = new HashMap<>();
|
|
|
// TODO 医嘱信息
|
|
|
-// content.put("content", list.stream().map(r -> r.getContentText()).collect(Collectors.toList()));
|
|
|
+ // content.put("content", list.stream().map(r -> r.getContentText()).collect(Collectors.toList()));
|
|
|
medrecVo.setContent(content);
|
|
|
medrecVoList.add(medrecVo);
|
|
|
}
|