|
@@ -384,7 +384,17 @@ public class ConsoleFacade {
|
|
|
}
|
|
|
return retMap;
|
|
|
}
|
|
|
+ public String handleTime(String startDate){
|
|
|
+ DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
+ Date parse = null;
|
|
|
+ try {
|
|
|
+ parse = dateFormat.parse(startDate);
|
|
|
+ } catch (ParseException e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
|
|
|
+ return (dateFormat.format(parse)+" 23:59:59");
|
|
|
+ };
|
|
|
|
|
|
/**
|
|
|
* 病案指标
|
|
@@ -486,7 +496,21 @@ public class ConsoleFacade {
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
+ /**
|
|
|
+ * 病案指标数据保存
|
|
|
+ *
|
|
|
+ * @param filterVO
|
|
|
+ * @return 2170
|
|
|
+ */
|
|
|
+ public Boolean saveMedicaIndicator(FilterVO filterVO){
|
|
|
+ List<String> timeList = filterFacade.getTimeList(filterVO);
|
|
|
+ for (String startTime : timeList) {
|
|
|
+ filterVO.setStartDate(startTime);
|
|
|
+ filterVO.setEndDate( handleTime(startTime));
|
|
|
+ getMedicaIndicator(filterVO);
|
|
|
+ }
|
|
|
+ return true;
|
|
|
+ }
|
|
|
|
|
|
/**
|
|
|
* 病案指标数据保存
|
|
@@ -495,14 +519,12 @@ public class ConsoleFacade {
|
|
|
* @return 2170
|
|
|
*/
|
|
|
@Transactional
|
|
|
- public void saveMedicaIndicator(FilterVO filterVO){
|
|
|
+ public void getMedicaIndicator(FilterVO filterVO){
|
|
|
MedIndexResult medIndexResult = new MedIndexResult();
|
|
|
- String indexName = filterVO.getIndexName();
|
|
|
Map<String, Long> selectOperationNumMap = behospitalInfoFacade.selectOperationNum(filterVO);
|
|
|
//出院人数
|
|
|
Long operationFeeNum = 0L;
|
|
|
List<MedManageParamsDTO> doctorAdviceMedManageParams = new ArrayList<>();
|
|
|
- if (QualityContent.NEED_MEDICAL_ADVICE.contains(indexName)) {
|
|
|
filterVO.setFlagStr("2");
|
|
|
doctorAdviceMedManageParams = behospitalInfoFacade.getMedManageParams(filterVO);
|
|
|
Map<String, Long> adviceNum = getAdviceNum(filterVO,doctorAdviceMedManageParams);
|
|
@@ -549,26 +571,31 @@ public class ConsoleFacade {
|
|
|
if (chemotherapyMalignantTumorsNum != null ) {
|
|
|
medIndexResult.setTumorChemistryResult(Double.valueOf(chemotherapyMalignantTumorsNum));
|
|
|
}
|
|
|
- }
|
|
|
+
|
|
|
/**
|
|
|
* =================================标示线========================================
|
|
|
*/
|
|
|
- /* Map<String, Object> baseIndex = behospitalInfoFacade.getBaseIndex(filterVO);
|
|
|
- //指标二十七
|
|
|
- firMethod(indexName,baseIndex,medIndexResult);
|
|
|
- //指标十七 医师查房记录
|
|
|
- WardRoundMethod(baseIndex, triggeringRulesMap,medIndexResult);
|
|
|
- //指标十八 抢救记录
|
|
|
- rescueMethod(doctorAdviceMedManageParams,triggeringRulesMap,medIndexResult);
|
|
|
+ Map<String, Object> baseIndex = behospitalInfoFacade.getBaseIndex(filterVO);
|
|
|
+ //指标二十七
|
|
|
+
|
|
|
+ //指标十七 医师查房记录
|
|
|
+
|
|
|
+ //指标十八 抢救记录
|
|
|
+ rescueMethod(doctorAdviceMedManageParams,medIndexResult);
|
|
|
//指标十九 出院患者病历2日归档
|
|
|
- getfileSecAmount(filterVO,baseIndex,medIndexResult);
|
|
|
+ getfileSecAmount(filterVO,baseIndex,medIndexResult);
|
|
|
//指标十四 手术记录
|
|
|
- operationMethod(operationFeeNum+"", triggeringRulesMap,medIndexResult);
|
|
|
+ medIndexResult.setOperationCompleteResult(Double.parseDouble(operationFeeNum+""));
|
|
|
//指标十六 临床用血相关记录符合率
|
|
|
- filterVO.setFlagStr("1");
|
|
|
- List<MedManageParamsDTO> medManageParams = behospitalInfoFacade.getMedManageParams(filterVO);
|
|
|
- bloodMethod(hashMapArrayList,doctorAdviceMedManageParams, medManageParams, triggeringRulesMap,medIndexResult);
|
|
|
- medIndexResultFacade.save(medIndexResult);*/
|
|
|
+ filterVO.setFlagStr("1");
|
|
|
+ List<MedManageParamsDTO> medManageParams = behospitalInfoFacade.getMedManageParams(filterVO);
|
|
|
+ bloodMethod(doctorAdviceMedManageParams, medManageParams,medIndexResult);
|
|
|
+ medIndexResult.setHospitalId(filterVO.getHospitalId());
|
|
|
+ medIndexResult.setStartDate(filterVO.getStartDate());
|
|
|
+ medIndexResult.setEndDate(filterVO.getEndDate());
|
|
|
+ medIndexResult.setGmtCreate(new Date());
|
|
|
+ medIndexResultFacade.save(medIndexResult);
|
|
|
+
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -2665,7 +2692,7 @@ public class ConsoleFacade {
|
|
|
|
|
|
|
|
|
//指标十八 抢救记录
|
|
|
- private void rescueMethod(List<MedManageParamsDTO> medManageParams,Map<String, Long> triggeringRulesMap,MedIndexResult medIndexResult){
|
|
|
+ private void rescueMethod(List<MedManageParamsDTO> medManageParams,MedIndexResult medIndexResult){
|
|
|
List<MedManageParamsDTO> manageList= new ArrayList<>();
|
|
|
List<String> rescueDrugList = QualityContent.RESCUEDRUGLIST;
|
|
|
for (int i = 0; i < medManageParams.size(); i++) {
|
|
@@ -2682,29 +2709,12 @@ public class ConsoleFacade {
|
|
|
//接受抢救的质控病历总数
|
|
|
double count = manageList.stream().map(MedManageParamsDTO::getBehospitalCode).distinct().count();
|
|
|
if(StringUtils.isNotEmpty(String.valueOf(count)) && count != 0d){
|
|
|
- double rescueDo = currencyCal(count, triggeringRulesMap.get("rescueNum"));
|
|
|
- medIndexResult.setRescueResult(rescueDo);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- //指标十七 医师查房记录
|
|
|
- private void WardRoundMethod( Map<String, Object> baseIndex, Map<String, Long> triggeringRulesMap,MedIndexResult medIndexResult){
|
|
|
- if( triggeringRulesMap.containsKey("WardRoundNum") && baseIndex.containsKey("forWorkNum") && !baseIndex.get("forWorkNum").toString().equals("0")){
|
|
|
- double wardRoundDo = currencyCal(baseIndex.get("forWorkNum"), triggeringRulesMap.get("WardRoundNum"));
|
|
|
- medIndexResult.setWardRoundResult(wardRoundDo);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- //指标十四 手术记录
|
|
|
- private void operationMethod(String operationFeeNum, Map<String, Long> triggeringRulesMap,MedIndexResult medIndexResult){
|
|
|
- if( triggeringRulesMap.containsKey("operationRecordNum") && StringUtils.isNotEmpty(operationFeeNum) && ! operationFeeNum.equals("0")){
|
|
|
- double operationRecordDo = currencyCal(operationFeeNum, triggeringRulesMap.get("operationRecordNum"));
|
|
|
- medIndexResult.setOperationCompleteResult(operationRecordDo);
|
|
|
+ medIndexResult.setRescueResult(count);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
//指标十六 临床用血相关记录符合率
|
|
|
- private void bloodMethod( List<Map<String, String>>retList,List<MedManageParamsDTO> doctorAdviceList, List<MedManageParamsDTO> medManageParams, Map<String, Long> triggeringRulesMap,MedIndexResult medIndexResult){
|
|
|
+ private void bloodMethod(List<MedManageParamsDTO> doctorAdviceList, List<MedManageParamsDTO> medManageParams,MedIndexResult medIndexResult){
|
|
|
Set<String> manageList= new CopyOnWriteArraySet<>();
|
|
|
List<String> blood_list = QualityContent.BLOODLIST;
|
|
|
//lis项目存在用血住院病历号
|
|
@@ -2731,8 +2741,7 @@ public class ConsoleFacade {
|
|
|
double count = manageList.size();
|
|
|
if(StringUtils.isNotEmpty(String.valueOf(count)) && count != 0d){
|
|
|
//指标十七
|
|
|
- double bloodNum = currencyCal(count, triggeringRulesMap.get("bloodNum"));
|
|
|
- medIndexResult.setBloodResult(bloodNum);
|
|
|
+ medIndexResult.setBloodResult(count);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -2767,11 +2776,10 @@ public class ConsoleFacade {
|
|
|
}
|
|
|
}
|
|
|
double count = list.stream().distinct().map(BehospitalInfo::getBedCode).count();
|
|
|
- if(StringUtils.isNotEmpty( baseIndex.get("firWorkNum").toString()) && ! baseIndex.get("firWorkNum").toString().equals("0") ){
|
|
|
- double retNum =count* 100/Double.parseDouble(baseIndex.get("firWorkNum").toString());
|
|
|
- double firGradeStr = Double.parseDouble(df.format(retNum));
|
|
|
- medIndexResult.setSecFileResult(firGradeStr);
|
|
|
+ if(StringUtils.isNotEmpty(String.valueOf(count)) && count != 0d){
|
|
|
+ medIndexResult.setSecFileResult(count);
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
|
|
|
private Boolean getTrueSecFile(Date date1,Date date2, List<String> holidaysTimeList){
|