|
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.diagbot.aggregate.AverageStatisticsAggregate;
|
|
|
+import com.diagbot.aggregate.LeaveHosStatisticsAggregate;
|
|
|
import com.diagbot.aggregate.MrStatisticsAggregate;
|
|
|
import com.diagbot.aggregate.ResultStatisticsAggregate;
|
|
|
import com.diagbot.dto.*;
|
|
@@ -386,23 +387,18 @@ public class ConsoleFacade {
|
|
|
|
|
|
|
|
|
/**
|
|
|
- * 病案指标数据保存
|
|
|
- *
|
|
|
+ * 病案指标
|
|
|
* @param filterVO
|
|
|
- * @return 2170
|
|
|
+ * @return
|
|
|
*/
|
|
|
- @Transactional
|
|
|
- public void saveMedicaIndicator(FilterVO filterVO){
|
|
|
- MedIndexResult medIndexResult = new MedIndexResult();
|
|
|
- String indexName = filterVO.getIndexName();
|
|
|
+ public List<Map<String,String>> medicalRecordIndicator(FilterVO filterVO){
|
|
|
+ filterFacade.filterSet(filterVO);
|
|
|
List<Map<String, String>> hashMapArrayList = new ArrayList<>();
|
|
|
- long zz = System.currentTimeMillis();
|
|
|
+ String indexName = filterVO.getIndexName();
|
|
|
Map<String, Long> selectOperationNumMap = behospitalInfoFacade.selectOperationNum(filterVO);
|
|
|
//出院人数
|
|
|
- Long startCount = selectOperationNumMap.get(QualityContent.DISCHARGED_PATIENTS);
|
|
|
- //入院人数
|
|
|
Long endCount = selectOperationNumMap.get(QualityContent.NUMBER_OF_HOSPITAL);
|
|
|
- //各指标未完成人数情况
|
|
|
+ //各指标未完成人数情况 ---分子
|
|
|
Map<String, Long> triggeringRulesMap = behospitalInfoFacade.triggeringRules(filterVO);
|
|
|
Long operationCount = triggeringRulesMap.get(QualityContent.SSJLWCC_24H);
|
|
|
Long InHospitalRecords = triggeringRulesMap.get(QualityContent.RYJLWWC_24H);
|
|
@@ -418,42 +414,92 @@ public class ConsoleFacade {
|
|
|
Long antibiosis = 0L;
|
|
|
//恶性肿瘤化学治疗
|
|
|
Long chemotherapyMalignantTumors = 0L;
|
|
|
- if(indexName!=null) {
|
|
|
- if(QualityContent.NO_MEDICAL_ADVICE.contains(indexName)){
|
|
|
- //入院记录24小时完成率
|
|
|
- //入院记录完成人数为
|
|
|
- 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);
|
|
|
- stringStringHashMap.put("notCopiedStr", getResult(startCount - InHospitalRecords, startCount));
|
|
|
- stringStringHashMap.put("num", Double.valueOf(startCount).toString());
|
|
|
- hashMapArrayList.add(stringStringHashMap);
|
|
|
- }
|
|
|
- }
|
|
|
- //出院记录24小时完成率
|
|
|
- //出院记录完成人数为
|
|
|
- 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);
|
|
|
- stringStringHashMap.put("notCopiedStr", getResult(startCount - OutHospitalRecords, startCount));
|
|
|
- stringStringHashMap.put("num", Double.valueOf(startCount).toString());
|
|
|
- hashMapArrayList.add(stringStringHashMap);
|
|
|
- }
|
|
|
- }
|
|
|
- //病案首页24小时完成率
|
|
|
- //病案首页完成人数为
|
|
|
- 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);
|
|
|
- stringStringHashMap.put("notCopiedStr", getResult(startCount - recordHomePage, startCount));
|
|
|
- stringStringHashMap.put("num", Double.valueOf(startCount).toString());
|
|
|
- hashMapArrayList.add(stringStringHashMap);
|
|
|
- }
|
|
|
- }
|
|
|
+ Map<String, Long> medicalRecordIndicator = medIndexResultFacade.medicalRecordIndicator(filterVO);
|
|
|
+ Long operationFeeNum = medicalRecordIndicator.get("同期手术出院患者总数");
|
|
|
+ Long CTNum = medicalRecordIndicator.get("同期接收CT检查的出院患者总数");
|
|
|
+ Long MRNum = medicalRecordIndicator.get("同期接收MRI检查的出院患者总数");
|
|
|
+ Long operationPathologyFeeNum = medicalRecordIndicator.get("同期开展病理检查的出院手术患者病历总数");
|
|
|
+ Long bacterialCultureNum = medicalRecordIndicator.get("同期开展细菌培养检查出院患者病历总数");
|
|
|
+ Long antibiosisFeeNum = medicalRecordIndicator.get("同期使用抗菌药物出院患者病历总数");
|
|
|
+ Long chemotherapyMalignantTumorsNum = medicalRecordIndicator.get("同期接受恶性肿瘤化学治疗出院患者病历总数");
|
|
|
+ //手术记录完成率
|
|
|
+ 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);
|
|
|
+ stringStringHashMap.put("notCopiedStr", getResult(operationFeeNum - operationCount, operationFeeNum));
|
|
|
+ stringStringHashMap.put("num", Double.valueOf(operationFeeNum).toString());
|
|
|
+ hashMapArrayList.add(stringStringHashMap);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //CT完成率
|
|
|
+ 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);
|
|
|
+ stringStringHashMap.put("notCopiedStr", getResult(CTNum - ct, CTNum));
|
|
|
+ stringStringHashMap.put("num", Double.valueOf(CTNum).toString());
|
|
|
+ hashMapArrayList.add(stringStringHashMap);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //MRI完成率
|
|
|
+ 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);
|
|
|
+ stringStringHashMap.put("notCopiedStr", getResult(MRNum - mr, MRNum));
|
|
|
+ stringStringHashMap.put("num", Double.valueOf(MRNum).toString());
|
|
|
+ hashMapArrayList.add(stringStringHashMap);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //病理完成率为
|
|
|
+ if (indexName.equals(QualityContent.BL_JCJL_FHL)||indexName.equals(QualityContent.QB)) {
|
|
|
+ if (operationPathologyFeeNum != null && operationPathologyFee != null) {
|
|
|
+ Map<String, String> stringStringHashMap = new LinkedHashMap<>();
|
|
|
+ stringStringHashMap.put("name", QualityContent.BL_JCJL_FHL);
|
|
|
+ stringStringHashMap.put("notCopiedStr", getResult(operationPathologyFeeNum - operationPathologyFee, operationPathologyFeeNum));
|
|
|
+ stringStringHashMap.put("num", Double.valueOf(operationPathologyFeeNum).toString());
|
|
|
+ hashMapArrayList.add(stringStringHashMap);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //抗菌
|
|
|
+ if (indexName.equals(QualityContent.KJYW_SY_FHL)||indexName.equals(QualityContent.QB)) {
|
|
|
+ if (antibiosisFeeNum != null && antibiosis != null) {
|
|
|
+ Map<String, String> stringStringHashMap = new LinkedHashMap<>();
|
|
|
+ stringStringHashMap.put("name", QualityContent.KJYW_SY_FHL);
|
|
|
+ stringStringHashMap.put("notCopiedStr", getResult(antibiosisFeeNum - antibiosis, antibiosisFeeNum));
|
|
|
+ stringStringHashMap.put("num", Double.valueOf(antibiosisFeeNum).toString());
|
|
|
+ hashMapArrayList.add(stringStringHashMap);
|
|
|
}
|
|
|
+ }
|
|
|
+ //恶性肿瘤化学治疗
|
|
|
+ if (indexName.equals(QualityContent.EXZL_HXZL_FHL)||indexName.equals(QualityContent.QB)) {
|
|
|
+ if (chemotherapyMalignantTumorsNum != null && chemotherapyMalignantTumors != null) {
|
|
|
+ Map<String, String> stringStringHashMap = new LinkedHashMap<>();
|
|
|
+ stringStringHashMap.put("name", QualityContent.EXZL_HXZL_FHL);
|
|
|
+ stringStringHashMap.put("notCopiedStr", getResult(chemotherapyMalignantTumorsNum - chemotherapyMalignantTumors, chemotherapyMalignantTumorsNum));
|
|
|
+ stringStringHashMap.put("num", Double.valueOf(chemotherapyMalignantTumorsNum).toString());
|
|
|
+ hashMapArrayList.add(stringStringHashMap);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return hashMapArrayList;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 病案指标数据保存
|
|
|
+ *
|
|
|
+ * @param filterVO
|
|
|
+ * @return 2170
|
|
|
+ */
|
|
|
+ @Transactional
|
|
|
+ public void saveMedicaIndicator(FilterVO filterVO){
|
|
|
+ MedIndexResult medIndexResult = new MedIndexResult();
|
|
|
+ String indexName = filterVO.getIndexName();
|
|
|
+ Map<String, Long> selectOperationNumMap = behospitalInfoFacade.selectOperationNum(filterVO);
|
|
|
+ //出院人数
|
|
|
Long operationFeeNum = 0L;
|
|
|
List<MedManageParamsDTO> doctorAdviceMedManageParams = new ArrayList<>();
|
|
|
if (QualityContent.NEED_MEDICAL_ADVICE.contains(indexName)) {
|
|
@@ -480,93 +526,49 @@ public class ConsoleFacade {
|
|
|
Long chemotherapyMalignantTumorsNum = adviceNum.get("chemotherapyMalignantTumors");
|
|
|
//手术记录完成率
|
|
|
//手术完成人数为
|
|
|
- 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);
|
|
|
- stringStringHashMap.put("notCopiedStr", getResult(operationFeeNum - operationCount, operationFeeNum));
|
|
|
- stringStringHashMap.put("num", Double.valueOf(operationFeeNum).toString());
|
|
|
- hashMapArrayList.add(stringStringHashMap);
|
|
|
+ if (operationFeeNum != null) {
|
|
|
+ medIndexResult.setOperationResult(Double.valueOf(operationFeeNum));
|
|
|
}
|
|
|
- }
|
|
|
- //CT完成率
|
|
|
- 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);
|
|
|
- stringStringHashMap.put("notCopiedStr", getResult(CTNum - ct, CTNum));
|
|
|
- stringStringHashMap.put("num", Double.valueOf(CTNum).toString());
|
|
|
- hashMapArrayList.add(stringStringHashMap);
|
|
|
+ //CT人数
|
|
|
+ if (CTNum != null) {
|
|
|
+ medIndexResult.setCtResult(Double.valueOf(CTNum));
|
|
|
}
|
|
|
- }
|
|
|
- //MRI完成率
|
|
|
- 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);
|
|
|
- stringStringHashMap.put("notCopiedStr", getResult(MRNum - mr, MRNum));
|
|
|
- stringStringHashMap.put("num", Double.valueOf(MRNum).toString());
|
|
|
- hashMapArrayList.add(stringStringHashMap);
|
|
|
+ //MRI人数
|
|
|
+ if (MRNum != null ) {
|
|
|
+ medIndexResult.setMriResult(Double.valueOf(MRNum));
|
|
|
}
|
|
|
- }
|
|
|
- if (indexName.equals(QualityContent.BL_JCJL_FHL)||indexName.equals(QualityContent.QB)) {
|
|
|
- if (operationPathologyFeeNum != null && operationPathologyFee != null) {
|
|
|
- //病理完成率为
|
|
|
- Map<String, String> stringStringHashMap = new LinkedHashMap<>();
|
|
|
- stringStringHashMap.put("name", QualityContent.BL_JCJL_FHL);
|
|
|
- stringStringHashMap.put("notCopiedStr", getResult(operationPathologyFeeNum - operationPathologyFee, operationPathologyFeeNum));
|
|
|
- stringStringHashMap.put("num", Double.valueOf(operationPathologyFeeNum).toString());
|
|
|
- hashMapArrayList.add(stringStringHashMap);
|
|
|
+ //病理人数
|
|
|
+ if (operationPathologyFeeNum != null) {
|
|
|
+ medIndexResult.setPathologyResult(Double.valueOf(operationPathologyFeeNum));
|
|
|
}
|
|
|
- }
|
|
|
- if (indexName.equals(QualityContent.KJYW_SY_FHL)||indexName.equals(QualityContent.QB)) {
|
|
|
- if (antibiosisFeeNum != null && antibiosis != null) {
|
|
|
- //抗菌
|
|
|
- Map<String, String> stringStringHashMap = new LinkedHashMap<>();
|
|
|
- stringStringHashMap.put("name", QualityContent.KJYW_SY_FHL);
|
|
|
- stringStringHashMap.put("notCopiedStr", getResult(antibiosisFeeNum - antibiosis, antibiosisFeeNum));
|
|
|
- stringStringHashMap.put("num", Double.valueOf(antibiosisFeeNum).toString());
|
|
|
- hashMapArrayList.add(stringStringHashMap);
|
|
|
+ //抗菌人数
|
|
|
+ if (antibiosisFeeNum != null ) {
|
|
|
+ medIndexResult.setAntibiosisResult(Double.valueOf(antibiosisFeeNum));
|
|
|
}
|
|
|
- }
|
|
|
- if (indexName.equals(QualityContent.EXZL_HXZL_FHL)||indexName.equals(QualityContent.QB)) {
|
|
|
- if (chemotherapyMalignantTumorsNum != null && chemotherapyMalignantTumors != null) {
|
|
|
- //恶性肿瘤化学治疗
|
|
|
- Map<String, String> stringStringHashMap = new LinkedHashMap<>();
|
|
|
- stringStringHashMap.put("name", QualityContent.EXZL_HXZL_FHL);
|
|
|
- stringStringHashMap.put("notCopiedStr", getResult(chemotherapyMalignantTumorsNum - chemotherapyMalignantTumors, chemotherapyMalignantTumorsNum));
|
|
|
- stringStringHashMap.put("num", Double.valueOf(chemotherapyMalignantTumorsNum).toString());
|
|
|
- hashMapArrayList.add(stringStringHashMap);
|
|
|
+ //恶性肿瘤化学治疗人数
|
|
|
+ if (chemotherapyMalignantTumorsNum != null ) {
|
|
|
+ medIndexResult.setTumorChemistryResult(Double.valueOf(chemotherapyMalignantTumorsNum));
|
|
|
}
|
|
|
- }
|
|
|
}
|
|
|
/**
|
|
|
* =================================标示线========================================
|
|
|
*/
|
|
|
-
|
|
|
- Map<String, Object> baseIndex = behospitalInfoFacade.getBaseIndex(filterVO);
|
|
|
-
|
|
|
+ /* Map<String, Object> baseIndex = behospitalInfoFacade.getBaseIndex(filterVO);
|
|
|
//指标二十七
|
|
|
firMethod(indexName,baseIndex,medIndexResult);
|
|
|
//指标十七 医师查房记录
|
|
|
WardRoundMethod(baseIndex, triggeringRulesMap,medIndexResult);
|
|
|
-
|
|
|
//指标十八 抢救记录
|
|
|
rescueMethod(doctorAdviceMedManageParams,triggeringRulesMap,medIndexResult);
|
|
|
-
|
|
|
//指标十九 出院患者病历2日归档
|
|
|
getfileSecAmount(filterVO,baseIndex,medIndexResult);
|
|
|
-
|
|
|
//指标十四 手术记录
|
|
|
operationMethod(operationFeeNum+"", triggeringRulesMap,medIndexResult);
|
|
|
-
|
|
|
//指标十六 临床用血相关记录符合率
|
|
|
filterVO.setFlagStr("1");
|
|
|
List<MedManageParamsDTO> medManageParams = behospitalInfoFacade.getMedManageParams(filterVO);
|
|
|
bloodMethod(hashMapArrayList,doctorAdviceMedManageParams, medManageParams, triggeringRulesMap,medIndexResult);
|
|
|
-
|
|
|
- medIndexResultFacade.save(medIndexResult);
|
|
|
- }
|
|
|
+ medIndexResultFacade.save(medIndexResult);*/
|
|
|
}
|
|
|
|
|
|
/**
|