|
@@ -9,10 +9,12 @@ import com.diagbot.dto.AlgorithmDTO;
|
|
|
import com.diagbot.dto.AnalyzeDTO;
|
|
|
import com.diagbot.dto.BehosDTO;
|
|
|
import com.diagbot.dto.BehospitalInfoDTO;
|
|
|
+import com.diagbot.dto.MsgApiDTO;
|
|
|
import com.diagbot.dto.MsgDTO;
|
|
|
import com.diagbot.dto.OutputInfo;
|
|
|
import com.diagbot.dto.QcCasesEntryDTO;
|
|
|
import com.diagbot.dto.QcModeDTO;
|
|
|
+import com.diagbot.dto.QcResultApiDTO;
|
|
|
import com.diagbot.dto.QcResultDTO;
|
|
|
import com.diagbot.dto.RecordContentDTO;
|
|
|
import com.diagbot.dto.Response;
|
|
@@ -34,6 +36,7 @@ import com.diagbot.util.ListUtil;
|
|
|
import com.diagbot.util.MapUtil;
|
|
|
import com.diagbot.util.SysUserUtils;
|
|
|
import com.diagbot.vo.AlgorithmVO;
|
|
|
+import com.diagbot.vo.AnalyzeApiVO;
|
|
|
import com.diagbot.vo.AnalyzeVO;
|
|
|
import com.diagbot.vo.BehospitalPageVO;
|
|
|
import com.diagbot.vo.GetDetailVO;
|
|
@@ -187,6 +190,7 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
return res;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
public AnalyzeDTO analyze(AnalyzeVO analyzeVO) {
|
|
|
Long hospitalId = analyzeVO.getHospitalId();
|
|
|
if (!analyzeVO.getIsTask()) {
|
|
@@ -615,4 +619,66 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
// }
|
|
|
// }
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 评分api
|
|
|
+ *
|
|
|
+ * @param analyzeApiVO
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public Map<String, Object> analyzeApi(AnalyzeApiVO analyzeApiVO) {
|
|
|
+ AnalyzeVO analyzeVO = new AnalyzeVO();
|
|
|
+ BeanUtil.copyProperties(analyzeApiVO, analyzeVO);
|
|
|
+ // 评分
|
|
|
+ analyze(analyzeVO);
|
|
|
+ // 获取结果
|
|
|
+ GetDetailVO getDetailVO = new GetDetailVO();
|
|
|
+ getDetailVO.setHospitalId(analyzeApiVO.getHospitalId());
|
|
|
+ getDetailVO.setBehospitalCode(analyzeApiVO.getBehospitalCode());
|
|
|
+ return getByBehospitalCodeApi(getDetailVO);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取明细api
|
|
|
+ *
|
|
|
+ * @param getDetailVO
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public Map<String, Object> getByBehospitalCodeApi(GetDetailVO getDetailVO) {
|
|
|
+ Map<String, Object> res = new HashMap<>(); // 返回结果
|
|
|
+ Long hospitalId = getDetailVO.getHospitalId();
|
|
|
+ // 获取病历信息
|
|
|
+ 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);
|
|
|
+
|
|
|
+ // 获取结果主表信息
|
|
|
+ QcResultDTO qcResultDTO = qcresultInfoFacade.getByBehospitalCode(getDetailVO);
|
|
|
+ if (qcResultDTO == null) {
|
|
|
+ throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "该病历未评分!");
|
|
|
+ }
|
|
|
+ QcResultApiDTO qcResultApiDTO = new QcResultApiDTO();
|
|
|
+ BeanUtil.copyProperties(qcResultDTO, qcResultApiDTO);
|
|
|
+ res.put("result", qcResultApiDTO);
|
|
|
+
|
|
|
+ // 获取提示信息
|
|
|
+ AnalyzeVO analyzeVO = new AnalyzeVO();
|
|
|
+ BeanUtil.copyProperties(getDetailVO, analyzeVO);
|
|
|
+ List<MsgDTO> msgDTOList = getMsg(analyzeVO);
|
|
|
+ List<MsgApiDTO> msgApiDTOList = BeanUtil.listCopyTo(msgDTOList, MsgApiDTO.class);
|
|
|
+ Map<String, List<MsgApiDTO>> msgMap = EntityUtil.makeEntityListMap(msgApiDTOList, "modelName");
|
|
|
+
|
|
|
+ res.put("details", msgMap);
|
|
|
+ return res;
|
|
|
+ }
|
|
|
}
|