|
@@ -1,22 +1,13 @@
|
|
|
package com.diagbot.facade;
|
|
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
+import com.baomidou.mybatisplus.annotation.TableName;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
+import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
|
|
|
import com.diagbot.client.AuthServiceClient;
|
|
|
import com.diagbot.dto.*;
|
|
|
-import com.diagbot.entity.BehospitalInfo;
|
|
|
-import com.diagbot.entity.DoctorAdvice;
|
|
|
-import com.diagbot.entity.HomeDiagnoseInfo;
|
|
|
-import com.diagbot.entity.HomeOperationInfo;
|
|
|
-import com.diagbot.entity.HomePage;
|
|
|
-import com.diagbot.entity.MedCheckInfo;
|
|
|
-import com.diagbot.entity.MedCrisisInfo;
|
|
|
-import com.diagbot.entity.MedLisInfo;
|
|
|
-import com.diagbot.entity.MedLisResult;
|
|
|
-import com.diagbot.entity.MedPacsInfo;
|
|
|
-import com.diagbot.entity.MedPacsResult;
|
|
|
-import com.diagbot.entity.MedicalRecord;
|
|
|
+import com.diagbot.entity.*;
|
|
|
import com.diagbot.enums.IsDeleteEnum;
|
|
|
import com.diagbot.exception.CommonErrorCode;
|
|
|
import com.diagbot.exception.CommonException;
|
|
@@ -118,6 +109,52 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
MedCrisisInfoFacade medCrisisInfoFacade;
|
|
|
@Autowired
|
|
|
MedCheckInfoFacade medCheckInfoFacade;
|
|
|
+ @Autowired
|
|
|
+ MedConsultationApplyFacade medConsultationApplyFacade;
|
|
|
+ @Autowired
|
|
|
+ MedConsultationResultFacade medConsultationResultFacade;
|
|
|
+ @Autowired
|
|
|
+ MedConsultationNoteFacade medConsultationNoteFacade;
|
|
|
+ @Autowired
|
|
|
+ MedAdmissionNoteFacade medAdmissionNoteFacade;
|
|
|
+ @Autowired
|
|
|
+ MedBloodResultFacade medBloodResultFacade;
|
|
|
+ @Autowired
|
|
|
+ MedBloodTransfusionFacade medBloodTransfusionFacade;
|
|
|
+ @Autowired
|
|
|
+ MedCrisisNoteFacade medCrisisNoteFacade;
|
|
|
+ @Autowired
|
|
|
+ MedDeathDiscussionFacade medDeathDiscussionFacade;
|
|
|
+ @Autowired
|
|
|
+ MedDeathNoteFacade medDeathNoteFacade;
|
|
|
+ @Autowired
|
|
|
+ MedDifficultCaseFacade medDifficultCaseFacade;
|
|
|
+ @Autowired
|
|
|
+ MedFirstRecordFacade medFirstRecordFacade;
|
|
|
+ @Autowired
|
|
|
+ MedIllCriticallyFacade medIllCriticallyFacade;
|
|
|
+ @Autowired
|
|
|
+ MedIllSeriouslFacade medIllSeriouslFacade;
|
|
|
+ @Autowired
|
|
|
+ MedLeaveHospitalFacade medLeaveHospitalFacade;
|
|
|
+ @Autowired
|
|
|
+ MedOperativeFirstRecordFacade medOperativeFirstRecordFacade;
|
|
|
+ @Autowired
|
|
|
+ MedOperativeNoteFacade medOperativeNoteFacade;
|
|
|
+ @Autowired
|
|
|
+ MedPeriodConclusionFacade medPeriodConclusionFacade;
|
|
|
+ @Autowired
|
|
|
+ MedPreoperativeDiscussionFacade medPreoperativeDiscussionFacade;
|
|
|
+ @Autowired
|
|
|
+ MedRescueNoteFacade medRescueNoteFacade;
|
|
|
+ @Autowired
|
|
|
+ MedTransferInNoteFacade medTransferInNoteFacade;
|
|
|
+ @Autowired
|
|
|
+ MedTransferOutNoteFacade medTransferOutNoteFacade;
|
|
|
+ @Autowired
|
|
|
+ MedWardRecordFacade medWardRecordFacade;
|
|
|
+
|
|
|
+
|
|
|
|
|
|
/**
|
|
|
* 分页
|
|
@@ -248,7 +285,7 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
// 获取病历所有数据
|
|
|
Map<String, Map<String, String>> dicMap = sysDictionaryFacade.getDictionaryWithKey(); // 获取字典信息
|
|
|
// 获取文书信息
|
|
|
- RecordContentVO recordContentVO = new RecordContentVO();
|
|
|
+ /* RecordContentVO recordContentVO = new RecordContentVO();
|
|
|
BeanUtil.copyProperties(analyzeVO, recordContentVO);
|
|
|
List<RecordContentDTO> recordContentDTOList = medicalRecordFacade.getRecordContentFac(recordContentVO);
|
|
|
String recTitle = "";
|
|
@@ -266,7 +303,207 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- Map<String, List<RecordContentDTO>> recMap = EntityUtil.makeEntityListMap(recordContentDTOList, "standModelName");
|
|
|
+ Map<String, List<RecordContentDTO>> recMap = EntityUtil.makeEntityListMap(recordContentDTOList, "standModelName");*/
|
|
|
+
|
|
|
+// -------------------------------------文书数据改造开始----------------------------------
|
|
|
+ // 获取会诊申请单
|
|
|
+ List<MedConsultationApply> medConsultationApplyList = medConsultationApplyFacade.list(new QueryWrapper<MedConsultationApply>()
|
|
|
+ .eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
+ .eq("hospital_id", hospitalId)
|
|
|
+ .eq("behospital_code", analyzeVO.getBehospitalCode())
|
|
|
+ .select(MedConsultationApply.class, info -> !info.getColumn().equals("whole_data"))
|
|
|
+ .orderByAsc("behospital_date")
|
|
|
+ );
|
|
|
+
|
|
|
+ // 获取会诊结果单
|
|
|
+ List<MedConsultationResult> medConsultationResultList = medConsultationResultFacade.list(new QueryWrapper<MedConsultationResult>()
|
|
|
+ .eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
+ .eq("hospital_id", hospitalId)
|
|
|
+ .eq("behospital_code", analyzeVO.getBehospitalCode())
|
|
|
+ .select(MedConsultationResult.class, info -> !info.getColumn().equals("whole_data"))
|
|
|
+ .orderByAsc("behospital_date")
|
|
|
+ );
|
|
|
+
|
|
|
+ // 会诊单(申请和结果)
|
|
|
+ List<MedConsultationNote> medConsultationNoteList = medConsultationNoteFacade.list(new QueryWrapper<MedConsultationNote>()
|
|
|
+ .eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
+ .eq("hospital_id", hospitalId)
|
|
|
+ .eq("behospital_code", analyzeVO.getBehospitalCode())
|
|
|
+ .select(MedConsultationNote.class, info -> !info.getColumn().equals("whole_data"))
|
|
|
+ .orderByAsc("behospital_date")
|
|
|
+ );
|
|
|
+
|
|
|
+ // 入院记录
|
|
|
+ List<MedAdmissionNote> medAdmissionNoteList = medAdmissionNoteFacade.list(new QueryWrapper<MedAdmissionNote>()
|
|
|
+ .eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
+ .eq("hospital_id", hospitalId)
|
|
|
+ .eq("behospital_code", analyzeVO.getBehospitalCode())
|
|
|
+ .select(MedAdmissionNote.class, info -> !info.getColumn().equals("whole_data"))
|
|
|
+ .orderByAsc("behospital_date")
|
|
|
+ );
|
|
|
+
|
|
|
+ // 输血效果评价
|
|
|
+ List<MedBloodResult> medBloodResultList = medBloodResultFacade.list(new QueryWrapper<MedBloodResult>()
|
|
|
+ .eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
+ .eq("hospital_id", hospitalId)
|
|
|
+ .eq("behospital_code", analyzeVO.getBehospitalCode())
|
|
|
+ .select(MedBloodResult.class, info -> !info.getColumn().equals("whole_data"))
|
|
|
+ .orderByAsc("rec_date")
|
|
|
+ );
|
|
|
+
|
|
|
+ // 输血记录
|
|
|
+ List<MedBloodTransfusion> medBloodTransfusionList = medBloodTransfusionFacade.list(new QueryWrapper<MedBloodTransfusion>()
|
|
|
+ .eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
+ .eq("hospital_id", hospitalId)
|
|
|
+ .eq("behospital_code", analyzeVO.getBehospitalCode())
|
|
|
+ .select(MedBloodTransfusion.class, info -> !info.getColumn().equals("whole_data"))
|
|
|
+ .orderByAsc("rec_date")
|
|
|
+ );
|
|
|
+
|
|
|
+ // 危急值记录
|
|
|
+ List<MedCrisisNote> medCrisisNoteList = medCrisisNoteFacade.list(new QueryWrapper<MedCrisisNote>()
|
|
|
+ .eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
+ .eq("hospital_id", hospitalId)
|
|
|
+ .eq("behospital_code", analyzeVO.getBehospitalCode())
|
|
|
+ .select(MedCrisisNote.class, info -> !info.getColumn().equals("whole_data"))
|
|
|
+ .orderByAsc("rec_date")
|
|
|
+ );
|
|
|
+
|
|
|
+ // 死亡病例讨论记录
|
|
|
+ List<MedDeathDiscussion> medDeathDiscussionList = medDeathDiscussionFacade.list(new QueryWrapper<MedDeathDiscussion>()
|
|
|
+ .eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
+ .eq("hospital_id", hospitalId)
|
|
|
+ .eq("behospital_code", analyzeVO.getBehospitalCode())
|
|
|
+ .select(MedDeathDiscussion.class, info -> !info.getColumn().equals("whole_data"))
|
|
|
+ .orderByAsc("rec_date")
|
|
|
+ );
|
|
|
+
|
|
|
+ // 死亡记录
|
|
|
+ List<MedDeathNote> medDeathNoteList = medDeathNoteFacade.list(new QueryWrapper<MedDeathNote>()
|
|
|
+ .eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
+ .eq("hospital_id", hospitalId)
|
|
|
+ .eq("behospital_code", analyzeVO.getBehospitalCode())
|
|
|
+ .select(MedDeathNote.class, info -> !info.getColumn().equals("whole_data"))
|
|
|
+ .orderByAsc("death_date")
|
|
|
+ );
|
|
|
+
|
|
|
+ // 疑难病例讨论记录
|
|
|
+ List<MedDifficultCase> medDifficultCaseList = medDifficultCaseFacade.list(new QueryWrapper<MedDifficultCase>()
|
|
|
+ .eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
+ .eq("hospital_id", hospitalId)
|
|
|
+ .eq("behospital_code", analyzeVO.getBehospitalCode())
|
|
|
+ .select(MedDifficultCase.class, info -> !info.getColumn().equals("whole_data"))
|
|
|
+ .orderByAsc("rec_date")
|
|
|
+ );
|
|
|
+
|
|
|
+ // 首次病程录
|
|
|
+ List<MedFirstRecord> medFirstRecordList = medFirstRecordFacade.list(new QueryWrapper<MedFirstRecord>()
|
|
|
+ .eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
+ .eq("hospital_id", hospitalId)
|
|
|
+ .eq("behospital_code", analyzeVO.getBehospitalCode())
|
|
|
+ .select(MedFirstRecord.class, info -> !info.getColumn().equals("whole_data"))
|
|
|
+ .orderByAsc("rec_date")
|
|
|
+ );
|
|
|
+
|
|
|
+ // 病危通知单
|
|
|
+ List<MedIllCritically> medIllCriticallyList = medIllCriticallyFacade.list(new QueryWrapper<MedIllCritically>()
|
|
|
+ .eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
+ .eq("hospital_id", hospitalId)
|
|
|
+ .eq("behospital_code", analyzeVO.getBehospitalCode())
|
|
|
+ .select(MedIllCritically.class, info -> !info.getColumn().equals("whole_data"))
|
|
|
+ .orderByAsc("doctor_sign_date")
|
|
|
+ );
|
|
|
+
|
|
|
+ // 病重通知单
|
|
|
+ List<MedIllSeriousl> medIllSeriouslList = medIllSeriouslFacade.list(new QueryWrapper<MedIllSeriousl>()
|
|
|
+ .eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
+ .eq("hospital_id", hospitalId)
|
|
|
+ .eq("behospital_code", analyzeVO.getBehospitalCode())
|
|
|
+ .select(MedIllSeriousl.class, info -> !info.getColumn().equals("whole_data"))
|
|
|
+ .orderByAsc("doctor_sign_date")
|
|
|
+ );
|
|
|
+
|
|
|
+ // 出院小结
|
|
|
+ List<MedLeaveHospital> medLeaveHospitalList = medLeaveHospitalFacade.list(new QueryWrapper<MedLeaveHospital>()
|
|
|
+ .eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
+ .eq("hospital_id", hospitalId)
|
|
|
+ .eq("behospital_code", analyzeVO.getBehospitalCode())
|
|
|
+ .select(MedLeaveHospital.class, info -> !info.getColumn().equals("whole_data"))
|
|
|
+ .orderByAsc("leave_hospital_date")
|
|
|
+ );
|
|
|
+
|
|
|
+ // 术后首程
|
|
|
+ List<MedOperativeFirstRecord> medOperativeFirstRecordList = medOperativeFirstRecordFacade.list(new QueryWrapper<MedOperativeFirstRecord>()
|
|
|
+ .eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
+ .eq("hospital_id", hospitalId)
|
|
|
+ .eq("behospital_code", analyzeVO.getBehospitalCode())
|
|
|
+ .select(MedOperativeFirstRecord.class, info -> !info.getColumn().equals("whole_data"))
|
|
|
+ .orderByAsc("rec_date")
|
|
|
+ );
|
|
|
+
|
|
|
+ // 手术记录
|
|
|
+ List<MedOperativeNote> medOperativeNoteList = medOperativeNoteFacade.list(new QueryWrapper<MedOperativeNote>()
|
|
|
+ .eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
+ .eq("hospital_id", hospitalId)
|
|
|
+ .eq("behospital_code", analyzeVO.getBehospitalCode())
|
|
|
+ .select(MedOperativeNote.class, info -> !info.getColumn().equals("whole_data"))
|
|
|
+ .orderByAsc("rec_date")
|
|
|
+ );
|
|
|
+
|
|
|
+ // 阶段小结
|
|
|
+ List<MedPeriodConclusion> medPeriodConclusionList = medPeriodConclusionFacade.list(new QueryWrapper<MedPeriodConclusion>()
|
|
|
+ .eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
+ .eq("hospital_id", hospitalId)
|
|
|
+ .eq("behospital_code", analyzeVO.getBehospitalCode())
|
|
|
+ .select(MedPeriodConclusion.class, info -> !info.getColumn().equals("whole_data"))
|
|
|
+ .orderByAsc("rec_date")
|
|
|
+ );
|
|
|
+
|
|
|
+ // 术前讨论小结
|
|
|
+ List<MedPreoperativeDiscussion> medPreoperativeDiscussionList = medPreoperativeDiscussionFacade.list(new QueryWrapper<MedPreoperativeDiscussion>()
|
|
|
+ .eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
+ .eq("hospital_id", hospitalId)
|
|
|
+ .eq("behospital_code", analyzeVO.getBehospitalCode())
|
|
|
+ .select(MedPreoperativeDiscussion.class, info -> !info.getColumn().equals("whole_data"))
|
|
|
+ .orderByAsc("rec_date")
|
|
|
+ );
|
|
|
+
|
|
|
+ // 抢救记录
|
|
|
+ List<MedRescueNote> medRescueNoteList = medRescueNoteFacade.list(new QueryWrapper<MedRescueNote>()
|
|
|
+ .eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
+ .eq("hospital_id", hospitalId)
|
|
|
+ .eq("behospital_code", analyzeVO.getBehospitalCode())
|
|
|
+ .select(MedRescueNote.class, info -> !info.getColumn().equals("whole_data"))
|
|
|
+ .orderByAsc("rec_date")
|
|
|
+ );
|
|
|
+
|
|
|
+ // 转入记录
|
|
|
+ List<MedTransferInNote> medTransferInNoteList = medTransferInNoteFacade.list(new QueryWrapper<MedTransferInNote>()
|
|
|
+ .eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
+ .eq("hospital_id", hospitalId)
|
|
|
+ .eq("behospital_code", analyzeVO.getBehospitalCode())
|
|
|
+ .select(MedTransferInNote.class, info -> !info.getColumn().equals("whole_data"))
|
|
|
+ .orderByAsc("transfer_in_date")
|
|
|
+ );
|
|
|
+
|
|
|
+ // 转出记录
|
|
|
+ List<MedTransferOutNote> medTransferOutNoteList = medTransferOutNoteFacade.list(new QueryWrapper<MedTransferOutNote>()
|
|
|
+ .eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
+ .eq("hospital_id", hospitalId)
|
|
|
+ .eq("behospital_code", analyzeVO.getBehospitalCode())
|
|
|
+ .select(MedTransferOutNote.class, info -> !info.getColumn().equals("whole_data"))
|
|
|
+ .orderByAsc("transfer_in_date")
|
|
|
+ );
|
|
|
+
|
|
|
+ // 查房记录
|
|
|
+ List<MedWardRecord> medWardRecordList = medWardRecordFacade.list(new QueryWrapper<MedWardRecord>()
|
|
|
+ .eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
+ .eq("hospital_id", hospitalId)
|
|
|
+ .eq("behospital_code", analyzeVO.getBehospitalCode())
|
|
|
+ .select(MedWardRecord.class, info -> !info.getColumn().equals("whole_data"))
|
|
|
+ .orderByAsc("rec_date")
|
|
|
+ );
|
|
|
+// -------------------------------------文书数据改造结束----------------------------------
|
|
|
|
|
|
// 获取医嘱
|
|
|
List<DoctorAdvice> doctorAdviceList = doctorAdviceFacade.list(new QueryWrapper<DoctorAdvice>()
|
|
@@ -339,55 +576,159 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
}
|
|
|
|
|
|
|
|
|
- // 化验
|
|
|
- // List<MedLisResult> medLisResultList = getMedLisResultList(behospitalInfoList.get(0));
|
|
|
- //使用sql进行关联优化数据查询
|
|
|
+ // 化验
|
|
|
+ // List<MedLisResult> medLisResultList = getMedLisResultList(behospitalInfoList.get(0));
|
|
|
+ //使用sql进行关联优化数据查询
|
|
|
List<MedLisResultDTO> medLisResultListDTO = medLisResultFacade.getMedLisResultList(behospitalInfoList.get(0));
|
|
|
- List<MedLisResult> medLisResultList =new ArrayList<>();
|
|
|
+ List<MedLisResult> medLisResultList = new ArrayList<>();
|
|
|
for (MedLisResultDTO medLisResultSingle : medLisResultListDTO) {
|
|
|
MedLisResult medLisResult = new MedLisResult();
|
|
|
- BeanUtil.copyProperties(medLisResultSingle,medLisResult);
|
|
|
- medLisResult.setItemName( medLisResultSingle.getRepName()+ "=" +medLisResultSingle.getReportName());
|
|
|
+ BeanUtil.copyProperties(medLisResultSingle, medLisResult);
|
|
|
+ medLisResult.setItemName(medLisResultSingle.getRepName() + "=" + medLisResultSingle.getReportName());
|
|
|
medLisResultList.add(medLisResult);
|
|
|
}
|
|
|
|
|
|
// 辅检
|
|
|
- // List<MedPacsResult> medPacsResultList = getMedPacsResultList(behospitalInfoList.get(0));
|
|
|
- //使用sql进行关联优化数据查询
|
|
|
+ // List<MedPacsResult> medPacsResultList = getMedPacsResultList(behospitalInfoList.get(0));
|
|
|
+ //使用sql进行关联优化数据查询
|
|
|
List<MedPacsResult> medPacsResultList = medPacsResultFacade.getMedPacsResultList(behospitalInfoList.get(0));
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 文书数据拼接
|
|
|
+ */
|
|
|
+ //会诊申请单
|
|
|
+ newAddData("会诊申请单",medConsultationApplyList,medrecVoList);
|
|
|
+
|
|
|
+ //会诊结果单
|
|
|
+ newAddData("会诊结果单",medConsultationResultList,medrecVoList);
|
|
|
+
|
|
|
+ //会诊单(申请和结果)
|
|
|
+ newAddData("会诊单(申请和结果)",medConsultationNoteList,medrecVoList);
|
|
|
+
|
|
|
+ //入院记录
|
|
|
+ newAddData("入院记录",medAdmissionNoteList,medrecVoList);
|
|
|
+
|
|
|
+ //输血效果评价
|
|
|
+ newAddData("输血效果评价",medBloodResultList,medrecVoList);
|
|
|
+
|
|
|
+ //输血记录
|
|
|
+ newAddData("输血记录",medBloodTransfusionList,medrecVoList);
|
|
|
+
|
|
|
+ //危急值记录
|
|
|
+ newAddData("危急值记录",medCrisisNoteList,medrecVoList);
|
|
|
+
|
|
|
+ //死亡病例讨论记录
|
|
|
+ newAddData("死亡病例讨论记录",medDeathDiscussionList,medrecVoList);
|
|
|
+
|
|
|
+ //死亡记录
|
|
|
+ newAddData("死亡记录",medDeathNoteList,medrecVoList);
|
|
|
+
|
|
|
+ //疑难病例讨论记录
|
|
|
+ newAddData("疑难病例讨论记录",medDifficultCaseList,medrecVoList);
|
|
|
+
|
|
|
+ //首次病程录
|
|
|
+ newAddData("首次病程录",medFirstRecordList,medrecVoList);
|
|
|
+
|
|
|
+ //病危通知单
|
|
|
+ newAddData("病危通知单",medIllCriticallyList,medrecVoList);
|
|
|
+
|
|
|
+ //病重通知单
|
|
|
+ newAddData("病重通知单",medIllSeriouslList,medrecVoList);
|
|
|
+
|
|
|
+ //出院小结
|
|
|
+ newAddData("出院小结",medLeaveHospitalList,medrecVoList);
|
|
|
+
|
|
|
+ //术后首程
|
|
|
+ newAddData("术后首程",medOperativeFirstRecordList,medrecVoList);
|
|
|
+
|
|
|
+ //手术记录
|
|
|
+ newAddData("手术记录",medOperativeNoteList,medrecVoList);
|
|
|
+
|
|
|
+ //阶段小结
|
|
|
+ newAddData("阶段小结",medPeriodConclusionList,medrecVoList);
|
|
|
+
|
|
|
+ //术前讨论小结
|
|
|
+ newAddData("术前讨论小结",medPreoperativeDiscussionList,medrecVoList);
|
|
|
+
|
|
|
+ //抢救记录
|
|
|
+ newAddData("抢救记录",medRescueNoteList,medrecVoList);
|
|
|
+
|
|
|
+ //转入记录
|
|
|
+ newAddData("转入记录",medTransferInNoteList,medrecVoList);
|
|
|
+
|
|
|
+ //转出记录
|
|
|
+ newAddData("转出记录",medTransferOutNoteList,medrecVoList);
|
|
|
+
|
|
|
+ //查房记录
|
|
|
+ newAddData("查房记录",medWardRecordList,medrecVoList);
|
|
|
+
|
|
|
+
|
|
|
// 会诊记录
|
|
|
- addDataWithKey("会诊", recMap, medrecVoList,
|
|
|
- Arrays.asList("会诊记录", "会诊结果单", "会诊申请单"));
|
|
|
+// addDataWithKey("会诊", recMap, medrecVoList,
|
|
|
+// Arrays.asList("会诊记录", "会诊结果单", "会诊申请单"));
|
|
|
|
|
|
// 手术
|
|
|
- addDataWithKey("手术", recMap, medrecVoList,
|
|
|
- Arrays.asList("术后首次病程及谈话记录", "手术记录",
|
|
|
- "术前讨论、术前小结", "手术知情同意书", "手术安全核查表"));
|
|
|
+ /**
|
|
|
+ * "手术知情同意书", "手术安全核查表" 谈话记录表现有表格没有
|
|
|
+ */
|
|
|
+// addDataWithKey("手术", recMap, medrecVoList,
|
|
|
+// Arrays.asList("术后首次病程及谈话记录", "手术记录",
|
|
|
+// "术前讨论、术前小结", "手术知情同意书", "手术安全核查表"));
|
|
|
|
|
|
// 转科
|
|
|
- addDataWithKey("转科", recMap, medrecVoList,
|
|
|
- Arrays.asList("转入记录", "转出记录"));
|
|
|
-
|
|
|
- addData("入院记录", recMap, medrecVoList);
|
|
|
- addData("病危通知书", recMap, medrecVoList);
|
|
|
- addData("阶段小结", recMap, medrecVoList);
|
|
|
- addData("抢救记录", recMap, medrecVoList);
|
|
|
- addData("查房记录", recMap, medrecVoList);
|
|
|
- addData("首次病程录", recMap, medrecVoList);
|
|
|
- addData("输血/血制品病程记录", recMap, medrecVoList);
|
|
|
- addData("输血后效果评价", recMap, medrecVoList);
|
|
|
- addData("死亡病例讨论记录", recMap, medrecVoList);
|
|
|
- addData("死亡记录", recMap, medrecVoList);
|
|
|
- addData("危急值记录", recMap, medrecVoList);
|
|
|
- addData("出院小结", recMap, medrecVoList);
|
|
|
- addData("疑难病例讨论记录", recMap, medrecVoList);
|
|
|
- addData("输血后效果评价", recMap, medrecVoList);
|
|
|
- addData("病理检验送检单", recMap, medrecVoList);
|
|
|
- addData("日常病程录", recMap, medrecVoList);
|
|
|
-
|
|
|
- addDataWithInnerKey("知情同意书", recMap, medrecVoList);
|
|
|
- addDataWithInnerKey("谈话告知书", recMap, medrecVoList);
|
|
|
+
|
|
|
+// addDataWithKey("转科", recMap, medrecVoList,
|
|
|
+// Arrays.asList("转入记录", "转出记录"));
|
|
|
+
|
|
|
+ // addData("入院记录", recMap, medrecVoList);
|
|
|
+
|
|
|
+ // addData("病危通知书", recMap, medrecVoList);
|
|
|
+
|
|
|
+ // addData("阶段小结", recMap, medrecVoList);
|
|
|
+
|
|
|
+ // addData("抢救记录", recMap, medrecVoList);
|
|
|
+
|
|
|
+ // addData("查房记录", recMap, medrecVoList);
|
|
|
+
|
|
|
+ // addData("首次病程录", recMap, medrecVoList);
|
|
|
+ /**
|
|
|
+ * ?
|
|
|
+ */
|
|
|
+ // addData("输血/血制品病程记录", recMap, medrecVoList);
|
|
|
+
|
|
|
+ // addData("输血后效果评价", recMap, medrecVoList);
|
|
|
+
|
|
|
+ // addData("死亡病例讨论记录", recMap, medrecVoList);
|
|
|
+
|
|
|
+ // addData("死亡记录", recMap, medrecVoList);
|
|
|
+
|
|
|
+ // addData("危急值记录", recMap, medrecVoList);
|
|
|
+
|
|
|
+ // addData("出院小结", recMap, medrecVoList);
|
|
|
+
|
|
|
+ // addData("疑难病例讨论记录", recMap, medrecVoList);
|
|
|
+ /**
|
|
|
+ * ?
|
|
|
+ */
|
|
|
+ // addData("输血后效果评价", recMap, medrecVoList);
|
|
|
+ /**
|
|
|
+ * ?
|
|
|
+ */
|
|
|
+ // addData("病理检验送检单", recMap, medrecVoList);
|
|
|
+ /**
|
|
|
+ * 是首次病程录么?
|
|
|
+ */
|
|
|
+ // addData("日常病程录", recMap, medrecVoList);
|
|
|
+ /**
|
|
|
+ * ?
|
|
|
+ */
|
|
|
+ // addDataWithInnerKey("知情同意书", recMap, medrecVoList);
|
|
|
+ /**
|
|
|
+ * ?
|
|
|
+ */
|
|
|
+ // addDataWithInnerKey("谈话告知书", recMap, medrecVoList);
|
|
|
|
|
|
// 医嘱
|
|
|
if (ListUtil.isNotEmpty(doctorAdviceList)) {
|
|
@@ -555,8 +896,8 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
|
|
|
// 计算分值并保存结果至数据库
|
|
|
Map<String, Object> resMap = calScoreAndSave(outputInfo, codeList, codeToInfoMap, analyzeVO, queryVo.getBehospitalInfo().getIsPlacefile());
|
|
|
- AlgorithmDTO algorithmDTO = (AlgorithmDTO)resMap.get("algorithmDTO");
|
|
|
- Date date = (Date)resMap.get("date");
|
|
|
+ AlgorithmDTO algorithmDTO = (AlgorithmDTO) resMap.get("algorithmDTO");
|
|
|
+ Date date = (Date) resMap.get("date");
|
|
|
|
|
|
// 返回提示信息
|
|
|
// List<MsgDTO> msgDTOList = getMsg(analyzeVO);
|
|
@@ -595,6 +936,23 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 1.5.0拼接数据
|
|
|
+ *
|
|
|
+ * @param key
|
|
|
+ * @param objectData
|
|
|
+ * @param medrecVoList
|
|
|
+ */
|
|
|
+ public void newAddData(String key, Object objectData, List<MedrecVo> medrecVoList) {
|
|
|
+ if (ObjectUtils.isNotEmpty(objectData)) {
|
|
|
+ MedrecVo medrecVo = new MedrecVo();
|
|
|
+ medrecVo.setTitle(key);
|
|
|
+ Map<String, Object> content = new HashMap<>();
|
|
|
+ content.put("content", objectData);
|
|
|
+ medrecVo.setContent(content);
|
|
|
+ medrecVoList.add(medrecVo);
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
/**
|
|
|
* 拼接数据(例如:手术)
|
|
@@ -671,13 +1029,18 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
medrecVo.setTitle(key);
|
|
|
Map<String, Object> content = new HashMap<>();
|
|
|
List<String> contents = new ArrayList<>();
|
|
|
-
|
|
|
+//通过字典里面的分组,确定所需字段来过滤数据
|
|
|
+ //通用封装格式,采用List<T> list
|
|
|
for (T bean : list) {
|
|
|
try {
|
|
|
Map<String, String> res = new HashMap<>();
|
|
|
+// 将对象转化为kv格式,方便处理字段
|
|
|
Map<String, Object> objectMap = MapUtil.objectToMap(bean);
|
|
|
+ //遍历查出数据所有字段
|
|
|
for (String objKey : objectMap.keySet()) {
|
|
|
+ //分组1 所需要展示的所有字段 过滤一部分数据
|
|
|
if (map.get(objKey) != null) {
|
|
|
+// 目标数据的时间格式转化 为字符串
|
|
|
if (dateList.contains(objKey)) {
|
|
|
Date date = (Date) objectMap.get(objKey);
|
|
|
res.put(map.get(objKey), DateUtil.formatDateTime(date).replaceAll("null", ""));
|
|
@@ -1139,7 +1502,7 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
ExcelUtils.exportExcelUser(res, null, "sheet1", ExportExcelDTO.class, fileName, response);
|
|
|
}
|
|
|
|
|
|
- private void exportQcresultVOSet(ExportQcresultVO exportQcresultVO){
|
|
|
+ private void exportQcresultVOSet(ExportQcresultVO exportQcresultVO) {
|
|
|
//入参验证
|
|
|
long interval = 7 * 24 * 60 * 60 * 1000;
|
|
|
//入院时间
|
|
@@ -1175,8 +1538,8 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
/**
|
|
|
* 设置共用code数据
|
|
|
*
|
|
|
- * @param outputInfo 质控出参数据
|
|
|
- * @param codeList 质控编码列表
|
|
|
+ * @param outputInfo 质控出参数据
|
|
|
+ * @param codeList 质控编码列表
|
|
|
* @param codeToInfoMap 质控编码对应的info信息
|
|
|
*/
|
|
|
public void setCodeData(OutputInfo outputInfo, List<String> codeList, Map<String, String> codeToInfoMap) {
|
|
@@ -1194,10 +1557,10 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
/**
|
|
|
* 计算分值并保存结果至数据库
|
|
|
*
|
|
|
- * @param outputInfo 质控出参数据
|
|
|
- * @param codeList 质控编码列表
|
|
|
+ * @param outputInfo 质控出参数据
|
|
|
+ * @param codeList 质控编码列表
|
|
|
* @param codeToInfoMap 质控编码对应的info信息
|
|
|
- * @param analyzeVO 入参
|
|
|
+ * @param analyzeVO 入参
|
|
|
* @return
|
|
|
*/
|
|
|
public Map<String, Object> calScoreAndSave(OutputInfo outputInfo, List<String> codeList,
|
|
@@ -1282,10 +1645,10 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
* @param analyzeCdsVO
|
|
|
* @return
|
|
|
*/
|
|
|
- public Map<String,String> analyzeCds(AnalyzeCdsVO analyzeCdsVO) {
|
|
|
- Map<String,String> ret = Maps.newHashMap();
|
|
|
+ public Map<String, String> analyzeCds(AnalyzeCdsVO analyzeCdsVO) {
|
|
|
+ Map<String, String> ret = Maps.newHashMap();
|
|
|
List<QcCasesEntryDTO> qcCasesEntryDTOList = qcCasesEntryFacade.getQcCasesEntryCds(analyzeCdsVO);
|
|
|
- Map<String,String> codeMsgMap = qcCasesEntryDTOList.stream().collect(Collectors.toMap(i->i.getCode(),i->i.getMsg()));
|
|
|
+ Map<String, String> codeMsgMap = qcCasesEntryDTOList.stream().collect(Collectors.toMap(i -> i.getCode(), i -> i.getMsg()));
|
|
|
|
|
|
QueryVo queryVo = new QueryVo();
|
|
|
queryVo.setCid(basHospitalInfoFacade.getHosCode(analyzeCdsVO.getHospitalId())); // 设置医院编码
|
|
@@ -1331,8 +1694,8 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
}
|
|
|
|
|
|
OutputInfo outputInfo = response.getData();
|
|
|
- outputInfo.getResult().keySet().forEach(key->{
|
|
|
- ret.put(codeMsgMap.get(key),outputInfo.getResult().get(key).get("info"));
|
|
|
+ outputInfo.getResult().keySet().forEach(key -> {
|
|
|
+ ret.put(codeMsgMap.get(key), outputInfo.getResult().get(key).get("info"));
|
|
|
});
|
|
|
|
|
|
return ret;
|