|
@@ -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-----------------------聚合接口开始-------------------------------
|
|
|
|
|
|
/**
|
|
@@ -579,6 +581,11 @@ 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));
|
|
@@ -596,31 +603,96 @@ 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);
|
|
|
+ List<Map<String, String>> selectOperationNumMap = behospitalInfoFacade.selectOperationNum(filterVO);
|
|
|
+ if(ListUtil.isNotEmpty(selectOperationNumMap)) {
|
|
|
+ Set<String> outHospitalCode = new CopyOnWriteArraySet<>();
|
|
|
+ Set<String> operationCode = new CopyOnWriteArraySet<>();
|
|
|
+ Set<String> operationPathologyCode = new CopyOnWriteArraySet<>();
|
|
|
+ Set<String> antibiosisCode = new CopyOnWriteArraySet<>();
|
|
|
+ List<String> adviceVerify = adviceVerify(filterVO);
|
|
|
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;
|
|
|
+ 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);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(ListUtil.isNotEmpty(adviceVerify)){
|
|
|
+ for (String code : adviceVerify) {
|
|
|
+ outHospitalCode.add(code);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ Long startCount = Long.valueOf(outHospitalCode.size());
|
|
|
+ //手术人
|
|
|
+ List<String> operationList = adviceNum.get("operation");
|
|
|
+ if(ListUtil.isNotEmpty(operationList)){
|
|
|
+ for (String s : operationList) {
|
|
|
+ operationCode.add(s);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(operationCode.size()>0&&operationCode!=null) {
|
|
|
+ operationFeeNum = Long.valueOf(operationCode.size());
|
|
|
+ }
|
|
|
//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;
|
|
|
+ Long operationPathologyFeeNum=0L;
|
|
|
+ List<String> operationPathologyList = adviceNum.get("operationPathology");
|
|
|
+ if(ListUtil.isNotEmpty(operationPathologyList)){
|
|
|
+ for (String s : operationPathologyList) {
|
|
|
+ operationPathologyCode.add(s);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(operationPathologyCode.size()>0&&operationPathologyCode!=null) {
|
|
|
+ operationPathologyFeeNum = Long.valueOf(operationPathologyCode.size());
|
|
|
+ }
|
|
|
+ //细菌培养人数
|
|
|
+ List<String> bacterialCultureList = adviceNum.get("bacterialCulture");
|
|
|
+ Long bacterialCultureNum=0L;
|
|
|
+ if(ListUtil.isNotEmpty(bacterialCultureList)) {
|
|
|
+ bacterialCultureNum = Long.valueOf(bacterialCultureList.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(antibiosisCode.size()>0&&antibiosisCode!=null) {
|
|
|
+ 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));
|
|
@@ -641,6 +713,10 @@ public class ConsoleFacade {
|
|
|
if (operationPathologyFeeNum != null) {
|
|
|
medIndexResult.setPathologyResult(Double.valueOf(operationPathologyFeeNum));
|
|
|
}
|
|
|
+ //细菌培养人数
|
|
|
+ if (bacterialCultureNum != null) {
|
|
|
+ medIndexResult.setGermResult(Double.valueOf(bacterialCultureNum));
|
|
|
+ }
|
|
|
//抗菌人数
|
|
|
if (antibiosisFeeNum != null ) {
|
|
|
medIndexResult.setAntibiosisResult(Double.valueOf(antibiosisFeeNum));
|
|
@@ -656,27 +732,130 @@ public class ConsoleFacade {
|
|
|
MedIndexFilterVO timeVo = new MedIndexFilterVO();
|
|
|
BeanUtils.copyProperties(filterVO,timeVo);
|
|
|
timeTrans(timeVo);
|
|
|
- Map<String, Object> baseIndex = behospitalInfoFacade.getBaseIndex(timeVo);
|
|
|
+ Set<String> rescueCode = new CopyOnWriteArraySet<>();
|
|
|
+ Set<String> bloodCode = new CopyOnWriteArraySet<>();
|
|
|
//指标二十七
|
|
|
|
|
|
//指标十七 医师查房记录
|
|
|
|
|
|
//指标十八 抢救记录
|
|
|
- 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(outHospitalCode.size()>0&&outHospitalCode!=null) {
|
|
|
+ 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(operationCode.size()>0&&operationCode!=null) {
|
|
|
+ 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(operationPathologyCode.size()>0&&operationPathologyCode!=null) {
|
|
|
+ medIndexRelevance.setRelevanceType(10);
|
|
|
+ for (String Code : operationPathologyCode) {
|
|
|
+ medIndexRelevance.setBehospitalCode(Code);
|
|
|
+ medIndexRelevanceFacade.save(medIndexRelevance);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(ListUtil.isNotEmpty(bacterialCultureList)) {
|
|
|
+ medIndexRelevance.setRelevanceType(11);
|
|
|
+ for (String Code : bacterialCultureList) {
|
|
|
+ medIndexRelevance.setBehospitalCode(Code);
|
|
|
+ medIndexRelevanceFacade.save(medIndexRelevance);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(antibiosisCode.size()>0&&antibiosisCode!=null) {
|
|
|
+ medIndexRelevance.setRelevanceType(12);
|
|
|
+ for (String Code : antibiosisCode) {
|
|
|
+ medIndexRelevance.setBehospitalCode(Code);
|
|
|
+ medIndexRelevanceFacade.save(medIndexRelevance);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(ListUtil.isNotEmpty(chemotherapyMalignantTumorsList)) {
|
|
|
+ medIndexRelevance.setRelevanceType(13);
|
|
|
+ for (String Code : chemotherapyMalignantTumorsList) {
|
|
|
+ medIndexRelevance.setBehospitalCode(Code);
|
|
|
+ medIndexRelevanceFacade.save(medIndexRelevance);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(operationCode.size()>0&&operationCode!=null) {
|
|
|
+ medIndexRelevance.setRelevanceType(15);
|
|
|
+ for (String Code : operationCode) {
|
|
|
+ medIndexRelevance.setBehospitalCode(Code);
|
|
|
+ medIndexRelevanceFacade.save(medIndexRelevance);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(bloodCode.size()>0&&bloodCode!=null) {
|
|
|
+ medIndexRelevance.setRelevanceType(17);
|
|
|
+ for (String Code : bloodCode) {
|
|
|
+ medIndexRelevance.setBehospitalCode(Code);
|
|
|
+ medIndexRelevanceFacade.save(medIndexRelevance);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(outHospitalCode.size()>0&&outHospitalCode!=null) {
|
|
|
+ medIndexRelevance.setRelevanceType(18);
|
|
|
+ for (String Code : outHospitalCode) {
|
|
|
+ medIndexRelevance.setBehospitalCode(Code);
|
|
|
+ medIndexRelevanceFacade.save(medIndexRelevance);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(rescueCode.size()>0&&rescueCode!=null) {
|
|
|
+ medIndexRelevance.setRelevanceType(19);
|
|
|
+ for (String Code : rescueCode) {
|
|
|
+ medIndexRelevance.setBehospitalCode(Code);
|
|
|
+ medIndexRelevanceFacade.save(medIndexRelevance);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ System.out.println(operationPathologyCode.size());
|
|
|
+ }
|
|
|
}
|
|
|
/**
|
|
|
* 两数据相除得到百分比
|
|
@@ -757,15 +936,16 @@ 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<>();
|
|
|
List<String> operationBehospitalCode = new CopyOnWriteArrayList<>();
|
|
|
List<String> pathologyBehospitalCode = new CopyOnWriteArrayList<>();
|
|
|
+ List<String> bacterialCultureCode = new CopyOnWriteArrayList<>();
|
|
|
List<String> antibiosisBehospitalCode = new CopyOnWriteArrayList<>();
|
|
|
List<String> chemotherapyMalignantTumorsBehospitalCode = new CopyOnWriteArrayList<>();
|
|
|
//无首页code
|
|
@@ -859,6 +1039,14 @@ public class ConsoleFacade {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ //细菌培养
|
|
|
+ if (indexName.equals(QualityContent.XJPY_JCJL_FHL) || indexName.equals(QualityContent.QB)) {
|
|
|
+ if(!bacterialCultureCode.contains(behospitalCode)){
|
|
|
+ if(daItemName.contains(QualityContent.BACTERIAL_CULTURE)){
|
|
|
+ bacterialCultureCode.add(behospitalCode);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
//获取为长期医嘱或临时医嘱的医嘱
|
|
@@ -892,42 +1080,46 @@ public class ConsoleFacade {
|
|
|
myPool.shutdown();
|
|
|
|
|
|
if(ListUtil.isEmpty(CTBehospitalCode)){
|
|
|
- map.put("CT",Long.valueOf(0));
|
|
|
+ mapCode.put("CT",null);
|
|
|
}else {
|
|
|
- map.put("CT",Long.valueOf(CTBehospitalCode.size()));
|
|
|
+ mapCode.put("CT",CTBehospitalCode);
|
|
|
}
|
|
|
if(ListUtil.isEmpty(MRBehospitalCode)){
|
|
|
- map.put("MR",Long.valueOf(0));
|
|
|
+ mapCode.put("MR",null);
|
|
|
}else {
|
|
|
- map.put("MR",Long.valueOf(MRBehospitalCode.size()));
|
|
|
+ mapCode.put("MR",MRBehospitalCode);
|
|
|
}
|
|
|
if(ListUtil.isEmpty(operationBehospitalCode)){
|
|
|
- map.put("operation",Long.valueOf(0));
|
|
|
+ mapCode.put("operation",null);
|
|
|
}else {
|
|
|
- map.put("operation",Long.valueOf(operationBehospitalCode.size()));
|
|
|
+ mapCode.put("operation",operationBehospitalCode);
|
|
|
}
|
|
|
if(ListUtil.isEmpty(operationBehospitalCode)||ListUtil.isEmpty(operationPathologyBehospitalCode)){
|
|
|
- map.put("operationPathology",Long.valueOf(0));
|
|
|
+ mapCode.put("operationPathology",null);
|
|
|
}else {
|
|
|
for (String operation : operationBehospitalCode) {
|
|
|
if(pathologyBehospitalCode.contains(operation)){
|
|
|
operationPathologyBehospitalCode.add(operation);
|
|
|
}
|
|
|
}
|
|
|
- map.put("operationPathology",Long.valueOf(operationPathologyBehospitalCode.size()));
|
|
|
+ mapCode.put("operationPathology",operationBehospitalCode);
|
|
|
+ }
|
|
|
+ if(ListUtil.isEmpty(bacterialCultureCode)){
|
|
|
+ mapCode.put("bacterialCulture",null);
|
|
|
+ }else {
|
|
|
+ mapCode.put("bacterialCulture",bacterialCultureCode);
|
|
|
}
|
|
|
if(ListUtil.isEmpty(antibiosisBehospitalCode)){
|
|
|
- map.put("antibiosis",Long.valueOf(0));
|
|
|
+ mapCode.put("antibiosis",null);
|
|
|
}else {
|
|
|
- map.put("antibiosis",Long.valueOf(antibiosisBehospitalCode.size()));
|
|
|
+ mapCode.put("antibiosis",antibiosisBehospitalCode);
|
|
|
}
|
|
|
if(ListUtil.isEmpty(chemotherapyMalignantTumorsBehospitalCode)){
|
|
|
- map.put("chemotherapyMalignantTumors",Long.valueOf(0));
|
|
|
+ mapCode.put("chemotherapyMalignantTumors",null);
|
|
|
}else {
|
|
|
- map.put("chemotherapyMalignantTumors",Long.valueOf(chemotherapyMalignantTumorsBehospitalCode.size()));
|
|
|
+ mapCode.put("chemotherapyMalignantTumors",antibiosisBehospitalCode);
|
|
|
}
|
|
|
-
|
|
|
- return map;
|
|
|
+ return mapCode;
|
|
|
}
|
|
|
}
|
|
|
/**
|
|
@@ -2778,6 +2970,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","患者抢救记录及时完成率");
|
|
@@ -2792,6 +2987,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","医师查房记录完成率");
|
|
@@ -2807,6 +3005,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","手术相关记录完成率");
|
|
@@ -2822,8 +3023,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","临床用血相关记录符合率");
|
|
@@ -2848,8 +3052,8 @@ public class ConsoleFacade {
|
|
|
DecimalFormat df = new DecimalFormat("#0.00");
|
|
|
double count = medManageParams.get("sec_file_result");
|
|
|
String num = null;
|
|
|
- if(StringUtils.isNotEmpty( baseIndex.get("firWorkNum").toString()) && ! baseIndex.get("firWorkNum").toString().equals("0") ){
|
|
|
- double retNum =count* 100/Double.parseDouble(baseIndex.get("firWorkNum").toString());
|
|
|
+ if(StringUtils.isNotEmpty( baseIndex.get("sevenWorkNum").toString()) && ! baseIndex.get("sevenWorkNum").toString().equals("0") ){
|
|
|
+ double retNum =count* 100/Double.parseDouble(baseIndex.get("sevenWorkNum").toString());
|
|
|
double firGradeStr = Double.parseDouble(df.format(retNum));
|
|
|
num = String.valueOf(firGradeStr);
|
|
|
}
|
|
@@ -2880,10 +3084,13 @@ public class ConsoleFacade {
|
|
|
if(secOp.isPresent()){
|
|
|
secMouth = secOp.get();
|
|
|
}
|
|
|
+ if(secMouth == 0d){
|
|
|
+ secMouth = 5d;
|
|
|
+ }
|
|
|
//指标一
|
|
|
String num1 = "0";
|
|
|
if(secMouth != 0d && secMouth != null && StringUtils.isNotEmpty( baseIndex.get("firWorkNum").toString())){
|
|
|
- num1 = String.valueOf(Math.ceil(Double.parseDouble(baseIndex.get("firWorkNum").toString()) / secMouth));
|
|
|
+ num1 = String.valueOf(Math.round(Double.parseDouble(baseIndex.get("firWorkNum").toString()) / secMouth));
|
|
|
}
|
|
|
LinkedHashMap<String, String> firMap = new LinkedHashMap<>();
|
|
|
firMap.put("name","住院病案管理人员月均负担出院患者病历数");
|
|
@@ -2898,10 +3105,13 @@ public class ConsoleFacade {
|
|
|
if(firOp.isPresent()){
|
|
|
firMouth = firOp.get();
|
|
|
}
|
|
|
+ if(firMouth == 0d){
|
|
|
+ firMouth = 5d;
|
|
|
+ }
|
|
|
String num3 = "0";
|
|
|
if(firMouth != 0d && firMouth != null && StringUtils.isNotEmpty( baseIndex.get("secWorkNum").toString())){
|
|
|
//指标二
|
|
|
- num3 = String.valueOf(Math.ceil(Double.parseDouble(baseIndex.get("secWorkNum").toString())/firMouth));
|
|
|
+ num3 = String.valueOf(Math.round(Double.parseDouble(baseIndex.get("secWorkNum").toString())/firMouth));
|
|
|
}
|
|
|
LinkedHashMap<String, String> thrMap = new LinkedHashMap<>();
|
|
|
thrMap.put("name","门诊病案管理人员月均负担门诊患者病历数");
|
|
@@ -2916,11 +3126,13 @@ public class ConsoleFacade {
|
|
|
if(thrOp.isPresent()){
|
|
|
thrMouth = thrOp.get();
|
|
|
}
|
|
|
-
|
|
|
+ if(thrMouth == 0d){
|
|
|
+ thrMouth = 5d;
|
|
|
+ }
|
|
|
//指标三
|
|
|
String num2 = "0";
|
|
|
if(thrMouth != 0d && thrMouth != null && StringUtils.isNotEmpty( baseIndex.get("firWorkNum").toString())){
|
|
|
- num2 = String.valueOf(Math.ceil(Double.parseDouble(baseIndex.get("firWorkNum").toString())/thrMouth));
|
|
|
+ num2 = String.valueOf(Math.round(Double.parseDouble(baseIndex.get("firWorkNum").toString())/thrMouth));
|
|
|
|
|
|
}
|
|
|
LinkedHashMap<String, String> secMap = new LinkedHashMap<>();
|
|
@@ -2944,7 +3156,7 @@ public class ConsoleFacade {
|
|
|
if( firRecord != 0d && StringUtils.isNotEmpty( baseIndex.get("sixWorkNum").toString()) ){
|
|
|
double retNum = Double.parseDouble(baseIndex.get("sixWorkNum").toString()) * 100 / firRecord;
|
|
|
double firGradeStr = Double.parseDouble(df.format(retNum));
|
|
|
- num4 = String.valueOf(Math.ceil(firGradeStr));
|
|
|
+ num4 = String.valueOf(firGradeStr);
|
|
|
}
|
|
|
LinkedHashMap<String, String> fouMap = new LinkedHashMap<>();
|
|
|
fouMap.put("name","甲级病历率");
|
|
@@ -2959,7 +3171,7 @@ public class ConsoleFacade {
|
|
|
* ==============================后台维护===============================
|
|
|
*/
|
|
|
//指标十八 抢救记录
|
|
|
- private void rescueMethods(List<MedManageParamsDTO> medManageParams,MedIndexResult medIndexResult){
|
|
|
+ private void rescueMethods(List<MedManageParamsDTO> medManageParams,MedIndexResult medIndexResult, Set<String> rescueCode){
|
|
|
List<MedManageParamsDTO> manageList= new ArrayList<>();
|
|
|
List<String> rescueDrugList = QualityContent.RESCUEDRUGLIST;
|
|
|
for (int i = 0; i < medManageParams.size(); i++) {
|
|
@@ -2967,8 +3179,9 @@ public class ConsoleFacade {
|
|
|
String doctorAdviceType = medManageParams.get(i).getDoctorAdviceType();
|
|
|
String da_status = medManageParams.get(i).getDaStatus();
|
|
|
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) && ! doctorAdviceType.equals(QualityContent.CANCELLATION_ORDER)))){
|
|
|
+ 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());
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -2981,7 +3194,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, Set<String> bloodCode){
|
|
|
Set<String> manageList= new CopyOnWriteArraySet<>();
|
|
|
List<String> blood_list = QualityContent.BLOODLIST;
|
|
|
//lis项目存在用血住院病历号
|
|
@@ -2996,10 +3209,10 @@ public class ConsoleFacade {
|
|
|
doctorAdviceList.parallelStream()
|
|
|
.filter(obj -> beCode.contains(obj.getBehospitalCode()) && obj.getDoctorAdviceType()
|
|
|
.equals(QualityContent.STAT_ORDER) && blood_list.contains(obj.getDaItemName()) &&
|
|
|
- (StringUtils.isEmpty(obj.getDaStatus())) || (StringUtils.isNotEmpty(obj.getDaStatus()) && ! obj.getDaStatus()
|
|
|
- .equals(QualityContent.CANCELLATION_ORDER)))
|
|
|
+ (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));
|
|
@@ -3014,7 +3227,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())
|
|
@@ -3029,7 +3242,7 @@ public class ConsoleFacade {
|
|
|
Iterator<BehospitalInfo> iterator = list.iterator();
|
|
|
while (iterator.hasNext()){
|
|
|
BehospitalInfo beh = iterator.next();
|
|
|
- Boolean flag = getTrueSecFile(beh.getLeaveHospitalDate(), beh.getPlacefileDate(), TimeContent.getHolidaysTimeList());
|
|
|
+ Boolean flag = getTrueSecFile(beh.getLeaveHospitalDate(), beh.getPlacefileDate(), TimeContent.HolidaysTimeList);
|
|
|
//时间截止则删除元素
|
|
|
if(!flag){
|
|
|
iterator.remove();
|
|
@@ -3043,6 +3256,9 @@ public class ConsoleFacade {
|
|
|
}
|
|
|
|
|
|
private Boolean getTrueSecFile(Date date1,Date date2, List<String> holidaysTimeList){
|
|
|
+ if(date1.after(date2)){
|
|
|
+ return false;
|
|
|
+ }
|
|
|
Date date = date1;
|
|
|
Date dateSec = date2;
|
|
|
DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
|
@@ -3077,19 +3293,6 @@ public class ConsoleFacade {
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
- private void firMethods(String indexName, Map<String, Object> baseIndex, MedIndexResult medIndexResult){
|
|
|
- DecimalFormat df = new DecimalFormat("0.00");
|
|
|
- //指标二十七 -甲级病历率
|
|
|
- Double firRecord = 0d;
|
|
|
- if(StringUtils.isNotEmpty( baseIndex.get("forWorkNum").toString())){
|
|
|
- firRecord =Double.parseDouble(baseIndex.get("forWorkNum").toString());
|
|
|
- }
|
|
|
- if( firRecord != 0d && StringUtils.isNotEmpty( baseIndex.get("sixWorkNum").toString()) ){
|
|
|
- double retNum = Double.parseDouble(baseIndex.get("sixWorkNum").toString()) * 100 / firRecord;
|
|
|
- double firGradeStr = Double.parseDouble(df.format(retNum));
|
|
|
- medIndexResult.setFirRecordResult(firGradeStr);
|
|
|
- }
|
|
|
- };
|
|
|
|
|
|
private void timeTrans( MedIndexFilterVO filterVO){
|
|
|
SimpleDateFormat myFormatter = new SimpleDateFormat("yyyy-MM-dd");
|