|
@@ -37,10 +37,7 @@ import java.text.SimpleDateFormat;
|
|
|
import java.time.*;
|
|
|
import java.time.format.DateTimeFormatter;
|
|
|
import java.util.*;
|
|
|
-import java.util.concurrent.CopyOnWriteArrayList;
|
|
|
-import java.util.concurrent.CopyOnWriteArraySet;
|
|
|
-import java.util.concurrent.ExecutionException;
|
|
|
-import java.util.concurrent.ForkJoinPool;
|
|
|
+import java.util.concurrent.*;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
import static io.netty.util.internal.SystemPropertyUtil.contains;
|
|
@@ -423,7 +420,7 @@ public class ConsoleFacade {
|
|
|
if(QualityContent.NO_MEDICAL_ADVICE.contains(indexName)){
|
|
|
//入院记录24小时完成率
|
|
|
//入院记录完成人数为
|
|
|
- if(indexName.equals(QualityContent.RYJL_24H_WCL)||indexName!=null) {
|
|
|
+ if(indexName.equals(QualityContent.RYJL_24H_WCL)||indexName.equals(QualityContent.QB)) {
|
|
|
if (InHospitalRecords != null && startCount != null) {
|
|
|
Map<String, String> stringStringHashMap = new LinkedHashMap<>();
|
|
|
stringStringHashMap.put("name", QualityContent.RYJL_24H_WCL);
|
|
@@ -434,7 +431,7 @@ public class ConsoleFacade {
|
|
|
}
|
|
|
//出院记录24小时完成率
|
|
|
//出院记录完成人数为
|
|
|
- if(indexName.equals(QualityContent.CYJL_24H_WCL)||indexName!=null) {
|
|
|
+ if(indexName.equals(QualityContent.CYJL_24H_WCL)||indexName.equals(QualityContent.QB)) {
|
|
|
if (OutHospitalRecords != null && startCount != null) {
|
|
|
Map<String, String> stringStringHashMap = new LinkedHashMap<>();
|
|
|
stringStringHashMap.put("name", QualityContent.CYJL_24H_WCL);
|
|
@@ -445,7 +442,7 @@ public class ConsoleFacade {
|
|
|
}
|
|
|
//病案首页24小时完成率
|
|
|
//病案首页完成人数为
|
|
|
- if(indexName.equals(QualityContent.BASY_24H_WCL)||indexName!=null) {
|
|
|
+ if(indexName.equals(QualityContent.BASY_24H_WCL)||indexName.equals(QualityContent.QB)) {
|
|
|
if (recordHomePage != null && startCount != null) {
|
|
|
Map<String, String> stringStringHashMap = new LinkedHashMap<>();
|
|
|
stringStringHashMap.put("name", QualityContent.BASY_24H_WCL);
|
|
@@ -481,7 +478,7 @@ public class ConsoleFacade {
|
|
|
Long chemotherapyMalignantTumorsNum = adviceNum.get("chemotherapyMalignantTumors");
|
|
|
//手术记录完成率
|
|
|
//手术完成人数为
|
|
|
- if (indexName.equals(QualityContent.SSJL_24H_WCL)||indexName!=null) {
|
|
|
+ if (indexName.equals(QualityContent.SSJL_24H_WCL)||indexName.equals(QualityContent.QB)) {
|
|
|
if (operationFeeNum != null && operationCount != null) {
|
|
|
LinkedHashMap<String, String> stringStringHashMap = new LinkedHashMap<>();
|
|
|
stringStringHashMap.put("name", QualityContent.SSJL_24H_WCL);
|
|
@@ -491,7 +488,7 @@ public class ConsoleFacade {
|
|
|
}
|
|
|
}
|
|
|
//CT完成率
|
|
|
- if (indexName.equals(QualityContent.CT_JCJL_FHL)||indexName!=null) {
|
|
|
+ if (indexName.equals(QualityContent.CT_JCJL_FHL)||indexName.equals(QualityContent.QB)) {
|
|
|
if (CTNum != null && ct != null) {
|
|
|
Map<String, String> stringStringHashMap = new LinkedHashMap<>();
|
|
|
stringStringHashMap.put("name", QualityContent.CT_JCJL_FHL);
|
|
@@ -501,7 +498,7 @@ public class ConsoleFacade {
|
|
|
}
|
|
|
}
|
|
|
//MRI完成率
|
|
|
- if (indexName.equals(QualityContent.MR_JCJL_FHL)||indexName!=null) {
|
|
|
+ if (indexName.equals(QualityContent.MR_JCJL_FHL)||indexName.equals(QualityContent.QB)) {
|
|
|
if (MRNum != null && mr != null) {
|
|
|
Map<String, String> stringStringHashMap = new LinkedHashMap<>();
|
|
|
stringStringHashMap.put("name", QualityContent.MR_JCJL_FHL);
|
|
@@ -510,7 +507,7 @@ public class ConsoleFacade {
|
|
|
hashMapArrayList.add(stringStringHashMap);
|
|
|
}
|
|
|
}
|
|
|
- if (indexName.equals(QualityContent.BL_JCJL_FHL)||indexName!=null) {
|
|
|
+ if (indexName.equals(QualityContent.BL_JCJL_FHL)||indexName.equals(QualityContent.QB)) {
|
|
|
if (operationPathologyFeeNum != null && operationPathologyFee != null) {
|
|
|
//病理完成率为
|
|
|
Map<String, String> stringStringHashMap = new LinkedHashMap<>();
|
|
@@ -520,7 +517,7 @@ public class ConsoleFacade {
|
|
|
hashMapArrayList.add(stringStringHashMap);
|
|
|
}
|
|
|
}
|
|
|
- if (indexName.equals(QualityContent.KJYW_SY_FHL)||indexName!=null) {
|
|
|
+ if (indexName.equals(QualityContent.KJYW_SY_FHL)||indexName.equals(QualityContent.QB)) {
|
|
|
if (antibiosisFeeNum != null && antibiosis != null) {
|
|
|
//抗菌
|
|
|
Map<String, String> stringStringHashMap = new LinkedHashMap<>();
|
|
@@ -530,7 +527,7 @@ public class ConsoleFacade {
|
|
|
hashMapArrayList.add(stringStringHashMap);
|
|
|
}
|
|
|
}
|
|
|
- if (indexName.equals(QualityContent.EXZL_HXZL_FHL)||indexName!=null) {
|
|
|
+ if (indexName.equals(QualityContent.EXZL_HXZL_FHL)||indexName.equals(QualityContent.QB)) {
|
|
|
if (chemotherapyMalignantTumorsNum != null && chemotherapyMalignantTumors != null) {
|
|
|
//恶性肿瘤化学治疗
|
|
|
Map<String, String> stringStringHashMap = new LinkedHashMap<>();
|
|
@@ -697,7 +694,7 @@ public class ConsoleFacade {
|
|
|
//无首页code
|
|
|
List<String> behospitalCodeList = adviceVerify(filterVO);
|
|
|
//首页为肿瘤code
|
|
|
- List<String> malignancyCodeList = behospitalInfoFacade.malignancy(filterVO);
|
|
|
+ List<String> malignancyCodeList = getMalignancyCode(filterVO);
|
|
|
ForkJoinPool myPool = new ForkJoinPool(4);
|
|
|
try {
|
|
|
myPool.submit(() ->
|
|
@@ -705,56 +702,58 @@ public class ConsoleFacade {
|
|
|
String daItemName = adviceMedManageParam.getDaItemName();
|
|
|
String behospitalCode = adviceMedManageParam.getBehospitalCode();
|
|
|
String doctorAdviceType = adviceMedManageParam.getDoctorAdviceType();
|
|
|
- //得到与手术相关
|
|
|
- if(StringUtil.isNotEmpty(daItemName)) {
|
|
|
- if(QualityContent.NORecord_NEED_MEDICAL_ADVICE.contains(indexName)) {
|
|
|
- //当code存在于无首页code集合中
|
|
|
- if (behospitalCodeList.contains(behospitalCode)) {
|
|
|
- //code也不存在于以保存的code集合
|
|
|
- //手术
|
|
|
- if(indexName.equals(QualityContent.SSJL_24H_WCL)||indexName.equals(QualityContent.BL_JCJL_FHL)||indexName!=null){
|
|
|
- if (!operationBehospitalCode.contains(behospitalCode)) {
|
|
|
- String[][] operationList = QualityContent.OPERATION_LIST;
|
|
|
- Boolean stair = stairCondition(daItemName, operationList);
|
|
|
- if (stair) {
|
|
|
- String[][] operationArg = QualityContent.OPERATION_ARG;
|
|
|
- Boolean levelCondition = secondLevelCondition(daItemName, operationArg);
|
|
|
- if (levelCondition) {
|
|
|
- operationBehospitalCode.add(behospitalCode);
|
|
|
+ String daStatus = adviceMedManageParam.getDaStatus();
|
|
|
+ if(StringUtil.isEmpty(daStatus)&&!daStatus.equals(QualityContent.CANCELLATION_ORDER)||StringUtil.isEmpty(daStatus)){
|
|
|
+ //得到与手术相关
|
|
|
+ if (StringUtil.isNotEmpty(daItemName)) {
|
|
|
+ if (QualityContent.NORecord_NEED_MEDICAL_ADVICE.contains(indexName)) {
|
|
|
+ //当code存在于无首页code集合中
|
|
|
+ if (behospitalCodeList.contains(behospitalCode)) {
|
|
|
+ //code也不存在于以保存的code集合
|
|
|
+ //手术
|
|
|
+ if (indexName.equals(QualityContent.SSJL_24H_WCL) || indexName.equals(QualityContent.BL_JCJL_FHL) || indexName.equals(QualityContent.QB)) {
|
|
|
+ if (!operationBehospitalCode.contains(behospitalCode)) {
|
|
|
+ String[][] operationList = QualityContent.OPERATION_LIST;
|
|
|
+ Boolean stair = stairCondition(daItemName, operationList);
|
|
|
+ if (stair) {
|
|
|
+ String[][] operationArg = QualityContent.OPERATION_ARG;
|
|
|
+ Boolean levelCondition = secondLevelCondition(daItemName, operationArg);
|
|
|
+ if (levelCondition) {
|
|
|
+ operationBehospitalCode.add(behospitalCode);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
- }
|
|
|
- //手术病理
|
|
|
- if(indexName.equals(QualityContent.BL_JCJL_FHL)||indexName!=null) {
|
|
|
- if (!pathologyBehospitalCode.contains(behospitalCode)) {
|
|
|
- Boolean condition = stairCondition(daItemName, QualityContent.BL_LIST);
|
|
|
- if (condition) {
|
|
|
- pathologyBehospitalCode.add(behospitalCode);
|
|
|
+ //手术病理
|
|
|
+ if (indexName.equals(QualityContent.BL_JCJL_FHL) || indexName.equals(QualityContent.QB)) {
|
|
|
+ if (!pathologyBehospitalCode.contains(behospitalCode)) {
|
|
|
+ Boolean condition = stairCondition(daItemName, QualityContent.BL_LIST);
|
|
|
+ if (condition) {
|
|
|
+ pathologyBehospitalCode.add(behospitalCode);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
- //取临时和长期
|
|
|
- if (doctorAdviceType.equals(QualityContent.STAT_ORDER) || doctorAdviceType.equals(QualityContent.STANDING_ORDER)) {
|
|
|
- //抗菌药物
|
|
|
- if(indexName.equals(QualityContent.KJYW_SY_FHL)||indexName!=null) {
|
|
|
- if (!antibiosisBehospitalCode.contains(behospitalCode)) {
|
|
|
- List<String> antimicrobialDrugList = QualityContent.Antimicrobial_Drug_List;
|
|
|
- for (String antimicrobialDrug : antimicrobialDrugList) {
|
|
|
- if (daItemName.contains(antimicrobialDrug)) {
|
|
|
- //包含抗菌药物
|
|
|
- antibiosisBehospitalCode.add(behospitalCode);
|
|
|
+ //取临时和长期
|
|
|
+ if (doctorAdviceType.equals(QualityContent.STAT_ORDER) || doctorAdviceType.equals(QualityContent.STANDING_ORDER)) {
|
|
|
+ //抗菌药物
|
|
|
+ if (indexName.equals(QualityContent.KJYW_SY_FHL) || indexName.equals(QualityContent.QB)) {
|
|
|
+ if (!antibiosisBehospitalCode.contains(behospitalCode)) {
|
|
|
+ List<String> antimicrobialDrugList = QualityContent.Antimicrobial_Drug_List;
|
|
|
+ for (String antimicrobialDrug : antimicrobialDrugList) {
|
|
|
+ if (daItemName.contains(antimicrobialDrug)) {
|
|
|
+ //包含抗菌药物
|
|
|
+ antibiosisBehospitalCode.add(behospitalCode);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
//得到为临时医嘱
|
|
|
if (StringUtil.isNotEmpty(doctorAdviceType)) {
|
|
|
if (doctorAdviceType.equals(QualityContent.STAT_ORDER)) {
|
|
|
- if(indexName.equals(QualityContent.CT_JCJL_FHL)||indexName!=null) {
|
|
|
+ if (indexName.equals(QualityContent.CT_JCJL_FHL) || indexName.equals(QualityContent.QB)) {
|
|
|
if (!CTBehospitalCode.contains(behospitalCode)) {
|
|
|
//筛选与CT相关
|
|
|
//一级条件
|
|
@@ -770,7 +769,7 @@ public class ConsoleFacade {
|
|
|
}
|
|
|
}
|
|
|
//与MR相关
|
|
|
- if(indexName.equals(QualityContent.MR_JCJL_FHL)||indexName!=null) {
|
|
|
+ if (indexName.equals(QualityContent.MR_JCJL_FHL) || indexName.equals(QualityContent.QB)) {
|
|
|
if (!MRBehospitalCode.contains(behospitalCode)) {
|
|
|
String[][] mrList = QualityContent.MR_LIST;
|
|
|
Boolean stair = stairCondition(daItemName, mrList);
|
|
@@ -785,18 +784,19 @@ public class ConsoleFacade {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- /* //获取为长期医嘱或临时医嘱的医嘱
|
|
|
- if(StringUtil.isNotEmpty(doctorAdviceType)) {
|
|
|
- if (indexName.equals(QualityContent.EXZL_HXZL_FHL)||indexName!=null) {
|
|
|
- if (ListUtil.isNotEmpty(malignancyCodeList)) {
|
|
|
- if (malignancyCodeList.contains(behospitalCode)) {
|
|
|
- if (!chemotherapyMalignantTumorsBehospitalCode.contains(behospitalCode)) {
|
|
|
- if (doctorAdviceType.equals(QualityContent.STAT_ORDER) || doctorAdviceType.equals(QualityContent.STANDING_ORDER)) {
|
|
|
- List<String> chemotherapyDrugList = QualityContent.Chemotherapy_Drug_List;
|
|
|
- for (String chemotherapyDrug : chemotherapyDrugList) {
|
|
|
- if (daItemName.contains(chemotherapyDrug)) {
|
|
|
- //医嘱含有化疗药物
|
|
|
- chemotherapyMalignantTumorsBehospitalCode.add(behospitalCode);
|
|
|
+ //获取为长期医嘱或临时医嘱的医嘱
|
|
|
+ if (StringUtil.isNotEmpty(doctorAdviceType)) {
|
|
|
+ if (indexName.equals(QualityContent.EXZL_HXZL_FHL) || indexName.equals(QualityContent.QB)) {
|
|
|
+ if (ListUtil.isNotEmpty(malignancyCodeList)) {
|
|
|
+ if (malignancyCodeList.contains(behospitalCode)) {
|
|
|
+ if (!chemotherapyMalignantTumorsBehospitalCode.contains(behospitalCode)) {
|
|
|
+ if (doctorAdviceType.equals(QualityContent.STAT_ORDER) || doctorAdviceType.equals(QualityContent.STANDING_ORDER)) {
|
|
|
+ List<String> chemotherapyDrugList = QualityContent.Chemotherapy_Drug_List;
|
|
|
+ for (String chemotherapyDrug : chemotherapyDrugList) {
|
|
|
+ if (daItemName.contains(chemotherapyDrug)) {
|
|
|
+ //医嘱含有化疗药物
|
|
|
+ chemotherapyMalignantTumorsBehospitalCode.add(behospitalCode);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -804,7 +804,7 @@ public class ConsoleFacade {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- }*/
|
|
|
+ }
|
|
|
}
|
|
|
})).get();
|
|
|
} catch (InterruptedException e) {
|
|
@@ -825,7 +825,7 @@ public class ConsoleFacade {
|
|
|
map.put("MR",Long.valueOf(MRBehospitalCode.size()));
|
|
|
}
|
|
|
if(ListUtil.isEmpty(operationBehospitalCode)){
|
|
|
- map.put("MR",Long.valueOf(0));
|
|
|
+ map.put("operation",Long.valueOf(0));
|
|
|
}else {
|
|
|
map.put("operation",Long.valueOf(operationBehospitalCode.size()));
|
|
|
}
|
|
@@ -853,6 +853,20 @@ public class ConsoleFacade {
|
|
|
return map;
|
|
|
}
|
|
|
}
|
|
|
+ /**
|
|
|
+ * 获取首页为恶性肿瘤病历code
|
|
|
+ */
|
|
|
+ public List<String> getMalignancyCode(FilterVO filterVO){
|
|
|
+ List<Map<String,String>> malignancyCodeList = behospitalInfoFacade.malignancy(filterVO);
|
|
|
+ ArrayList<String> arrayList = new ArrayList<>();
|
|
|
+ if(ListUtil.isNotEmpty(malignancyCodeList)) {
|
|
|
+ for (Map<String, String> map : malignancyCodeList) {
|
|
|
+ String behospitalCode = map.get("behospital_code");
|
|
|
+ arrayList.add(behospitalCode);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return arrayList;
|
|
|
+ }
|
|
|
|
|
|
/**
|
|
|
* 质控病历统计
|
|
@@ -2687,7 +2701,7 @@ public class ConsoleFacade {
|
|
|
for (int i = 0; i < medManageParams.size(); i++) {
|
|
|
String daItemName = medManageParams.get(i).getDaItemName();
|
|
|
String doctorAdviceType = medManageParams.get(i).getDoctorAdviceType();
|
|
|
- String da_status = medManageParams.get(i).getDa_status();
|
|
|
+ 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) && (da_status == null || (StringUtils.isNotEmpty(da_status) && ! doctorAdviceType.equals(QualityContent.CANCELLATION_ORDER)))){
|
|
|
manageList.add(medManageParams.get(i));
|
|
@@ -2756,7 +2770,7 @@ public class ConsoleFacade {
|
|
|
doctorAdviceList.parallelStream()
|
|
|
.filter(obj -> beCode.contains(obj.getBehospitalCode()) && obj.getDoctorAdviceType()
|
|
|
.equals(QualityContent.STAT_ORDER) && blood_list.contains(obj.getDaItemName()) &&
|
|
|
- (obj.getDa_status() == null) || (StringUtils.isNotEmpty(obj.getDa_status()) && ! obj.getDa_status()
|
|
|
+ (obj.getDaStatus() == null) || (StringUtils.isNotEmpty(obj.getDaStatus()) && ! obj.getDaStatus()
|
|
|
.equals(QualityContent.CANCELLATION_ORDER)))
|
|
|
.distinct()
|
|
|
.map(obj -> manageList.add(obj.getBehospitalCode()))
|