|
@@ -21,6 +21,7 @@ import com.google.common.collect.Lists;
|
|
|
import io.github.lvyahui8.spring.aggregate.facade.DataBeanAggregateQueryFacade;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.apache.ibatis.annotations.Param;
|
|
|
+import org.apache.poi.hssf.record.DVALRecord;
|
|
|
import org.apache.poi.ss.formula.functions.Na;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -77,7 +78,8 @@ public class ConsoleFacade {
|
|
|
private DoctorAdviceFacade doctorAdviceFacade;
|
|
|
@Autowired
|
|
|
private MedIndexResultFacade medIndexResultFacade;
|
|
|
-
|
|
|
+ @Autowired
|
|
|
+ private MedIndexRelevanceFacade medIndexRelevanceFacade;
|
|
|
//region-----------------------聚合接口开始-------------------------------
|
|
|
|
|
|
/**
|
|
@@ -443,11 +445,7 @@ public class ConsoleFacade {
|
|
|
if (InHospitalRecords != null && startCount != null) {
|
|
|
Map<String, String> stringStringHashMap = new LinkedHashMap<>();
|
|
|
stringStringHashMap.put("name", QualityContent.RYJL_24H_WCL);
|
|
|
- double num=startCount - InHospitalRecords;
|
|
|
- if(num<0.0){
|
|
|
- num=0.0;
|
|
|
- }
|
|
|
- stringStringHashMap.put("notCopiedStr", getResult(num, startCount.doubleValue()));
|
|
|
+ stringStringHashMap.put("notCopiedStr", getResult(startCount - InHospitalRecords, startCount.doubleValue()));
|
|
|
stringStringHashMap.put("num", Double.valueOf(startCount).toString());
|
|
|
hashMapArrayList.add(stringStringHashMap);
|
|
|
}
|
|
@@ -457,11 +455,7 @@ public class ConsoleFacade {
|
|
|
if (operationFeeNum != null && operationCount != null) {
|
|
|
LinkedHashMap<String, String> stringStringHashMap = new LinkedHashMap<>();
|
|
|
stringStringHashMap.put("name", QualityContent.SSJL_24H_WCL);
|
|
|
- double num=operationFeeNum - operationCount;
|
|
|
- if(num<0.0){
|
|
|
- num=0.0;
|
|
|
- }
|
|
|
- stringStringHashMap.put("notCopiedStr", getResult(num, operationFeeNum));
|
|
|
+ stringStringHashMap.put("notCopiedStr", getResult(operationFeeNum - operationCount, operationFeeNum));
|
|
|
stringStringHashMap.put("num", operationFeeNum.toString());
|
|
|
hashMapArrayList.add(stringStringHashMap);
|
|
|
}
|
|
@@ -471,11 +465,7 @@ public class ConsoleFacade {
|
|
|
if (OutHospitalRecords != null && startCount != null) {
|
|
|
Map<String, String> stringStringHashMap = new LinkedHashMap<>();
|
|
|
stringStringHashMap.put("name", QualityContent.CYJL_24H_WCL);
|
|
|
- double num=startCount - OutHospitalRecords;
|
|
|
- if(num<0.0){
|
|
|
- num=0.0;
|
|
|
- }
|
|
|
- stringStringHashMap.put("notCopiedStr", getResult(num, startCount.doubleValue()));
|
|
|
+ stringStringHashMap.put("notCopiedStr", getResult(startCount - OutHospitalRecords, startCount.doubleValue()));
|
|
|
stringStringHashMap.put("num", Double.valueOf(startCount).toString());
|
|
|
hashMapArrayList.add(stringStringHashMap);
|
|
|
}
|
|
@@ -485,11 +475,7 @@ public class ConsoleFacade {
|
|
|
if (recordHomePage != null && startCount != null) {
|
|
|
Map<String, String> stringStringHashMap = new LinkedHashMap<>();
|
|
|
stringStringHashMap.put("name", QualityContent.BASY_24H_WCL);
|
|
|
- double num=startCount - recordHomePage;
|
|
|
- if(num<0.0){
|
|
|
- num=0.0;
|
|
|
- }
|
|
|
- stringStringHashMap.put("notCopiedStr", getResult(num, startCount.doubleValue()));
|
|
|
+ stringStringHashMap.put("notCopiedStr", getResult(startCount - recordHomePage, startCount.doubleValue()));
|
|
|
stringStringHashMap.put("num", Double.valueOf(startCount).toString());
|
|
|
hashMapArrayList.add(stringStringHashMap);
|
|
|
}
|
|
@@ -499,11 +485,7 @@ public class ConsoleFacade {
|
|
|
if (CTNum != null && ct != null) {
|
|
|
Map<String, String> stringStringHashMap = new LinkedHashMap<>();
|
|
|
stringStringHashMap.put("name", QualityContent.CT_JCJL_FHL);
|
|
|
- double num=CTNum - ct;
|
|
|
- if(num<0.0){
|
|
|
- num=0.0;
|
|
|
- }
|
|
|
- stringStringHashMap.put("notCopiedStr", getResult(num, CTNum));
|
|
|
+ stringStringHashMap.put("notCopiedStr", getResult(CTNum - ct, CTNum));
|
|
|
stringStringHashMap.put("num", CTNum.toString());
|
|
|
hashMapArrayList.add(stringStringHashMap);
|
|
|
}
|
|
@@ -513,11 +495,7 @@ public class ConsoleFacade {
|
|
|
if (MRNum != null && mr != null) {
|
|
|
Map<String, String> stringStringHashMap = new LinkedHashMap<>();
|
|
|
stringStringHashMap.put("name", QualityContent.MR_JCJL_FHL);
|
|
|
- double num=MRNum - mr;
|
|
|
- if(num<0.0){
|
|
|
- num=0.0;
|
|
|
- }
|
|
|
- stringStringHashMap.put("notCopiedStr", getResult(num, MRNum));
|
|
|
+ stringStringHashMap.put("notCopiedStr", getResult(MRNum - mr, MRNum));
|
|
|
stringStringHashMap.put("num", MRNum.toString());
|
|
|
hashMapArrayList.add(stringStringHashMap);
|
|
|
}
|
|
@@ -527,11 +505,7 @@ public class ConsoleFacade {
|
|
|
if (operationPathologyFeeNum != null && operationPathologyFee != null) {
|
|
|
Map<String, String> stringStringHashMap = new LinkedHashMap<>();
|
|
|
stringStringHashMap.put("name", QualityContent.BL_JCJL_FHL);
|
|
|
- double num=operationPathologyFeeNum - operationPathologyFee;
|
|
|
- if(num<0.0){
|
|
|
- num=0.0;
|
|
|
- }
|
|
|
- stringStringHashMap.put("notCopiedStr", getResult(num, operationPathologyFeeNum));
|
|
|
+ stringStringHashMap.put("notCopiedStr", getResult(operationPathologyFeeNum - operationPathologyFee, operationPathologyFeeNum));
|
|
|
stringStringHashMap.put("num", operationPathologyFeeNum.toString());
|
|
|
hashMapArrayList.add(stringStringHashMap);
|
|
|
}
|
|
@@ -541,11 +515,7 @@ public class ConsoleFacade {
|
|
|
if (antibiosisFeeNum != null && antibiosis != null) {
|
|
|
Map<String, String> stringStringHashMap = new LinkedHashMap<>();
|
|
|
stringStringHashMap.put("name", QualityContent.KJYW_SY_FHL);
|
|
|
- double num=antibiosisFeeNum - antibiosis;
|
|
|
- if(num<0.0){
|
|
|
- num=0.0;
|
|
|
- }
|
|
|
- stringStringHashMap.put("notCopiedStr", getResult(num, antibiosisFeeNum));
|
|
|
+ stringStringHashMap.put("notCopiedStr", getResult(antibiosisFeeNum - antibiosis, antibiosisFeeNum));
|
|
|
stringStringHashMap.put("num", antibiosisFeeNum.toString());
|
|
|
hashMapArrayList.add(stringStringHashMap);
|
|
|
}
|
|
@@ -555,11 +525,7 @@ public class ConsoleFacade {
|
|
|
if (chemotherapyMalignantTumorsNum != null && chemotherapyMalignantTumors != null) {
|
|
|
Map<String, String> stringStringHashMap = new LinkedHashMap<>();
|
|
|
stringStringHashMap.put("name", QualityContent.EXZL_HXZL_FHL);
|
|
|
- double num=chemotherapyMalignantTumorsNum - chemotherapyMalignantTumors;
|
|
|
- if(num<0.0){
|
|
|
- num=0.0;
|
|
|
- }
|
|
|
- stringStringHashMap.put("notCopiedStr", getResult(num, chemotherapyMalignantTumorsNum));
|
|
|
+ stringStringHashMap.put("notCopiedStr", getResult(chemotherapyMalignantTumorsNum - chemotherapyMalignantTumors, chemotherapyMalignantTumorsNum));
|
|
|
stringStringHashMap.put("num", chemotherapyMalignantTumorsNum.toString());
|
|
|
hashMapArrayList.add(stringStringHashMap);
|
|
|
}
|
|
@@ -615,13 +581,17 @@ public class ConsoleFacade {
|
|
|
qw.ge("start_date",filterVO.getStartDate()+" 00:00:00");
|
|
|
qw.le("end_date", handleTime(filterVO.getEndDate()));
|
|
|
medIndexResultFacade.remove(qw);
|
|
|
+ QueryWrapper<MedIndexRelevance> qwa = new QueryWrapper<>();
|
|
|
+ qwa.eq("hospital_id",filterVO.getHospitalId());
|
|
|
+ qwa.ge("start_date",filterVO.getStartDate()+" 00:00:00");
|
|
|
+ qwa.le("end_date", handleTime(filterVO.getEndDate()));
|
|
|
+ medIndexRelevanceFacade.remove(qwa);
|
|
|
for (String startTime : timeList) {
|
|
|
filterVO.setStartDate(startTime);
|
|
|
filterVO.setEndDate( handleTime(startTime));
|
|
|
getMedicaIndicator(filterVO);
|
|
|
}
|
|
|
return true;
|
|
|
-
|
|
|
}
|
|
|
|
|
|
|
|
@@ -633,31 +603,87 @@ public class ConsoleFacade {
|
|
|
*/
|
|
|
public void getMedicaIndicator(FilterVO filterVO){
|
|
|
MedIndexResult medIndexResult = new MedIndexResult();
|
|
|
- Map<String, Long> selectOperationNumMap = behospitalInfoFacade.selectOperationNum(filterVO);
|
|
|
- //出院人数
|
|
|
- Long startCount = selectOperationNumMap.get(QualityContent.DISCHARGED_PATIENTS);
|
|
|
- Long operationFeeNum = 0L;
|
|
|
- filterVO.setFlagStr("2");
|
|
|
- List<MedManageParamsDTO> doctorAdviceMedManageParams = behospitalInfoFacade.getMedManageParams(filterVO);
|
|
|
- Map<String, Long> adviceNum = getAdviceNum(filterVO,doctorAdviceMedManageParams);
|
|
|
- //手术人数
|
|
|
- operationFeeNum = selectOperationNumMap.get("operationFee");
|
|
|
- Long operation = adviceNum.get("operation");
|
|
|
- operationFeeNum = operationFeeNum + operation;
|
|
|
+ List<Map<String, String>> selectOperationNumMap = behospitalInfoFacade.selectOperationNum(filterVO);
|
|
|
+ if(ListUtil.isNotEmpty(selectOperationNumMap)) {
|
|
|
+ CopyOnWriteArrayList<String> outHospitalCode = new CopyOnWriteArrayList<>();
|
|
|
+ CopyOnWriteArrayList<String> operationCode = new CopyOnWriteArrayList<>();
|
|
|
+ CopyOnWriteArrayList<String> operationPathologyCode = new CopyOnWriteArrayList<>();
|
|
|
+ CopyOnWriteArrayList<String> antibiosisCode = new CopyOnWriteArrayList<>();
|
|
|
+ Long operationFeeNum = 0L;
|
|
|
+ filterVO.setFlagStr("2");
|
|
|
+ List<MedManageParamsDTO> doctorAdviceMedManageParams = behospitalInfoFacade.getMedManageParams(filterVO);
|
|
|
+ Map<String, List<String>> adviceNum = getAdviceNum(filterVO, doctorAdviceMedManageParams);
|
|
|
+ for (Map<String, String> stringStringMap : selectOperationNumMap) {
|
|
|
+ String behospitalCode = stringStringMap.get("behospitalCode");
|
|
|
+ //出院code
|
|
|
+ outHospitalCode.add(behospitalCode);
|
|
|
+ if (Double.parseDouble(stringStringMap.get("operationFee"))>0){
|
|
|
+ //手术code
|
|
|
+ operationCode.add(behospitalCode);
|
|
|
+ }
|
|
|
+ if (Double.parseDouble(stringStringMap.get("operationFee"))>0 && Double.parseDouble(stringStringMap.get("pathologyFee"))>QualityContent.pathologyFee){
|
|
|
+ //病理code
|
|
|
+ operationPathologyCode.add(behospitalCode);
|
|
|
+ }
|
|
|
+ if (Double.parseDouble(stringStringMap.get("antibiosisFee"))>0){
|
|
|
+ //抗菌code
|
|
|
+ antibiosisCode.add(behospitalCode);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ Long startCount = Long.valueOf(outHospitalCode.size());
|
|
|
+ //手术人
|
|
|
+ List<String> operationList = adviceNum.get("operation");
|
|
|
+ if(ListUtil.isNotEmpty(operationList)){
|
|
|
+ for (String s : operationList) {
|
|
|
+ operationCode.add(s);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(ListUtil.isNotEmpty(operationCode)) {
|
|
|
+ operationFeeNum = Long.valueOf(operationCode.size());
|
|
|
+ }else {
|
|
|
+ operationFeeNum=0L;
|
|
|
+ }
|
|
|
//CT人数
|
|
|
- Long CTNum = adviceNum.get("CT");
|
|
|
+ List<String> ctList = adviceNum.get("CT");
|
|
|
+ Long CTNum=0L;
|
|
|
+ if(ListUtil.isNotEmpty(ctList)) {
|
|
|
+ CTNum = Long.valueOf(ctList.size());
|
|
|
+ }
|
|
|
//MR人数
|
|
|
- Long MRNum = adviceNum.get("MR");
|
|
|
+ List<String> mrList = adviceNum.get("MR");
|
|
|
+ Long MRNum=0L;
|
|
|
+ if(ListUtil.isNotEmpty(mrList)) {
|
|
|
+ MRNum = Long.valueOf(mrList.size());
|
|
|
+ }
|
|
|
//手术病理人数
|
|
|
- Long operationPathologyFeeNum = selectOperationNumMap.get("operationPathologyFee");
|
|
|
- Long operationPathology = adviceNum.get("operationPathology");
|
|
|
- operationPathologyFeeNum = operationPathologyFeeNum + operationPathology;
|
|
|
+ List<String> operationPathologyList = adviceNum.get("operationPathology");
|
|
|
+ if(ListUtil.isNotEmpty(operationPathologyList)){
|
|
|
+ for (String s : operationPathologyList) {
|
|
|
+ operationPathologyCode.add(s);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ Long operationPathologyFeeNum=0L;
|
|
|
+ if(ListUtil.isNotEmpty(operationPathologyCode)) {
|
|
|
+ operationPathologyFeeNum = Long.valueOf(operationPathologyCode.size());
|
|
|
+ }
|
|
|
//抗菌药物人数
|
|
|
- Long antibiosisFeeNum = selectOperationNumMap.get("antibiosisFee");
|
|
|
- Long antibiosisNum = adviceNum.get("antibiosis");
|
|
|
- antibiosisFeeNum = antibiosisFeeNum + antibiosisNum;
|
|
|
+
|
|
|
+ List<String> antibiosisList = adviceNum.get("antibiosis");
|
|
|
+ if(ListUtil.isNotEmpty(antibiosisList)) {
|
|
|
+ for (String s : antibiosisList) {
|
|
|
+ antibiosisCode.add(s);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ Long antibiosisFeeNum =0L;
|
|
|
+ if(ListUtil.isNotEmpty(antibiosisCode)) {
|
|
|
+ antibiosisFeeNum = Long.valueOf(antibiosisCode.size());
|
|
|
+ }
|
|
|
//恶性肿瘤化学治疗人数
|
|
|
- Long chemotherapyMalignantTumorsNum = adviceNum.get("chemotherapyMalignantTumors");
|
|
|
+ List<String> chemotherapyMalignantTumorsList = adviceNum.get("chemotherapyMalignantTumors");
|
|
|
+ Long chemotherapyMalignantTumorsNum =0L;
|
|
|
+ if(ListUtil.isNotEmpty(chemotherapyMalignantTumorsList)) {
|
|
|
+ chemotherapyMalignantTumorsNum= Long.valueOf(chemotherapyMalignantTumorsList.size());
|
|
|
+ }
|
|
|
//出院人数
|
|
|
if(startCount!=null){
|
|
|
medIndexResult.setAdmissionResult(Double.valueOf(startCount));
|
|
@@ -693,27 +719,101 @@ public class ConsoleFacade {
|
|
|
MedIndexFilterVO timeVo = new MedIndexFilterVO();
|
|
|
BeanUtils.copyProperties(filterVO,timeVo);
|
|
|
timeTrans(timeVo);
|
|
|
- Map<String, Object> baseIndex = behospitalInfoFacade.getBaseIndex(timeVo);
|
|
|
+ List<String> rescueCode = new CopyOnWriteArrayList<>();
|
|
|
+ List<String> bloodCode = new CopyOnWriteArrayList<>();
|
|
|
//指标二十七
|
|
|
|
|
|
//指标十七 医师查房记录
|
|
|
|
|
|
//指标十八 抢救记录
|
|
|
- rescueMethods(doctorAdviceMedManageParams,medIndexResult);
|
|
|
+ rescueMethods(doctorAdviceMedManageParams,medIndexResult,rescueCode);
|
|
|
//指标十九 出院患者病历2日归档
|
|
|
- getfileSecAmounts(filterVO,baseIndex,medIndexResult);
|
|
|
+ getfileSecAmounts(filterVO,medIndexResult);
|
|
|
//指标十四 手术记录
|
|
|
medIndexResult.setOperationCompleteResult(Double.parseDouble(operationFeeNum+""));
|
|
|
//指标十六 临床用血相关记录符合率
|
|
|
filterVO.setFlagStr("1");
|
|
|
List<MedManageParamsDTO> medManageParams = behospitalInfoFacade.getMedManageParams(filterVO);
|
|
|
- bloodMethods(doctorAdviceMedManageParams, medManageParams,medIndexResult);
|
|
|
+ bloodMethods(doctorAdviceMedManageParams, medManageParams,medIndexResult,bloodCode);
|
|
|
medIndexResult.setHospitalId(filterVO.getHospitalId());
|
|
|
medIndexResult.setStartDate(filterVO.getStartDate());
|
|
|
medIndexResult.setEndDate(filterVO.getEndDate());
|
|
|
medIndexResult.setGmtCreate(new Date());
|
|
|
medIndexResultFacade.save(medIndexResult);
|
|
|
-
|
|
|
+ Integer id = medIndexResult.getId();
|
|
|
+ MedIndexRelevance medIndexRelevance = new MedIndexRelevance();
|
|
|
+ medIndexRelevance.setIndexResultId(id);
|
|
|
+ medIndexRelevance.setHospitalId(filterVO.getHospitalId());
|
|
|
+ medIndexRelevance.setStartDate(filterVO.getStartDate());
|
|
|
+ medIndexRelevance.setEndDate(filterVO.getEndDate());
|
|
|
+ medIndexRelevance.setGmtCreate(new Date());
|
|
|
+ if(ListUtil.isNotEmpty(outHospitalCode)) {
|
|
|
+ medIndexRelevance.setRelevanceType(4);
|
|
|
+ for (String Code : outHospitalCode) {
|
|
|
+ medIndexRelevance.setBehospitalCode(Code);
|
|
|
+ medIndexRelevanceFacade.save(medIndexRelevance);
|
|
|
+ }
|
|
|
+ medIndexRelevance.setRelevanceType(6);
|
|
|
+ for (String Code : outHospitalCode) {
|
|
|
+ medIndexRelevance.setBehospitalCode(Code);
|
|
|
+ medIndexRelevanceFacade.save(medIndexRelevance);
|
|
|
+ }
|
|
|
+ medIndexRelevance.setRelevanceType(7);
|
|
|
+ for (String Code : outHospitalCode) {
|
|
|
+ medIndexRelevance.setBehospitalCode(Code);
|
|
|
+ medIndexRelevanceFacade.save(medIndexRelevance);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(ListUtil.isNotEmpty(operationCode)) {
|
|
|
+ medIndexRelevance.setRelevanceType(5);
|
|
|
+ for (String Code : operationCode) {
|
|
|
+ medIndexRelevance.setBehospitalCode(Code);
|
|
|
+ medIndexRelevanceFacade.save(medIndexRelevance);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(ListUtil.isNotEmpty(ctList)) {
|
|
|
+ medIndexRelevance.setRelevanceType(8);
|
|
|
+ for (String CTCode : ctList) {
|
|
|
+ medIndexRelevance.setBehospitalCode(CTCode);
|
|
|
+ medIndexRelevanceFacade.save(medIndexRelevance);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(ListUtil.isNotEmpty(mrList)) {
|
|
|
+ medIndexRelevance.setRelevanceType(9);
|
|
|
+ for (String MrCode : mrList) {
|
|
|
+ medIndexRelevance.setBehospitalCode(MrCode);
|
|
|
+ medIndexRelevanceFacade.save(medIndexRelevance);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(ListUtil.isNotEmpty(operationPathologyCode)) {
|
|
|
+ medIndexRelevance.setRelevanceType(10);
|
|
|
+ for (String Code : operationPathologyCode) {
|
|
|
+ medIndexRelevance.setBehospitalCode(Code);
|
|
|
+ medIndexRelevanceFacade.save(medIndexRelevance);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(ListUtil.isNotEmpty(operationCode)) {
|
|
|
+ medIndexRelevance.setRelevanceType(15);
|
|
|
+ for (String Code : operationCode) {
|
|
|
+ medIndexRelevance.setBehospitalCode(Code);
|
|
|
+ medIndexRelevanceFacade.save(medIndexRelevance);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(ListUtil.isNotEmpty(bloodCode)) {
|
|
|
+ medIndexRelevance.setRelevanceType(17);
|
|
|
+ for (String Code : bloodCode) {
|
|
|
+ medIndexRelevance.setBehospitalCode(Code);
|
|
|
+ medIndexRelevanceFacade.save(medIndexRelevance);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(ListUtil.isNotEmpty(rescueCode)) {
|
|
|
+ medIndexRelevance.setRelevanceType(19);
|
|
|
+ for (String Code : rescueCode) {
|
|
|
+ medIndexRelevance.setBehospitalCode(Code);
|
|
|
+ medIndexRelevanceFacade.save(medIndexRelevance);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
/**
|
|
|
* 两数据相除得到百分比
|
|
@@ -722,9 +822,6 @@ public class ConsoleFacade {
|
|
|
* @return
|
|
|
*/
|
|
|
public String getResult(double i , Double y){
|
|
|
-// BigDecimal b = new BigDecimal((i * 100.00) / y);
|
|
|
-// //保留2位小数
|
|
|
-// double result = b.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
|
|
|
DecimalFormat df = new DecimalFormat();
|
|
|
df.setMaximumFractionDigits(2);
|
|
|
df.setMinimumFractionDigits(2);
|
|
@@ -732,7 +829,6 @@ public class ConsoleFacade {
|
|
|
return "0.00%";
|
|
|
}
|
|
|
String k= df.format((i * 100.00) / y) + "%";
|
|
|
-
|
|
|
return k;
|
|
|
}
|
|
|
/**
|
|
@@ -798,10 +894,10 @@ public class ConsoleFacade {
|
|
|
/**
|
|
|
* 遍历医嘱信息存入相关数据
|
|
|
*/
|
|
|
- public Map<String,Long> getAdviceNum(FilterVO filterVO,List<MedManageParamsDTO> doctorAdviceMedManageParamsList) {
|
|
|
+ public Map<String,List<String>> getAdviceNum(FilterVO filterVO, List<MedManageParamsDTO> doctorAdviceMedManageParamsList) {
|
|
|
CopyOnWriteArrayList<MedManageParamsDTO> doctorAdviceMedManageParams = new CopyOnWriteArrayList<>(doctorAdviceMedManageParamsList);
|
|
|
String indexName = filterVO.getIndexName();
|
|
|
- Map map = new HashMap<String,Integer>();
|
|
|
+ Map mapCode = new HashMap<String,List<String>>();
|
|
|
List<String> CTBehospitalCode = new CopyOnWriteArrayList<>();
|
|
|
List<String> operationPathologyBehospitalCode = new CopyOnWriteArrayList<>();
|
|
|
List<String> MRBehospitalCode = new CopyOnWriteArrayList<>();
|
|
@@ -933,44 +1029,53 @@ public class ConsoleFacade {
|
|
|
myPool.shutdown();
|
|
|
|
|
|
if(ListUtil.isEmpty(CTBehospitalCode)){
|
|
|
- map.put("CT",Long.valueOf(0));
|
|
|
+ // map.put("CT",Long.valueOf(0));
|
|
|
+ mapCode.put("CT",null);
|
|
|
}else {
|
|
|
- map.put("CT",Long.valueOf(CTBehospitalCode.size()));
|
|
|
+ // map.put("CT",Long.valueOf(CTBehospitalCode.size()));
|
|
|
+ mapCode.put("CT",CTBehospitalCode);
|
|
|
}
|
|
|
if(ListUtil.isEmpty(MRBehospitalCode)){
|
|
|
- map.put("MR",Long.valueOf(0));
|
|
|
+ // map.put("MR",Long.valueOf(0));
|
|
|
+ mapCode.put("MR",null);
|
|
|
}else {
|
|
|
- map.put("MR",Long.valueOf(MRBehospitalCode.size()));
|
|
|
+ // map.put("MR",Long.valueOf(MRBehospitalCode.size()));
|
|
|
+ mapCode.put("MR",MRBehospitalCode);
|
|
|
}
|
|
|
if(ListUtil.isEmpty(operationBehospitalCode)){
|
|
|
- map.put("operation",Long.valueOf(0));
|
|
|
+ // map.put("operation",Long.valueOf(0));
|
|
|
+ mapCode.put("operation",null);
|
|
|
}else {
|
|
|
- map.put("operation",Long.valueOf(operationBehospitalCode.size()));
|
|
|
+ // map.put("operation",Long.valueOf(operationBehospitalCode.size()));
|
|
|
+ mapCode.put("operation",operationBehospitalCode);
|
|
|
}
|
|
|
- if(ListUtil.isEmpty(operationBehospitalCode)||ListUtil.isEmpty(pathologyBehospitalCode)){
|
|
|
- map.put("operationPathology",Long.valueOf(0));
|
|
|
+ if(ListUtil.isEmpty(operationBehospitalCode)||ListUtil.isEmpty(operationPathologyBehospitalCode)){
|
|
|
+ // map.put("operationPathology",Long.valueOf(0));
|
|
|
+ mapCode.put("operationPathology",null);
|
|
|
}else {
|
|
|
for (String operation : operationBehospitalCode) {
|
|
|
- for (String pathology : pathologyBehospitalCode) {
|
|
|
- if(pathology.equals(operation)){
|
|
|
- operationPathologyBehospitalCode.add(operation);
|
|
|
- }
|
|
|
+ if(pathologyBehospitalCode.contains(operation)){
|
|
|
+ operationPathologyBehospitalCode.add(operation);
|
|
|
}
|
|
|
}
|
|
|
- map.put("operationPathology",Long.valueOf(operationPathologyBehospitalCode.size()));
|
|
|
+ // map.put("operationPathology",Long.valueOf(operationPathologyBehospitalCode.size()));
|
|
|
+ mapCode.put("operationPathology",operationBehospitalCode);
|
|
|
}
|
|
|
if(ListUtil.isEmpty(antibiosisBehospitalCode)){
|
|
|
- map.put("antibiosis",Long.valueOf(0));
|
|
|
+ // map.put("antibiosis",Long.valueOf(0));
|
|
|
+ mapCode.put("antibiosis",null);
|
|
|
}else {
|
|
|
- map.put("antibiosis",Long.valueOf(antibiosisBehospitalCode.size()));
|
|
|
+ // map.put("antibiosis",Long.valueOf(antibiosisBehospitalCode.size()));
|
|
|
+ mapCode.put("antibiosis",antibiosisBehospitalCode);
|
|
|
}
|
|
|
if(ListUtil.isEmpty(chemotherapyMalignantTumorsBehospitalCode)){
|
|
|
- map.put("chemotherapyMalignantTumors",Long.valueOf(0));
|
|
|
+ // map.put("chemotherapyMalignantTumors",Long.valueOf(0));
|
|
|
+ mapCode.put("chemotherapyMalignantTumors",null);
|
|
|
}else {
|
|
|
- map.put("chemotherapyMalignantTumors",Long.valueOf(chemotherapyMalignantTumorsBehospitalCode.size()));
|
|
|
+ // map.put("chemotherapyMalignantTumors",Long.valueOf(chemotherapyMalignantTumorsBehospitalCode.size()));
|
|
|
+ mapCode.put("chemotherapyMalignantTumors",antibiosisBehospitalCode);
|
|
|
}
|
|
|
-
|
|
|
- return map;
|
|
|
+ return mapCode;
|
|
|
}
|
|
|
}
|
|
|
/**
|
|
@@ -2821,6 +2926,9 @@ public class ConsoleFacade {
|
|
|
if(StringUtils.isNotEmpty(String.valueOf(count)) && count != 0d){
|
|
|
double rescueDo = currencyCal(count, triggeringRulesMap.get("rescueNum"));
|
|
|
num = String.valueOf(rescueDo);
|
|
|
+ if(rescueDo<0d){
|
|
|
+ num = null;
|
|
|
+ }
|
|
|
};
|
|
|
LinkedHashMap<String, String> firMap = new LinkedHashMap<>();
|
|
|
firMap.put("name","患者抢救记录及时完成率");
|
|
@@ -2835,6 +2943,9 @@ public class ConsoleFacade {
|
|
|
if( triggeringRulesMap.containsKey("WardRoundNum") && baseIndex.containsKey("forWorkNum") && !baseIndex.get("forWorkNum").toString().equals("0")){
|
|
|
double wardRoundDo = currencyCal(baseIndex.get("forWorkNum"), triggeringRulesMap.get("WardRoundNum"));
|
|
|
num = String.valueOf(wardRoundDo);
|
|
|
+ if(wardRoundDo<0d){
|
|
|
+ num = null;
|
|
|
+ }
|
|
|
};
|
|
|
LinkedHashMap<String, String> firMap = new LinkedHashMap<>();
|
|
|
firMap.put("name","医师查房记录完成率");
|
|
@@ -2850,6 +2961,9 @@ public class ConsoleFacade {
|
|
|
if( triggeringRulesMap.containsKey("operationRecordNum") && StringUtils.isNotEmpty(operationFeeNum) && ! operationFeeNum.equals("0")){
|
|
|
double operationRecordDo = currencyCal(operationFeeNum, triggeringRulesMap.get("operationRecordNum"));
|
|
|
num = String.valueOf(operationRecordDo);
|
|
|
+ if(operationRecordDo<0d){
|
|
|
+ num = null;
|
|
|
+ }
|
|
|
};
|
|
|
LinkedHashMap<String, String> firMap = new LinkedHashMap<>();
|
|
|
firMap.put("name","手术相关记录完成率");
|
|
@@ -2865,8 +2979,11 @@ public class ConsoleFacade {
|
|
|
String num = null;
|
|
|
if(StringUtils.isNotEmpty(String.valueOf(count)) && count != 0d){
|
|
|
//指标十七
|
|
|
- double rescueDo = currencyCal(count, triggeringRulesMap.get("bloodNum"));
|
|
|
- num = String.valueOf(rescueDo);
|
|
|
+ double bloodDo = currencyCal(count, triggeringRulesMap.get("bloodNum"));
|
|
|
+ num = String.valueOf(bloodDo);
|
|
|
+ if(bloodDo<0d){
|
|
|
+ num = null;
|
|
|
+ }
|
|
|
}
|
|
|
LinkedHashMap<String, String> firMap = new LinkedHashMap<>();
|
|
|
firMap.put("name","临床用血相关记录符合率");
|
|
@@ -3002,7 +3119,7 @@ public class ConsoleFacade {
|
|
|
* ==============================后台维护===============================
|
|
|
*/
|
|
|
//指标十八 抢救记录
|
|
|
- private void rescueMethods(List<MedManageParamsDTO> medManageParams,MedIndexResult medIndexResult){
|
|
|
+ private void rescueMethods(List<MedManageParamsDTO> medManageParams,MedIndexResult medIndexResult, List<String> rescueCode){
|
|
|
List<MedManageParamsDTO> manageList= new ArrayList<>();
|
|
|
List<String> rescueDrugList = QualityContent.RESCUEDRUGLIST;
|
|
|
for (int i = 0; i < medManageParams.size(); i++) {
|
|
@@ -3012,6 +3129,7 @@ public class ConsoleFacade {
|
|
|
for (String str : rescueDrugList) {
|
|
|
if(StringUtils.isNotEmpty(daItemName) && daItemName.contains(str) && StringUtils.isNotEmpty(doctorAdviceType) && doctorAdviceType.equals(QualityContent.STAT_ORDER) && (StringUtils.isEmpty(da_status) || (StringUtils.isNotEmpty(da_status) && ! da_status.equals(QualityContent.CANCELLATION_ORDER)))){
|
|
|
manageList.add(medManageParams.get(i));
|
|
|
+ rescueCode.add(medManageParams.get(i).getBehospitalCode());
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -3024,7 +3142,7 @@ public class ConsoleFacade {
|
|
|
}
|
|
|
|
|
|
//指标十六 临床用血相关记录符合率
|
|
|
- private void bloodMethods(List<MedManageParamsDTO> doctorAdviceList, List<MedManageParamsDTO> medManageParams,MedIndexResult medIndexResult){
|
|
|
+ private void bloodMethods(List<MedManageParamsDTO> doctorAdviceList, List<MedManageParamsDTO> medManageParams,MedIndexResult medIndexResult, List<String> bloodCode){
|
|
|
Set<String> manageList= new CopyOnWriteArraySet<>();
|
|
|
List<String> blood_list = QualityContent.BLOODLIST;
|
|
|
//lis项目存在用血住院病历号
|
|
@@ -3042,7 +3160,7 @@ public class ConsoleFacade {
|
|
|
(StringUtils.isEmpty(obj.getDaStatus()) || (StringUtils.isNotEmpty(obj.getDaStatus()) && ! obj.getDaStatus()
|
|
|
.equals(QualityContent.CANCELLATION_ORDER))))
|
|
|
.distinct()
|
|
|
- .map(obj -> manageList.add(obj.getBehospitalCode()))
|
|
|
+ .map(obj -> {manageList.add(obj.getBehospitalCode());return bloodCode.add(obj.getBehospitalCode());})
|
|
|
.collect(Collectors.toList());
|
|
|
long xx3= System.currentTimeMillis();
|
|
|
System.out.println("advice体现lis项目存在用血的住院病历号 = " + (xx3-xx2));
|
|
@@ -3057,7 +3175,7 @@ public class ConsoleFacade {
|
|
|
|
|
|
|
|
|
//指标十九 出院患者病历2日归档
|
|
|
- private void getfileSecAmounts(FilterVO filterVO,Map<String, Object> baseIndex,MedIndexResult medIndexResult){
|
|
|
+ private void getfileSecAmounts(FilterVO filterVO,MedIndexResult medIndexResult){
|
|
|
QueryWrapper<BehospitalInfo> query = new QueryWrapper<>();
|
|
|
DecimalFormat df = new DecimalFormat("#0.00");
|
|
|
query.eq("hospital_id", filterVO.getHospitalId())
|