|
@@ -2479,31 +2479,52 @@ public MedQualityControlDTO medicalRecordIndicator(FilterRecordVO filterRecordVO
|
|
|
* @return
|
|
|
*/
|
|
|
public MedQualityControlDTO getMedManageIndex(FilterVO filterVO) {
|
|
|
- Map<String, Object> baseIndex = behospitalInfoFacade.getBaseIndex(filterVO);
|
|
|
- Map<String, Object> entryCountMap = behospitalInfoFacade.getCountByEntry(filterVO);
|
|
|
MedQualityControlDTO medQualityControlDTO = new MedQualityControlDTO();
|
|
|
+ Map<String, Object> baseIndex = behospitalInfoFacade.getBaseIndex(filterVO);
|
|
|
//指标一、二、三、二十七
|
|
|
medQualityControlDTO = ManageIndexMethod(medQualityControlDTO, baseIndex, filterVO);
|
|
|
+ filterVO.setFlagStr("0");
|
|
|
+ Map<String, Object> entryCountMap = behospitalInfoFacade.getCountByEntry(filterVO);
|
|
|
//指标十七
|
|
|
- medQualityControlDTO = ruleIndexMethod(medQualityControlDTO, baseIndex, entryCountMap);
|
|
|
+ medQualityControlDTO = ruleIndexMethod(filterVO,medQualityControlDTO, baseIndex, entryCountMap);
|
|
|
+ //指标十八
|
|
|
+ filterVO.setFlagStr("1");
|
|
|
+ entryCountMap = behospitalInfoFacade.getCountByEntry(filterVO);
|
|
|
+ medQualityControlDTO = ruleIndexMethod(filterVO,medQualityControlDTO, baseIndex, entryCountMap);
|
|
|
+
|
|
|
return medQualityControlDTO;
|
|
|
}
|
|
|
|
|
|
|
|
|
- private MedQualityControlDTO ruleIndexMethod(MedQualityControlDTO medQualityControlDTO, Map<String, Object> baseIndex, Map<String, Object> entryCountMap){
|
|
|
- if(entryCountMap.containsKey("WardRoundAmount") && baseIndex.containsKey("thrMouthNum") && entryCountMap.get("WardRoundAmount").toString()!="0"){
|
|
|
+ private MedQualityControlDTO ruleIndexMethod(FilterVO filterVO,MedQualityControlDTO medQualityControlDTO, Map<String, Object> baseIndex, Map<String, Object> entryCountMap){
|
|
|
+ if(filterVO.getFlagStr().equals("0") && entryCountMap.containsKey("WardRoundAmount") && baseIndex.containsKey("thrMouthNum") && entryCountMap.get("WardRoundAmount").toString()!="0"){
|
|
|
//指标十七
|
|
|
- DecimalFormat df = new DecimalFormat("0.0");
|
|
|
- double firDouble = Double.parseDouble(baseIndex.get("thrMouthNum").toString())-Double.parseDouble(entryCountMap.get("WardRoundAmount").toString());
|
|
|
- double thrMouthNum = Double.parseDouble(baseIndex.get("thrMouthNum").toString());
|
|
|
- medQualityControlDTO.setWardRoundNum( Double.parseDouble(df.format(firDouble/thrMouthNum)));
|
|
|
+ double wardRoundDo = currencyCal(baseIndex.get("thrMouthNum"), entryCountMap.get("WardRoundAmount"));
|
|
|
+ medQualityControlDTO.setWardRoundNum(wardRoundDo);
|
|
|
+ medQualityControlDTO.setWardRoundStr(wardRoundDo+"%");
|
|
|
+
|
|
|
};
|
|
|
+ if(filterVO.getFlagStr().equals("1") && entryCountMap.containsKey("rescueNumDe") && entryCountMap.containsKey("rescueAmount") && entryCountMap.get("rescueNumDe").toString()!="0"){
|
|
|
+ //指标十八
|
|
|
+ double rescueDo = currencyCal(entryCountMap.get("rescueNumDe"), entryCountMap.get("rescueAmount"));
|
|
|
+ medQualityControlDTO.setRescueNum(rescueDo);
|
|
|
+ medQualityControlDTO.setRescueStr(rescueDo+"%");
|
|
|
+ }
|
|
|
return medQualityControlDTO;
|
|
|
}
|
|
|
|
|
|
+ private double currencyCal(Object objFir,Object objSec){
|
|
|
+ DecimalFormat df = new DecimalFormat("0.0");
|
|
|
+ double firDouble = Double.parseDouble(objFir.toString()) - Double.parseDouble(objSec.toString());
|
|
|
+ double thrMouthNum = Double.parseDouble(objFir.toString());
|
|
|
+ double retData = Double.parseDouble(df.format(firDouble * 100 / thrMouthNum));
|
|
|
+ return retData;
|
|
|
+ };
|
|
|
+
|
|
|
|
|
|
private MedQualityControlDTO ManageIndexMethod(MedQualityControlDTO medQualityControlDTO, Map<String, Object> baseIndex,FilterVO filterVO){
|
|
|
QueryWrapper<MedManagementInfo> query = new QueryWrapper<>();
|
|
|
+ DecimalFormat df = new DecimalFormat("0.0");
|
|
|
query.eq("hospital_id", filterVO.getHospitalId())
|
|
|
.eq("is_deleted", IsDeleteEnum.N)
|
|
|
//指标1、2、3与是否归档没有直接关系 出院时间在单位时间内即可
|
|
@@ -2541,7 +2562,9 @@ public MedQualityControlDTO medicalRecordIndicator(FilterRecordVO filterRecordVO
|
|
|
firRecord =Double.parseDouble(baseIndex.get("forMouthNum").toString());
|
|
|
}
|
|
|
if( firRecord != 0d && StringUtils.isNotEmpty( baseIndex.get("sixMouthNum").toString()) ){
|
|
|
- medQualityControlDTO.setFirGradeNum(Math.ceil(Double.parseDouble(baseIndex.get("sixMouthNum").toString())/ firRecord));
|
|
|
+ double retNum = Double.parseDouble(baseIndex.get("sixMouthNum").toString()) * 100 / firRecord;
|
|
|
+ double firGradeStr = Double.parseDouble(df.format(retNum));
|
|
|
+ medQualityControlDTO.setFirGradeStr(firGradeStr+"%");
|
|
|
}
|
|
|
|
|
|
return medQualityControlDTO;
|