|
@@ -11,30 +11,8 @@ import com.diagbot.enums.IsDeleteEnum;
|
|
import com.diagbot.exception.CommonErrorCode;
|
|
import com.diagbot.exception.CommonErrorCode;
|
|
import com.diagbot.exception.CommonException;
|
|
import com.diagbot.exception.CommonException;
|
|
import com.diagbot.service.impl.BehospitalInfoServiceImpl;
|
|
import com.diagbot.service.impl.BehospitalInfoServiceImpl;
|
|
-import com.diagbot.util.BeanUtil;
|
|
|
|
-import com.diagbot.util.DateUtil;
|
|
|
|
-import com.diagbot.util.EncrypDES;
|
|
|
|
-import com.diagbot.util.EntityUtil;
|
|
|
|
-import com.diagbot.util.ExcelUtils;
|
|
|
|
-import com.diagbot.util.ListUtil;
|
|
|
|
-import com.diagbot.util.MapUtil;
|
|
|
|
-import com.diagbot.util.StringUtil;
|
|
|
|
-import com.diagbot.util.SysUserUtils;
|
|
|
|
-import com.diagbot.vo.AlgorithmVO;
|
|
|
|
-import com.diagbot.vo.AnalyzeApiVO;
|
|
|
|
-import com.diagbot.vo.AnalyzeCdsVO;
|
|
|
|
-import com.diagbot.vo.AnalyzeCodeVO;
|
|
|
|
-import com.diagbot.vo.AnalyzeRunVO;
|
|
|
|
-import com.diagbot.vo.AnalyzeVO;
|
|
|
|
-import com.diagbot.vo.BehospitalPageVO;
|
|
|
|
-import com.diagbot.vo.ExportQcresultVO;
|
|
|
|
-import com.diagbot.vo.GetDetailVO;
|
|
|
|
-import com.diagbot.vo.MedrecVo;
|
|
|
|
-import com.diagbot.vo.QcResultAlgQueryVO;
|
|
|
|
-import com.diagbot.vo.QcResultAlgVO;
|
|
|
|
-import com.diagbot.vo.QueryVo;
|
|
|
|
-import com.diagbot.vo.RecordContentVO;
|
|
|
|
-import com.diagbot.vo.TaskVO;
|
|
|
|
|
|
+import com.diagbot.util.*;
|
|
|
|
+import com.diagbot.vo.*;
|
|
import com.google.common.collect.Lists;
|
|
import com.google.common.collect.Lists;
|
|
import com.google.common.collect.Maps;
|
|
import com.google.common.collect.Maps;
|
|
|
|
|
|
@@ -2245,130 +2223,19 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
- * 入院记录,手术记录,出院记录24小时完成率
|
|
|
|
- * @param filterRecordVO
|
|
|
|
|
|
+ * 入院记录,手术记录,出院记录,病案首页24小时完成率
|
|
|
|
+ * @param filterVO
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
- public MedQualityControlDTO medicalRecordIndicator(FilterRecordVO filterRecordVO) {
|
|
|
|
- String startDate = filterRecordVO.getStartDate();
|
|
|
|
- String endDate = filterRecordVO.getEndDate();
|
|
|
|
- DateTimeFormatter df = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
|
|
|
- LocalDateTime sta = LocalDateTime.parse(startDate, df);
|
|
|
|
- LocalDateTime end = LocalDateTime.parse(endDate, df);
|
|
|
|
- MedQualityControlDTO medQualityControlDTO = new MedQualityControlDTO();
|
|
|
|
- //时间段手术出院患者数量为
|
|
|
|
- Map<String,Integer> number = selectOperationNum(sta,end);
|
|
|
|
- Integer operationFeeNum = number.get("operationFee");
|
|
|
|
- // type==1 时间为出院
|
|
|
|
- filterRecordVO.setType(1);
|
|
|
|
- List<Map<String, Object>> medicalRecordIndicatorStaList = baseMapper.medicalRecordIndicator(filterRecordVO, sta, end);
|
|
|
|
- //时间段出院人数为
|
|
|
|
- Object countNumSta = medicalRecordIndicatorStaList.get(0).get("countNum");
|
|
|
|
- int totleCountSta = Integer.parseInt(countNumSta.toString());
|
|
|
|
-
|
|
|
|
- //type=2 时间为住院对比
|
|
|
|
- filterRecordVO.setType(2);
|
|
|
|
- List<Map<String, Object>> medicalRecordIndicatorOutList = baseMapper.medicalRecordIndicator(filterRecordVO, sta, end);
|
|
|
|
- //同期住院人数
|
|
|
|
- Object countNumOut = medicalRecordIndicatorOutList.get(0).get("countNum");
|
|
|
|
- int totleCountOut = Integer.parseInt(countNumOut.toString());
|
|
|
|
- //type=3 住院时间缺陷情况
|
|
|
|
- filterRecordVO.setType(3);
|
|
|
|
- List<Map<String, Object>> blemishList = baseMapper.medicalRecordIndicator(filterRecordVO, sta, end);
|
|
|
|
- if (ListUtil.isNotEmpty(blemishList)) {
|
|
|
|
- for (Map<String, Object> blemishMap : blemishList) {
|
|
|
|
- //入院记录未在术后24h内完成
|
|
|
|
- if (("2658").equals(blemishMap.get("cases_entry_id"))) {
|
|
|
|
- //未完成个数
|
|
|
|
- Object obj = blemishMap.get("2658入院记录未在术后24h内完成");
|
|
|
|
- double i = Double.parseDouble(obj.toString());
|
|
|
|
- //完成率为
|
|
|
|
- if (totleCountOut != 0) {
|
|
|
|
- double admissionDou = (totleCountOut - i) / totleCountOut;
|
|
|
|
- String admissionStr = Double.toString(admissionDou);
|
|
|
|
- medQualityControlDTO.setAdmissionStr(admissionStr);
|
|
|
|
- //完成个数
|
|
|
|
- medQualityControlDTO.setAdmissionNum((totleCountOut - i));
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- //手术记录未在术后24h内完成
|
|
|
|
- if (("2170").equals(blemishMap.get("cases_entry_id"))) {
|
|
|
|
- //未完成个数
|
|
|
|
- Object obj = blemishMap.get("2170手术记录未在术后24h内完成");
|
|
|
|
- double i = Double.parseDouble(obj.toString());
|
|
|
|
- //完成率为
|
|
|
|
- if (totleCountOut != 0) {
|
|
|
|
- double admissionDou = (operationFeeNum - i) / operationFeeNum;
|
|
|
|
- String admissionStr = Double.toString(admissionDou);
|
|
|
|
- medQualityControlDTO.setOperationStr(admissionStr);
|
|
|
|
- //完成个数
|
|
|
|
- medQualityControlDTO.setOperationNum((operationFeeNum - i));
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- if (medQualityControlDTO.getAdmissionStr() == null) {
|
|
|
|
- medQualityControlDTO.setAdmissionStr("1");
|
|
|
|
- //完成个数
|
|
|
|
- medQualityControlDTO.setAdmissionNum((Double.valueOf(totleCountOut)));
|
|
|
|
- }
|
|
|
|
- if (medQualityControlDTO.getOperationStr() == null) {
|
|
|
|
- medQualityControlDTO.setOperationStr("1");
|
|
|
|
- //完成个数
|
|
|
|
- medQualityControlDTO.setOperationNum((Double.valueOf(totleCountOut)));
|
|
|
|
- }
|
|
|
|
- //type=4 出院时间缺陷情况
|
|
|
|
- filterRecordVO.setType(4);
|
|
|
|
- List<Map<String, Object>> blemishListF = baseMapper.medicalRecordIndicator(filterRecordVO, sta, end);
|
|
|
|
- if (ListUtil.isNotEmpty(blemishListF)) {
|
|
|
|
- for (Map<String, Object> blemishMap : blemishListF) {
|
|
|
|
- //出院记录未在术后24h内完成
|
|
|
|
- if (("2635").equals(blemishMap.get("cases_entry_id"))) {
|
|
|
|
- //未完成个数
|
|
|
|
- Object obj = blemishMap.get("2635出院记录未在术后24h内完成");
|
|
|
|
- double i = Double.parseDouble(obj.toString());
|
|
|
|
- //完成率为
|
|
|
|
- if (totleCountSta != 0) {
|
|
|
|
- double leaveHospitalDou = (totleCountSta - i) / totleCountSta;
|
|
|
|
- String leaveHospitalStr = Double.toString(leaveHospitalDou);
|
|
|
|
- medQualityControlDTO.setLeaveHospitalStr(leaveHospitalStr);
|
|
|
|
- //完成个数
|
|
|
|
- medQualityControlDTO.setLeaveHospitalNum((totleCountOut - i));
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- //病案首页
|
|
|
|
- if("3110".equals(blemishMap.get("cases_entry_id"))){
|
|
|
|
- //未完成个数
|
|
|
|
- Object obj = blemishMap.get("3110病案首页未在患者出院24小时内完成");
|
|
|
|
- double i = Double.parseDouble(obj.toString());
|
|
|
|
- //完成率为
|
|
|
|
- if (totleCountSta != 0) {
|
|
|
|
- double medHomePageDou = (totleCountSta - i) / totleCountSta;
|
|
|
|
- String medHomePageStr = Double.toString(medHomePageDou);
|
|
|
|
- medQualityControlDTO.setMedHomePageStr(medHomePageStr);
|
|
|
|
- //完成个数
|
|
|
|
- medQualityControlDTO.setMedHomePageNum((totleCountSta - i));
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- if (medQualityControlDTO.getLeaveHospitalStr() == null) {
|
|
|
|
- medQualityControlDTO.setLeaveHospitalStr("1");
|
|
|
|
- //完成个数
|
|
|
|
- medQualityControlDTO.setLeaveHospitalNum((Double.valueOf(totleCountOut)));
|
|
|
|
- }
|
|
|
|
- return medQualityControlDTO;
|
|
|
|
|
|
+ public Map<String, Long> medicalRecordIndicator(FilterVO filterVO){
|
|
|
|
+ return baseMapper.medicalRecordIndicator(filterVO);
|
|
}
|
|
}
|
|
-
|
|
|
|
/**
|
|
/**
|
|
* 手术费,抗菌药物,手术和病理费等含有人数
|
|
* 手术费,抗菌药物,手术和病理费等含有人数
|
|
- * @param start
|
|
|
|
- * @param end
|
|
|
|
|
|
+ * @param filterVO
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
- public Map<String,Integer> selectOperationNum( LocalDateTime start, LocalDateTime end){
|
|
|
|
- return baseMapper.selectOperationNum( start, end);
|
|
|
|
|
|
+ public Map<String,Long> selectOperationNum( FilterVO filterVO){
|
|
|
|
+ return baseMapper.selectOperationNum(filterVO);
|
|
}
|
|
}
|
|
}
|
|
}
|