|
@@ -5,13 +5,16 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.diagbot.client.QcServiceClient;
|
|
|
import com.diagbot.dto.AlgorithmDTO;
|
|
|
+import com.diagbot.dto.BehosDTO;
|
|
|
import com.diagbot.dto.AnalyzeDTO;
|
|
|
import com.diagbot.dto.BehospitalInfoDTO;
|
|
|
import com.diagbot.dto.MsgDTO;
|
|
|
import com.diagbot.dto.OutputInfo;
|
|
|
import com.diagbot.dto.QcCasesEntryDTO;
|
|
|
+import com.diagbot.dto.QcResultDTO;
|
|
|
import com.diagbot.dto.RecordContentDTO;
|
|
|
import com.diagbot.dto.Response;
|
|
|
+import com.diagbot.entity.BehospitalInfo;
|
|
|
import com.diagbot.entity.DoctorAdvice;
|
|
|
import com.diagbot.entity.HomeDiagnoseInfo;
|
|
|
import com.diagbot.entity.HomeOperationInfo;
|
|
@@ -28,6 +31,7 @@ import com.diagbot.util.SysUserUtils;
|
|
|
import com.diagbot.vo.AlgorithmVO;
|
|
|
import com.diagbot.vo.AnalyzeVO;
|
|
|
import com.diagbot.vo.BehospitalPageVO;
|
|
|
+import com.diagbot.vo.GetDetailVO;
|
|
|
import com.diagbot.vo.MedrecVo;
|
|
|
import com.diagbot.vo.QcResultAlgQueryVO;
|
|
|
import com.diagbot.vo.QcResultAlgVO;
|
|
@@ -89,6 +93,38 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
return res;
|
|
|
}
|
|
|
|
|
|
+ public Map<String, Object> getByBehospitalCode(GetDetailVO getDetailVO) {
|
|
|
+ Map<String, Object> res = new HashMap<>(); // 返回结果
|
|
|
+ Long hospitalId = Long.parseLong(SysUserUtils.getCurrentHospitalID());
|
|
|
+ getDetailVO.setHospitalId(hospitalId);
|
|
|
+ // 获取病历信息
|
|
|
+ BehospitalInfo behospitalInfo = this.getOne(new QueryWrapper<BehospitalInfo>()
|
|
|
+ .eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
+ .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, "该病历已删除!");
|
|
|
+ }
|
|
|
+ BeanUtil.copyProperties(behospitalInfo, behosDTO);
|
|
|
+ res.put("beHospital", behosDTO);
|
|
|
+
|
|
|
+ // 获取主表信息
|
|
|
+ QcResultDTO qcResultDTO = qcresultInfoFacade.getByBehospitalCode(getDetailVO);
|
|
|
+ if (qcResultDTO == null) {
|
|
|
+ throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "该病历未评分!");
|
|
|
+ }
|
|
|
+ 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);
|
|
|
+ return res;
|
|
|
+ }
|
|
|
|
|
|
public AnalyzeDTO analyze(AnalyzeVO analyzeVO) {
|
|
|
Map<String, Object> res = new HashMap<>(); // 返回结果
|