|
@@ -1,5 +1,6 @@
|
|
|
package com.diagbot.facade;
|
|
|
|
|
|
+import com.alibaba.fastjson.JSON;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
@@ -420,11 +421,12 @@ public class ConsoleFacade {
|
|
|
//MR
|
|
|
Long mr = triggeringRulesMap.get("MR");
|
|
|
//细菌培养
|
|
|
- Long bacterialCulture = 0L;
|
|
|
+ Long bacterialCulture = triggeringRulesMap.get("bacterialCulture");
|
|
|
//抗菌药物
|
|
|
- Long antibiosis = 0L;
|
|
|
+ Long antibiosis = triggeringRulesMap.get("antibiosis");
|
|
|
//恶性肿瘤化学治疗
|
|
|
- Long chemotherapyMalignantTumors = 0L;
|
|
|
+ Long chemotherapyMalignantTumors = triggeringRulesMap.get("chemotherapyMalignantTumors");
|
|
|
+
|
|
|
Map<String, Double> medicalRecordIndicator = medIndexResultFacade.medicalRecordIndicator(filterVO);
|
|
|
Double startCount = medicalRecordIndicator.get("startCount");
|
|
|
Double operationFeeNum = medicalRecordIndicator.get("operationFeeNum");
|
|
@@ -542,16 +544,23 @@ public class ConsoleFacade {
|
|
|
hashMapArrayList.add(stringStringHashMap);
|
|
|
}
|
|
|
}
|
|
|
+ //指标十四 恶性肿瘤放射治疗
|
|
|
+ if (indexName.equals(QualityContent.EXZL_FSZL_FHL)||indexName.equals(QualityContent.QB)) {
|
|
|
+ hashMapArrayList = tumorRadiationMethod(medicalRecordIndicator,hashMapArrayList,triggeringRulesMap);
|
|
|
+ }
|
|
|
|
|
|
//指标十五 手术记录
|
|
|
if (indexName.equals(QualityContent.SS_XGJL_WCL)||indexName.equals(QualityContent.QB)) {
|
|
|
hashMapArrayList = operationMethod(medicalRecordIndicator,hashMapArrayList,triggeringRulesMap);
|
|
|
}
|
|
|
|
|
|
+ //指标十六 植入物相关记录符合率
|
|
|
+ if (indexName.equals(QualityContent.ZRW_XGJL_WCL)||indexName.equals(QualityContent.QB)) {
|
|
|
+ hashMapArrayList = implantsMethod(medicalRecordIndicator,hashMapArrayList,triggeringRulesMap);
|
|
|
+ }
|
|
|
|
|
|
//指标十七 临床用血相关记录符合率
|
|
|
if (indexName.equals(QualityContent.LCYX_XGJL_WCL)||indexName.equals(QualityContent.QB)) {
|
|
|
- filterVO.setFlagStr("1");
|
|
|
hashMapArrayList = bloodMethod(hashMapArrayList,medicalRecordIndicator,triggeringRulesMap);
|
|
|
}
|
|
|
|
|
@@ -570,9 +579,24 @@ public class ConsoleFacade {
|
|
|
hashMapArrayList = getfileSecAmount(medicalRecordIndicator,hashMapArrayList, baseIndex);
|
|
|
}
|
|
|
|
|
|
- //指标二十七
|
|
|
+ //指标二十一 出院患者病历归档完整率
|
|
|
+ if (indexName.equals(QualityContent.CCHZ_GD_WZL)||indexName.equals(QualityContent.QB)) {
|
|
|
+ hashMapArrayList = fileCompleteMethod(medicalRecordIndicator,hashMapArrayList, baseIndex);
|
|
|
+ }
|
|
|
+
|
|
|
+ //指标二十二 不合理复制病历发生率
|
|
|
+ if (indexName.equals(QualityContent.BHL_FZ_FSL)||indexName.equals(QualityContent.QB)) {
|
|
|
+ hashMapArrayList = unreasonedCopyMethod(hashMapArrayList, baseIndex, triggeringRulesMap);
|
|
|
+ }
|
|
|
+
|
|
|
+ //指标二十三 知情同意书规范签署率
|
|
|
+ if (indexName.equals(QualityContent.ZQTYS_GF_QSL)||indexName.equals(QualityContent.QB)) {
|
|
|
+ hashMapArrayList = contentSignMethod(hashMapArrayList, baseIndex, triggeringRulesMap);
|
|
|
+ }
|
|
|
+
|
|
|
+ //指标二十四 甲级率
|
|
|
if (indexName.equals(QualityContent.JJBLL)||indexName.equals(QualityContent.QB)) {
|
|
|
- hashMapArrayList = firMethod(indexName,hashMapArrayList,baseIndex);
|
|
|
+ hashMapArrayList = firMethod(hashMapArrayList,baseIndex);
|
|
|
}
|
|
|
return hashMapArrayList;
|
|
|
}
|
|
@@ -631,18 +655,47 @@ public class ConsoleFacade {
|
|
|
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);
|
|
|
+ String operationFee = stringStringMap.get("operationFee");
|
|
|
+ String pathologyFee = stringStringMap.get("pathologyFee");
|
|
|
+ String antibiosisFee = stringStringMap.get("antibiosisFee");
|
|
|
+ if(StringUtil.isNotEmpty(operationFee)) {
|
|
|
+ double of = 0.0;
|
|
|
+ try {
|
|
|
+ of = Double.parseDouble(operationFee);
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ if (of > 0) {
|
|
|
+ //手术code
|
|
|
+ operationCode.add(behospitalCode);
|
|
|
+ }
|
|
|
}
|
|
|
- if (Double.parseDouble(stringStringMap.get("antibiosisFee")) > 0) {
|
|
|
- //抗菌code
|
|
|
- antibiosisCode.add(behospitalCode);
|
|
|
+ if(StringUtil.isNotEmpty(operationFee)&&StringUtil.isNotEmpty(pathologyFee)) {
|
|
|
+ double of = 0.0;
|
|
|
+ double pf = 0.0;
|
|
|
+ try {
|
|
|
+ of = Double.parseDouble(operationFee);
|
|
|
+ pf = Double.parseDouble(pathologyFee);
|
|
|
+ } catch (NumberFormatException e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ if (of > 0 && pf > QualityContent.pathologyFee) {
|
|
|
+ //病理code
|
|
|
+ operationPathologyCode.add(behospitalCode);
|
|
|
+ }
|
|
|
}
|
|
|
+ if(StringUtil.isNotEmpty(antibiosisFee)) {
|
|
|
+ double af = 0.0;
|
|
|
+ try {
|
|
|
+ af = Double.parseDouble(antibiosisFee);
|
|
|
+ } catch (NumberFormatException e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ if (af > 0) {
|
|
|
+ //抗菌code
|
|
|
+ antibiosisCode.add(behospitalCode);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
if(ListUtil.isNotEmpty(adviceVerify)){
|
|
@@ -749,17 +802,37 @@ public class ConsoleFacade {
|
|
|
Set<String> rescueCode = new CopyOnWriteArraySet<>();
|
|
|
Set<String> bloodCode = new CopyOnWriteArraySet<>();
|
|
|
//指标二十七
|
|
|
+ //指标14--恶性肿瘤放射治疗记录符合率
|
|
|
+ Set<String> tumorRadiationSet = tumorRadiationMethods(adviceNum, medIndexResult);
|
|
|
+
|
|
|
+ //指标15 手术记录
|
|
|
+ medIndexResult.setOperationCompleteResult(Double.parseDouble(operationFeeNum+""));
|
|
|
+
|
|
|
+ //指标16--植入物相关记录符合率
|
|
|
+ Set<String> implantsCode = implantsMethods(filterVO, medIndexResult);
|
|
|
+
|
|
|
+ //指标17 临床用血相关记录符合率
|
|
|
+ bloodMethods(doctorAdviceMedManageParams, filterVO,medIndexResult,bloodCode);
|
|
|
|
|
|
//指标18 医师查房记录 查询直接返回 -code需要加载
|
|
|
|
|
|
//指标19 抢救记录
|
|
|
rescueMethods(doctorAdviceMedManageParams,medIndexResult,rescueCode);
|
|
|
+
|
|
|
//指标20 出院患者病历2日归档
|
|
|
getfileSecAmounts(filterVO,medIndexResult);
|
|
|
- //指标15 手术记录
|
|
|
- medIndexResult.setOperationCompleteResult(Double.parseDouble(operationFeeNum+""));
|
|
|
- //指标17 临床用血相关记录符合率
|
|
|
- bloodMethods(doctorAdviceMedManageParams, filterVO,medIndexResult,bloodCode);
|
|
|
+
|
|
|
+ //指标21 出院患者病历归档完整率
|
|
|
+ fileCompleteMethods(filterVO,medIndexResult);
|
|
|
+
|
|
|
+ //指标22 不合理复制病历发生率 查询直接返回
|
|
|
+
|
|
|
+ //指标23 知情同意书规范签署率 //分子通过规则
|
|
|
+ // contentSignMethods(contentFile,medIndexResult);
|
|
|
+
|
|
|
+ //指标24 甲级率 查询直接返回
|
|
|
+
|
|
|
+
|
|
|
medIndexResult.setHospitalId(filterVO.getHospitalId());
|
|
|
medIndexResult.setStartDate(filterVO.getStartDate());
|
|
|
medIndexResult.setEndDate(filterVO.getEndDate());
|
|
@@ -838,34 +911,62 @@ public class ConsoleFacade {
|
|
|
medIndexRelevanceFacade.save(medIndexRelevance);
|
|
|
}
|
|
|
}
|
|
|
- if(operationCode.size()>0&&operationCode!=null) {
|
|
|
+ if(tumorRadiationSet.size()>0 && tumorRadiationSet != null) {
|
|
|
+ medIndexRelevance.setRelevanceType(14);
|
|
|
+ for (String Code : tumorRadiationSet) {
|
|
|
+ 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) {
|
|
|
+ if(implantsCode.size() > 0 && implantsCode != null) {
|
|
|
+ medIndexRelevance.setRelevanceType(16);
|
|
|
+ for (String Code : implantsCode) {
|
|
|
+ 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) {
|
|
|
+ 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) {
|
|
|
+ if(rescueCode.size() > 0 && rescueCode != null) {
|
|
|
medIndexRelevance.setRelevanceType(19);
|
|
|
for (String Code : rescueCode) {
|
|
|
medIndexRelevance.setBehospitalCode(Code);
|
|
|
medIndexRelevanceFacade.save(medIndexRelevance);
|
|
|
}
|
|
|
}
|
|
|
+ if(outHospitalCode.size() > 0 && outHospitalCode != null) {
|
|
|
+ medIndexRelevance.setRelevanceType(22);
|
|
|
+ for (String Code : outHospitalCode) {
|
|
|
+ medIndexRelevance.setBehospitalCode(Code);
|
|
|
+ medIndexRelevanceFacade.save(medIndexRelevance);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(outHospitalCode.size() > 0 && outHospitalCode != null) {
|
|
|
+ medIndexRelevance.setRelevanceType(23);
|
|
|
+ for (String Code : outHospitalCode) {
|
|
|
+ medIndexRelevance.setBehospitalCode(Code);
|
|
|
+ medIndexRelevanceFacade.save(medIndexRelevance);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
/**
|
|
|
* 两数据相除得到百分比
|
|
@@ -958,6 +1059,7 @@ public class ConsoleFacade {
|
|
|
Set<String> bacterialCultureCode = new CopyOnWriteArraySet<>();
|
|
|
Set<String> antibiosisBehospitalCode = new CopyOnWriteArraySet<>();
|
|
|
Set<String> chemotherapyMalignantTumorsBehospitalCode = new CopyOnWriteArraySet<>();
|
|
|
+ Set<String> tumorRadiationBehospitalCode = new CopyOnWriteArraySet<>();
|
|
|
//无首页code
|
|
|
List<String> behospitalCodeList = adviceVerify(filterVO);
|
|
|
//首页为肿瘤code
|
|
@@ -1078,6 +1180,24 @@ public class ConsoleFacade {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ if (indexName.equals(QualityContent.EXZL_FSZL_FHL) || indexName.equals(QualityContent.QB)) {
|
|
|
+ if (ListUtil.isNotEmpty(malignancyCodeList)) {
|
|
|
+ if (malignancyCodeList.contains(behospitalCode)) {
|
|
|
+ if (!tumorRadiationBehospitalCode.contains(behospitalCode)) {
|
|
|
+ if (doctorAdviceType.equals(QualityContent.STAT_ORDER) || doctorAdviceType.equals(QualityContent.STANDING_ORDER)) {
|
|
|
+ List<String> tumorRadiationDrugList = QualityContent.radiotherapyDrugList;
|
|
|
+ for (String tumorRadiationDrug : tumorRadiationDrugList) {
|
|
|
+ if (daItemName.contains(tumorRadiationDrug)) {
|
|
|
+ //医嘱含有放射治疗药物
|
|
|
+ tumorRadiationBehospitalCode.add(behospitalCode);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -1125,11 +1245,16 @@ public class ConsoleFacade {
|
|
|
}else {
|
|
|
mapCode.put("antibiosis",null);
|
|
|
}
|
|
|
- if(antibiosisBehospitalCode!=null && antibiosisBehospitalCode.size()>0){
|
|
|
- mapCode.put("chemotherapyMalignantTumors",antibiosisBehospitalCode);
|
|
|
+ if(chemotherapyMalignantTumorsBehospitalCode!=null && chemotherapyMalignantTumorsBehospitalCode.size()>0){
|
|
|
+ mapCode.put("chemotherapyMalignantTumors",chemotherapyMalignantTumorsBehospitalCode);
|
|
|
}else {
|
|
|
mapCode.put("chemotherapyMalignantTumors",null);
|
|
|
}
|
|
|
+ if(tumorRadiationBehospitalCode!=null && tumorRadiationBehospitalCode.size()>0){
|
|
|
+ mapCode.put("tumorRadiationSecNum",tumorRadiationBehospitalCode);
|
|
|
+ }else {
|
|
|
+ mapCode.put("tumorRadiationSecNum",null);
|
|
|
+ }
|
|
|
return mapCode;
|
|
|
}
|
|
|
}
|
|
@@ -2877,13 +3002,25 @@ public class ConsoleFacade {
|
|
|
*/
|
|
|
public IPage<ReBeHosDTO> reHos31DaysPage(ReBeHosPageVO reBeHosPageVO) {
|
|
|
filterFacade.reBeHosPageVOSet(reBeHosPageVO);
|
|
|
+ long size = reBeHosPageVO.getSize();
|
|
|
+ long current = reBeHosPageVO.getCurrent();
|
|
|
+ reBeHosPageVO.setCurrent(1L);
|
|
|
+ reBeHosPageVO.setSize(Long.MAX_VALUE);
|
|
|
IPage<ReBeHosMergeDTO> page = behospitalInfoFacade.reHos31DaysPage(reBeHosPageVO);
|
|
|
List<ReBeHosMergeDTO> records = page.getRecords();
|
|
|
IPage<ReBeHosDTO> retPage = new Page<>();
|
|
|
- BeanUtil.copyProperties(page, retPage);
|
|
|
- List<ReBeHosDTO> retRecords = Lists.newLinkedList();
|
|
|
if (ListUtil.isNotEmpty(records)) {
|
|
|
- for (ReBeHosMergeDTO record : records) {
|
|
|
+ BeanUtil.copyProperties(page, retPage);
|
|
|
+ List<ReBeHosDTO> retRecords = Lists.newLinkedList();
|
|
|
+ Iterator<ReBeHosMergeDTO> iterator = records.iterator();
|
|
|
+ while(iterator.hasNext()){
|
|
|
+ ReBeHosMergeDTO record = iterator.next();
|
|
|
+ ConsoleByDeptFacade.strTrans(record);
|
|
|
+ Boolean flag = isContainDiagnose(record);
|
|
|
+ if(!flag){
|
|
|
+ iterator.remove();
|
|
|
+ continue;
|
|
|
+ }
|
|
|
ReBeHosDTO retRecord = new ReBeHosDTO();
|
|
|
BeanUtil.copyProperties(record, retRecord);
|
|
|
List<ReBeHosDetailDTO> details = Lists.newLinkedList();
|
|
@@ -2892,6 +3029,9 @@ public class ConsoleFacade {
|
|
|
details.add(detailRecord);
|
|
|
ReBeHosDetailDTO lastDetailRecord = new ReBeHosDetailDTO();
|
|
|
lastDetailRecord.setName(record.getName());
|
|
|
+ lastDetailRecord.setAge(record.getLastAge());
|
|
|
+ lastDetailRecord.setDiagnose(record.getLastDiagnose());
|
|
|
+ lastDetailRecord.setDiagnoseName(record.getLastDiagnoseName());
|
|
|
lastDetailRecord.setBehDeptId(record.getLastBehDeptId());
|
|
|
lastDetailRecord.setBehDeptName(record.getLastBehDeptName());
|
|
|
lastDetailRecord.setBehospitalCode(record.getLastBehospitalCode());
|
|
@@ -2905,11 +3045,84 @@ public class ConsoleFacade {
|
|
|
retRecord.setDetails(details);
|
|
|
retRecords.add(retRecord);
|
|
|
}
|
|
|
+ //首页返回全部数据
|
|
|
+ if(reBeHosPageVO.getFlag()==31){
|
|
|
+ retPage.setRecords(retRecords);
|
|
|
+ return retPage;
|
|
|
+ }
|
|
|
+ //导出操作
|
|
|
+ if(reBeHosPageVO.getFlag()==1){
|
|
|
+ size = retRecords.size();
|
|
|
+ }
|
|
|
+ retPage.setSize(size);
|
|
|
+ retPage.setTotal(retRecords.size());
|
|
|
+ retPage.setCurrent(current);
|
|
|
+ //数据返回索引处理
|
|
|
+ if(0 == current){
|
|
|
+ current = 1;
|
|
|
+ }
|
|
|
+ int startIndex = ((int)current -1)*10;
|
|
|
+ int endIndex = startIndex + (int) size;
|
|
|
+
|
|
|
+ if(retRecords.size()>1){
|
|
|
+ if( retRecords.size()-startIndex<(int)size){
|
|
|
+ retRecords = retRecords.subList(startIndex,retRecords.size());
|
|
|
+ }else{
|
|
|
+ retRecords = retRecords.subList(startIndex,endIndex );
|
|
|
+ }
|
|
|
}
|
|
|
retPage.setRecords(retRecords);
|
|
|
+ }
|
|
|
return retPage;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ static Boolean isContainDiagnose(ReBeHosMergeDTO record){
|
|
|
+ // String lastDiagnoseName = replace(record.getLastDiagnoseName());本身使用,分隔
|
|
|
+ String diagnose =replace(record.getDiagnose());//手动分隔
|
|
|
+ String lastDiagnose = replace(record.getLastDiagnose());
|
|
|
+ record.setDiagnose(diagnose);
|
|
|
+ record.setLastDiagnose(lastDiagnose);
|
|
|
+ Set lastDiagnoseNames = strTranListMethod(record.getLastDiagnoseName());
|
|
|
+ Set diagnoses = strTranListMethod(record.getDiagnose());
|
|
|
+ long count = diagnoses.stream().filter(obj ->null != lastDiagnoseNames && null != obj && lastDiagnoseNames.contains(obj)).count();
|
|
|
+ if(count<=0){
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ return true;
|
|
|
+ };
|
|
|
+
|
|
|
+ static String replace(String str){
|
|
|
+ if(StringUtils.isEmpty(str)){
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ str = str.trim().replace(";", ",").replace(";", ",")
|
|
|
+ .replace("、", ",").replace(",", ",")
|
|
|
+ .replace("|", ",").replace(" ", ",")
|
|
|
+ .replace(":", ",") .replace(":", ",");
|
|
|
+ if(str.startsWith(",")){
|
|
|
+ str = str.substring(1);
|
|
|
+ }
|
|
|
+ if(str.endsWith(",")){
|
|
|
+ str = str.substring(0,str.length()-1);
|
|
|
+ }
|
|
|
+
|
|
|
+ return str;
|
|
|
+ }
|
|
|
+ static Set strTranListMethod(String str){
|
|
|
+ Set<String> names = new HashSet<>();
|
|
|
+ if(StringUtils.isNotEmpty(str)){
|
|
|
+ if(str.contains(",") && str.length()>1){
|
|
|
+ for (String diagnoseName : str.split(",")) {
|
|
|
+ names.add(diagnoseName);
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ names.add(str);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return names;
|
|
|
+ };
|
|
|
+
|
|
|
/**
|
|
|
* 入院人数统计(首页)
|
|
|
*
|
|
@@ -2973,11 +3186,63 @@ public class ConsoleFacade {
|
|
|
return behospitalInfoFacade.hmImproveMRPage(qcResultShortPageVO);
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ //指标十四 恶性肿瘤放射治疗
|
|
|
+ private List<Map<String, String>> tumorRadiationMethod(Map<String, Double> medManageParams,List<Map<String, String>> retList, Map<String, Long> triggeringRulesMap){
|
|
|
+ LinkedHashMap<String, String> firMap = new LinkedHashMap<>();
|
|
|
+ //接受肿瘤放射治疗的质控病历总数
|
|
|
+ Double count = medManageParams.get("tumorRadiationResult");
|
|
|
+ String num = null;
|
|
|
+ if( null == count){
|
|
|
+ count = 0d;
|
|
|
+ }
|
|
|
+ if(StringUtils.isNotEmpty(String.valueOf(count)) && count != 0d){
|
|
|
+ double tumorRadiationDo = currencyCal(count, triggeringRulesMap.get("tumorRadiationNum"));//triggeringRules(filterVO)
|
|
|
+ num = String.valueOf(tumorRadiationDo);
|
|
|
+ if(tumorRadiationDo<0d){
|
|
|
+ num = null;
|
|
|
+ }
|
|
|
+ };
|
|
|
+
|
|
|
+ firMap.put("name","恶性肿瘤放射治疗记录符合率");
|
|
|
+ firMap.put("notCopiedStr",StringUtils.isEmpty(num) ? "0.00%":(num+"%"));
|
|
|
+ firMap.put("num",String.valueOf(count));
|
|
|
+ retList.add(firMap);
|
|
|
+ return retList;
|
|
|
+ }
|
|
|
+
|
|
|
+ //指标十六 植入物相关记录符合率
|
|
|
+ private List<Map<String, String>> implantsMethod(Map<String, Double> medManageParams,List<Map<String, String>> retList, Map<String, Long> triggeringRulesMap){
|
|
|
+ LinkedHashMap<String, String> firMap = new LinkedHashMap<>();
|
|
|
+ //使用植入物的质控病历总数
|
|
|
+ Double count = medManageParams.get("implantsResult");
|
|
|
+ if( null == count){
|
|
|
+ count = 0d;
|
|
|
+ }
|
|
|
+ String num = null;
|
|
|
+ if(StringUtils.isNotEmpty(String.valueOf(count)) && count != 0d){
|
|
|
+ double implantsDo = currencyCal(count, triggeringRulesMap.get("implantsNum"));//triggeringRules(filterVO)
|
|
|
+ num = String.valueOf(implantsDo);
|
|
|
+ if(implantsDo<0d){
|
|
|
+ num = null;
|
|
|
+ }
|
|
|
+ };
|
|
|
+
|
|
|
+ firMap.put("name","植入物相关记录符合率");
|
|
|
+ firMap.put("notCopiedStr",StringUtils.isEmpty(num) ? "0.00%":(num+"%"));
|
|
|
+ firMap.put("num",String.valueOf(count));
|
|
|
+ retList.add(firMap);
|
|
|
+ return retList;
|
|
|
+ }
|
|
|
+
|
|
|
//指标十八 抢救记录
|
|
|
private List<Map<String, String>> rescueMethod( Map<String, Double> medManageParams, List<Map<String, String>> retList,Map<String, Long> triggeringRulesMap){
|
|
|
LinkedHashMap<String, String> firMap = new LinkedHashMap<>();
|
|
|
//接受抢救的质控病历总数
|
|
|
- double count = medManageParams.get("rescue_result");
|
|
|
+ Double count = medManageParams.get("rescueResult");
|
|
|
+ if( null == count){
|
|
|
+ count = 0d;
|
|
|
+ }
|
|
|
String num = null;
|
|
|
if(StringUtils.isNotEmpty(String.valueOf(count)) && count != 0d){
|
|
|
double rescueDo = currencyCal(count, triggeringRulesMap.get("rescueNum"));
|
|
@@ -2985,11 +3250,11 @@ public class ConsoleFacade {
|
|
|
if(rescueDo<0d){
|
|
|
num = null;
|
|
|
}
|
|
|
- firMap.put("num",String.valueOf(count));
|
|
|
};
|
|
|
|
|
|
firMap.put("name","患者抢救记录及时完成率");
|
|
|
firMap.put("notCopiedStr",StringUtils.isEmpty(num) ? "0.00%":(num+"%"));
|
|
|
+ firMap.put("num",String.valueOf(count));
|
|
|
retList.add(firMap);
|
|
|
return retList;
|
|
|
};
|
|
@@ -2998,16 +3263,70 @@ public class ConsoleFacade {
|
|
|
private List<Map<String, String>> WardRoundMethod( List<Map<String, String>> retList, Map<String, Object> baseIndex, Map<String, Long> triggeringRulesMap){
|
|
|
LinkedHashMap<String, String> firMap = new LinkedHashMap<>();
|
|
|
String num = null;
|
|
|
+ Object forWorkNum = baseIndex.get("forWorkNum");
|
|
|
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;
|
|
|
}
|
|
|
- firMap.put("num",baseIndex.get("forWorkNum").toString());
|
|
|
};
|
|
|
firMap.put("name","医师查房记录完成率");
|
|
|
firMap.put("notCopiedStr",StringUtils.isEmpty(num) ? "0.00%":(num+"%"));
|
|
|
+ if(null == forWorkNum){
|
|
|
+ firMap.put("num","0");
|
|
|
+ }else{
|
|
|
+ firMap.put("num",baseIndex.get("forWorkNum").toString());
|
|
|
+ }
|
|
|
+ retList.add(firMap);
|
|
|
+ return retList;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ //指标二十二 不合理复制病历发生率
|
|
|
+ private List<Map<String, String>> unreasonedCopyMethod( List<Map<String, String>> retList, Map<String, Object> baseIndex, Map<String, Long> triggeringRulesMap){
|
|
|
+ LinkedHashMap<String, String> firMap = new LinkedHashMap<>();
|
|
|
+ String num = null;
|
|
|
+ Object forWorkNum = baseIndex.get("forWorkNum");
|
|
|
+ if( triggeringRulesMap.containsKey("unreasonedCopyNum") && baseIndex.containsKey("forWorkNum") && !baseIndex.get("forWorkNum").toString().equals("0")){
|
|
|
+ double wardRoundDo = currencyCal(baseIndex.get("forWorkNum"), triggeringRulesMap.get("unreasonedCopyNum"));
|
|
|
+ num = String.valueOf(wardRoundDo);
|
|
|
+ if(wardRoundDo<0d){
|
|
|
+ num = null;
|
|
|
+ }
|
|
|
+ };
|
|
|
+ firMap.put("name","不合理复制病历发生率");
|
|
|
+ firMap.put("notCopiedStr",StringUtils.isEmpty(num) ? "0.00%":(num+"%"));
|
|
|
+ if(null == forWorkNum){
|
|
|
+ firMap.put("num","0");
|
|
|
+ }else{
|
|
|
+ firMap.put("num",baseIndex.get("forWorkNum").toString());
|
|
|
+ }
|
|
|
+ retList.add(firMap);
|
|
|
+ return retList;
|
|
|
+ };
|
|
|
+
|
|
|
+
|
|
|
+ //指标二十三 知情同意书规范签署率
|
|
|
+ private List<Map<String, String>> contentSignMethod(List<Map<String, String>> retList, Map<String, Object> baseIndex, Map<String, Long> triggeringRulesMap){
|
|
|
+ LinkedHashMap<String, String> firMap = new LinkedHashMap<>();
|
|
|
+ Object forWorkNum = baseIndex.get("forWorkNum");
|
|
|
+ String num = null;
|
|
|
+ if( triggeringRulesMap.containsKey("InformedNum") && baseIndex.containsKey("forWorkNum") && !baseIndex.get("forWorkNum").toString().equals("0")){
|
|
|
+ double InformedDo = currencyCal(baseIndex.get("forWorkNum"), triggeringRulesMap.get("InformedNum"));
|
|
|
+ num = String.valueOf(InformedDo);
|
|
|
+ if(InformedDo<0d){
|
|
|
+ num = null;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ firMap.put("name","知情同意书规范签署率");
|
|
|
+ firMap.put("notCopiedStr",StringUtils.isEmpty(num) ? "0.00%":(num+"%"));
|
|
|
+ if(null == forWorkNum){
|
|
|
+ firMap.put("num","0");
|
|
|
+ }else{
|
|
|
+ firMap.put("num",baseIndex.get("forWorkNum").toString());
|
|
|
+ }
|
|
|
+
|
|
|
retList.add(firMap);
|
|
|
return retList;
|
|
|
}
|
|
@@ -3016,6 +3335,9 @@ public class ConsoleFacade {
|
|
|
private List<Map<String, String>> operationMethod(Map<String, Double> medManageParams, List<Map<String, String>>retList, Map<String, Long> triggeringRulesMap){
|
|
|
LinkedHashMap<String, String> firMap = new LinkedHashMap<>();
|
|
|
String operationFeeNum = medManageParams.get("operationFeeNum")+"";
|
|
|
+ if(StringUtils.isEmpty(operationFeeNum)){
|
|
|
+ operationFeeNum = "0";
|
|
|
+ }
|
|
|
String num = null;
|
|
|
if( triggeringRulesMap.containsKey("operationRecordNum") && StringUtils.isNotEmpty(operationFeeNum) && ! operationFeeNum.equals("0")){
|
|
|
double operationRecordDo = currencyCal(operationFeeNum, triggeringRulesMap.get("operationRecordNum"));
|
|
@@ -3023,13 +3345,13 @@ public class ConsoleFacade {
|
|
|
if(operationRecordDo<0d){
|
|
|
num = null;
|
|
|
}
|
|
|
- firMap.put("num",operationFeeNum);
|
|
|
};
|
|
|
firMap.put("name","手术相关记录完成率");
|
|
|
if("0.0".equals(num)){
|
|
|
num = "0.00";
|
|
|
}
|
|
|
firMap.put("notCopiedStr",StringUtils.isEmpty(num) ? "0.00%":(num+"%"));
|
|
|
+ firMap.put("num",operationFeeNum);
|
|
|
|
|
|
retList.add(firMap);
|
|
|
return retList;
|
|
@@ -3038,7 +3360,10 @@ public class ConsoleFacade {
|
|
|
//指标十六 临床用血相关记录符合率
|
|
|
private List<Map<String, String>> bloodMethod( List<Map<String, String>>retList,Map<String, Double> bloodRes,Map<String, Long> triggeringRulesMap){
|
|
|
LinkedHashMap<String, String> firMap = new LinkedHashMap<>();
|
|
|
- double count = bloodRes.get("blood_result");
|
|
|
+ Double count = bloodRes.get("bloodResult");
|
|
|
+ if( null == count){
|
|
|
+ count = 0d;
|
|
|
+ }
|
|
|
String num = null;
|
|
|
if(StringUtils.isNotEmpty(String.valueOf(count)) && count != 0d){
|
|
|
//指标十七
|
|
@@ -3047,11 +3372,11 @@ public class ConsoleFacade {
|
|
|
if(bloodDo<0d){
|
|
|
num = null;
|
|
|
}
|
|
|
- firMap.put("num",String.valueOf(count));
|
|
|
}
|
|
|
|
|
|
firMap.put("name","临床用血相关记录符合率");
|
|
|
firMap.put("notCopiedStr",StringUtils.isEmpty(num) ? "0.00%":(num+"%"));
|
|
|
+ firMap.put("num",String.valueOf(count));
|
|
|
retList.add(firMap);
|
|
|
return retList;
|
|
|
}
|
|
@@ -3071,21 +3396,55 @@ public class ConsoleFacade {
|
|
|
private List<Map<String, String>> getfileSecAmount(Map<String, Double> medManageParams, List<Map<String, String>>retList, Map<String, Object> baseIndex){
|
|
|
LinkedHashMap<String, String> firMap = new LinkedHashMap<>();
|
|
|
DecimalFormat df = new DecimalFormat("#0.00");
|
|
|
- double count = medManageParams.get("sec_file_result");
|
|
|
+ Double count = medManageParams.get("secFileResult");
|
|
|
+ Object forWorkNum = baseIndex.get("forWorkNum");
|
|
|
+ if( null == count){
|
|
|
+ count = 0d;
|
|
|
+ }
|
|
|
String num = null;
|
|
|
- if(StringUtils.isNotEmpty( baseIndex.get("sevenWorkNum").toString()) && ! baseIndex.get("sevenWorkNum").toString().equals("0") ){
|
|
|
- double retNum =count* 100/Double.parseDouble(baseIndex.get("sevenWorkNum").toString());
|
|
|
+ if(StringUtils.isNotEmpty( baseIndex.get("forWorkNum").toString()) && ! baseIndex.get("forWorkNum").toString().equals("0") ){
|
|
|
+ double retNum =count* 100/Double.parseDouble(baseIndex.get("forWorkNum").toString());
|
|
|
double firGradeStr = Double.parseDouble(df.format(retNum));
|
|
|
num = String.valueOf(firGradeStr);
|
|
|
- firMap.put("num",baseIndex.get("sevenWorkNum").toString());
|
|
|
+
|
|
|
}
|
|
|
|
|
|
firMap.put("name","出院患者病历2日归档率");
|
|
|
firMap.put("notCopiedStr",StringUtils.isEmpty(num) ? "0.00%":(num+"%"));
|
|
|
+ if(null == forWorkNum){
|
|
|
+ firMap.put("num","0");
|
|
|
+ }else{
|
|
|
+ firMap.put("num",baseIndex.get("forWorkNum").toString());
|
|
|
+ }
|
|
|
retList.add(firMap);
|
|
|
return retList;
|
|
|
};
|
|
|
|
|
|
+ //指标21 --出院患者病历归档完整率
|
|
|
+ private List<Map<String, String>> fileCompleteMethod(Map<String, Double> medManageParams, List<Map<String, String>>retList, Map<String, Object> baseIndex){
|
|
|
+ LinkedHashMap<String, String> firMap = new LinkedHashMap<>();
|
|
|
+ Double count = medManageParams.get("fileCompleteResult");
|
|
|
+ Object forWorkNum = baseIndex.get("forWorkNum");
|
|
|
+ if( null == count){
|
|
|
+ count = 0d;
|
|
|
+ }
|
|
|
+ String num = null;
|
|
|
+ if(StringUtils.isNotEmpty( baseIndex.get("forWorkNum").toString()) && ! baseIndex.get("forWorkNum").toString().equals("0") ){
|
|
|
+ double retNum = currencyCal( baseIndex.get("forWorkNum").toString(),count);
|
|
|
+ num = String.valueOf(retNum);
|
|
|
+ }
|
|
|
+
|
|
|
+ firMap.put("name","出院患者病历归档完整率");
|
|
|
+ firMap.put("notCopiedStr",StringUtils.isEmpty(num) ? "0.00%":(num+"%"));
|
|
|
+ if(null == forWorkNum){
|
|
|
+ firMap.put("num","0");
|
|
|
+ }else{
|
|
|
+ firMap.put("num",baseIndex.get("forWorkNum").toString());
|
|
|
+ }
|
|
|
+ retList.add(firMap);
|
|
|
+ return retList;
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
private List<Map<String, String>> ManageIndexMethod(String indexName,List<Map<String, String>> retList, Map<String, Object> baseIndex, MedIndexFilterVO timeVo){
|
|
|
QueryWrapper<MedManagementInfo> query = new QueryWrapper<>();
|
|
@@ -3166,9 +3525,8 @@ public class ConsoleFacade {
|
|
|
};
|
|
|
|
|
|
|
|
|
- private List<Map<String, String>> firMethod(String indexName,List<Map<String, String>> retList, Map<String, Object> baseIndex){
|
|
|
+ private List<Map<String, String>> firMethod(List<Map<String, String>> retList, Map<String, Object> baseIndex){
|
|
|
DecimalFormat df = new DecimalFormat("0.00");
|
|
|
- if(indexName.equals(QualityContent.JJBLL)||indexName.equals(QualityContent.QB)) {
|
|
|
//指标二十七 -甲级病历率
|
|
|
LinkedHashMap<String, String> fouMap = new LinkedHashMap<>();
|
|
|
Double firRecord = 0d;
|
|
@@ -3180,12 +3538,11 @@ public class ConsoleFacade {
|
|
|
double retNum = Double.parseDouble(baseIndex.get("sixWorkNum").toString()) * 100 / firRecord;
|
|
|
double firGradeStr = Double.parseDouble(df.format(retNum));
|
|
|
num4 = String.valueOf(firGradeStr);
|
|
|
- fouMap.put("num",String.valueOf(firRecord));
|
|
|
}
|
|
|
fouMap.put("name","甲级病历率");
|
|
|
fouMap.put("notCopiedStr",StringUtils.isEmpty(num4) ? "0.00%":(num4+"%"));
|
|
|
+ fouMap.put("num",String.valueOf(firRecord));
|
|
|
retList.add(fouMap);
|
|
|
- }
|
|
|
return retList;
|
|
|
};
|
|
|
|
|
@@ -3193,6 +3550,17 @@ public class ConsoleFacade {
|
|
|
/**
|
|
|
* ==============================后台维护===============================
|
|
|
*/
|
|
|
+ private Set<String> tumorRadiationMethods( Map<String, Set<String>> adviceNum,MedIndexResult medIndexResult){
|
|
|
+ Set<String> tumorRadiationSecNum = new CopyOnWriteArraySet<>();
|
|
|
+ if(adviceNum.containsKey("tumorRadiationSecNum")&& adviceNum.get("tumorRadiationSecNum") != null && adviceNum.get("tumorRadiationSecNum").size()>0){
|
|
|
+ tumorRadiationSecNum = adviceNum.get("tumorRadiationSecNum");
|
|
|
+ double count = tumorRadiationSecNum.size();
|
|
|
+ if(StringUtils.isNotEmpty(String.valueOf(count)) && count != 0d){
|
|
|
+ medIndexResult.setTumorRadiationResult(count);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return tumorRadiationSecNum;
|
|
|
+ }
|
|
|
//指标19 抢救记录
|
|
|
private void rescueMethods(List<MedManageParamsDTO> medManageParams,MedIndexResult medIndexResult, Set<String> rescueCode){
|
|
|
List<MedManageParamsDTO> manageList= new ArrayList<>();
|
|
@@ -3231,7 +3599,7 @@ public class ConsoleFacade {
|
|
|
System.out.println("lis项目存在用血住院病历号 = " + (xx2-xx1));
|
|
|
//advice体现lis项目存在用血的住院病历号
|
|
|
doctorAdviceList.parallelStream()
|
|
|
- .filter(obj -> beCode.contains(obj.getBehospitalCode()) && obj.getDoctorAdviceType()
|
|
|
+ .filter(obj -> beCode.contains(obj.getBehospitalCode()) && StringUtils.isNotEmpty(obj.getDoctorAdviceType()) && 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))))
|
|
@@ -3339,6 +3707,45 @@ public class ConsoleFacade {
|
|
|
filterVO.setLastEndDate(endTime);
|
|
|
};
|
|
|
|
|
|
+ //指标 16--植入物相关记录符合率
|
|
|
+ private Set<String> implantsMethods(FilterVO filterVO,MedIndexResult medIndexResult){
|
|
|
+ filterVO.setFlagStr("4");
|
|
|
+ List<MedManageParamsDTO> fileLists = behospitalInfoFacade.getMedManageParams(filterVO);
|
|
|
+ Set<String> collect = fileLists.parallelStream().filter(obj -> {
|
|
|
+ String content = obj.getContent();
|
|
|
+ Map contenMap = JSON.parseObject(content, Map.class);
|
|
|
+ return contenMap.containsKey("使用植入性材料") && StringUtils.isNotEmpty(contenMap.get("使用植入性材料").toString())
|
|
|
+ && "true".equals(contenMap.get("使用植入性材料").toString());
|
|
|
+ }).map(MedManageParamsDTO::getBehospitalCode).collect(Collectors.toSet());
|
|
|
+ double count = collect.size();
|
|
|
+ if(StringUtils.isNotEmpty(String.valueOf(count)) && count != 0d){
|
|
|
+ medIndexResult.setImplantsResult(count);
|
|
|
+ }
|
|
|
+ return collect;
|
|
|
+ }
|
|
|
+
|
|
|
+ //指标21 出院患者病历归档完整率
|
|
|
+ private void fileCompleteMethods(FilterVO filterVO,MedIndexResult medIndexResult){
|
|
|
+ filterVO.setFlagStr("3");
|
|
|
+ List<MedManageParamsDTO> fileLists = behospitalInfoFacade.getMedManageParams(filterVO);
|
|
|
+ double count = fileLists.stream().map(MedManageParamsDTO::getBehospitalCode).distinct().count();
|
|
|
+ if(StringUtils.isNotEmpty(String.valueOf(count)) && count != 0d){
|
|
|
+ medIndexResult.setFileCompleteResult(count);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ //指标23 知情同意书规范签署率
|
|
|
+// private void contentSignMethods(List<MedManageParamsDTO>fileLists,MedIndexResult medIndexResult){
|
|
|
+// Set<String> collect = fileLists.parallelStream().filter(obj -> {
|
|
|
+// String content = obj.getContent();
|
|
|
+// Map contenMap = JSON.parseObject(content, Map.class);
|
|
|
+// return contenMap.containsKey("签署") && StringUtils.isNotEmpty(contenMap.get("签署").toString());
|
|
|
+// }).map(MedManageParamsDTO::getBehospitalCode).collect(Collectors.toSet());
|
|
|
+// double count = collect.size();
|
|
|
+// if(StringUtils.isNotEmpty(String.valueOf(count)) && count != 0d){
|
|
|
+// medIndexResult.setRecordSignResult(count);
|
|
|
+// }
|
|
|
+// }
|
|
|
|
|
|
|
|
|
/**
|