|
@@ -312,7 +312,7 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
.eq("hospital_id", hospitalId)
|
|
|
.eq("behospital_code", analyzeVO.getBehospitalCode())
|
|
|
- .select("whole_data")
|
|
|
+ .select("whole_data", "rec_id", "hospital_id")
|
|
|
.orderByAsc("behospital_date")
|
|
|
);
|
|
|
|
|
@@ -321,7 +321,7 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
.eq("hospital_id", hospitalId)
|
|
|
.eq("behospital_code", analyzeVO.getBehospitalCode())
|
|
|
- .select("whole_data")
|
|
|
+ .select("whole_data", "rec_id", "hospital_id")
|
|
|
.orderByAsc("behospital_date")
|
|
|
);
|
|
|
|
|
@@ -330,7 +330,7 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
.eq("hospital_id", hospitalId)
|
|
|
.eq("behospital_code", analyzeVO.getBehospitalCode())
|
|
|
- .select("whole_data")
|
|
|
+ .select("whole_data", "rec_id", "hospital_id")
|
|
|
.orderByAsc("behospital_date")
|
|
|
);
|
|
|
// 入院记录
|
|
@@ -338,7 +338,7 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
.eq("hospital_id", hospitalId)
|
|
|
.eq("behospital_code", analyzeVO.getBehospitalCode())
|
|
|
- .select("whole_data")
|
|
|
+ .select("whole_data", "rec_id", "hospital_id")
|
|
|
.orderByAsc("behospital_date")
|
|
|
);
|
|
|
|
|
@@ -347,7 +347,7 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
.eq("hospital_id", hospitalId)
|
|
|
.eq("behospital_code", analyzeVO.getBehospitalCode())
|
|
|
- .select("whole_data")
|
|
|
+ .select("whole_data", "rec_id", "hospital_id")
|
|
|
.orderByAsc("rec_date")
|
|
|
);
|
|
|
|
|
@@ -356,7 +356,7 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
.eq("hospital_id", hospitalId)
|
|
|
.eq("behospital_code", analyzeVO.getBehospitalCode())
|
|
|
- .select("whole_data")
|
|
|
+ .select("whole_data", "rec_id", "hospital_id")
|
|
|
.orderByAsc("rec_date")
|
|
|
);
|
|
|
|
|
@@ -365,7 +365,7 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
.eq("hospital_id", hospitalId)
|
|
|
.eq("behospital_code", analyzeVO.getBehospitalCode())
|
|
|
- .select("whole_data")
|
|
|
+ .select("whole_data", "rec_id", "hospital_id")
|
|
|
.orderByAsc("rec_date")
|
|
|
);
|
|
|
|
|
@@ -374,7 +374,7 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
.eq("hospital_id", hospitalId)
|
|
|
.eq("behospital_code", analyzeVO.getBehospitalCode())
|
|
|
- .select("whole_data")
|
|
|
+ .select("whole_data", "rec_id", "hospital_id")
|
|
|
.orderByAsc("rec_date")
|
|
|
);
|
|
|
|
|
@@ -383,7 +383,7 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
.eq("hospital_id", hospitalId)
|
|
|
.eq("behospital_code", analyzeVO.getBehospitalCode())
|
|
|
- .select("whole_data")
|
|
|
+ .select("whole_data", "rec_id", "hospital_id")
|
|
|
.orderByAsc("death_date")
|
|
|
);
|
|
|
|
|
@@ -392,7 +392,7 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
.eq("hospital_id", hospitalId)
|
|
|
.eq("behospital_code", analyzeVO.getBehospitalCode())
|
|
|
- .select("whole_data")
|
|
|
+ .select("whole_data", "rec_id", "hospital_id")
|
|
|
.orderByAsc("rec_date")
|
|
|
);
|
|
|
|
|
@@ -401,7 +401,7 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
.eq("hospital_id", hospitalId)
|
|
|
.eq("behospital_code", analyzeVO.getBehospitalCode())
|
|
|
- .select("whole_data")
|
|
|
+ .select("whole_data", "rec_id", "hospital_id")
|
|
|
.orderByAsc("rec_date")
|
|
|
);
|
|
|
|
|
@@ -410,7 +410,7 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
.eq("hospital_id", hospitalId)
|
|
|
.eq("behospital_code", analyzeVO.getBehospitalCode())
|
|
|
- .select("whole_data")
|
|
|
+ .select("whole_data", "rec_id", "hospital_id")
|
|
|
.orderByAsc("doctor_sign_date")
|
|
|
);
|
|
|
|
|
@@ -419,7 +419,7 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
.eq("hospital_id", hospitalId)
|
|
|
.eq("behospital_code", analyzeVO.getBehospitalCode())
|
|
|
- .select("whole_data")
|
|
|
+ .select("whole_data", "rec_id", "hospital_id")
|
|
|
.orderByAsc("doctor_sign_date")
|
|
|
);
|
|
|
|
|
@@ -428,7 +428,7 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
.eq("hospital_id", hospitalId)
|
|
|
.eq("behospital_code", analyzeVO.getBehospitalCode())
|
|
|
- .select("whole_data")
|
|
|
+ .select("whole_data", "rec_id", "hospital_id")
|
|
|
.orderByAsc("leave_hospital_date")
|
|
|
);
|
|
|
|
|
@@ -437,7 +437,7 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
.eq("hospital_id", hospitalId)
|
|
|
.eq("behospital_code", analyzeVO.getBehospitalCode())
|
|
|
- .select("whole_data")
|
|
|
+ .select("whole_data", "rec_id", "hospital_id")
|
|
|
.orderByAsc("rec_date")
|
|
|
);
|
|
|
|
|
@@ -446,7 +446,7 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
.eq("hospital_id", hospitalId)
|
|
|
.eq("behospital_code", analyzeVO.getBehospitalCode())
|
|
|
- .select("whole_data")
|
|
|
+ .select("whole_data", "rec_id", "hospital_id")
|
|
|
.orderByAsc("rec_date")
|
|
|
);
|
|
|
|
|
@@ -455,7 +455,7 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
.eq("hospital_id", hospitalId)
|
|
|
.eq("behospital_code", analyzeVO.getBehospitalCode())
|
|
|
- .select("whole_data")
|
|
|
+ .select("whole_data", "rec_id", "hospital_id")
|
|
|
.orderByAsc("rec_date")
|
|
|
);
|
|
|
|
|
@@ -464,7 +464,7 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
.eq("hospital_id", hospitalId)
|
|
|
.eq("behospital_code", analyzeVO.getBehospitalCode())
|
|
|
- .select("whole_data")
|
|
|
+ .select("whole_data", "rec_id", "hospital_id")
|
|
|
.orderByAsc("rec_date")
|
|
|
);
|
|
|
|
|
@@ -473,7 +473,7 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
.eq("hospital_id", hospitalId)
|
|
|
.eq("behospital_code", analyzeVO.getBehospitalCode())
|
|
|
- .select("whole_data")
|
|
|
+ .select("whole_data", "rec_id", "hospital_id")
|
|
|
.orderByAsc("rec_date")
|
|
|
);
|
|
|
|
|
@@ -482,7 +482,7 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
.eq("hospital_id", hospitalId)
|
|
|
.eq("behospital_code", analyzeVO.getBehospitalCode())
|
|
|
- .select("whole_data")
|
|
|
+ .select("whole_data", "rec_id", "hospital_id")
|
|
|
.orderByAsc("transfer_in_date")
|
|
|
);
|
|
|
|
|
@@ -491,7 +491,7 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
.eq("hospital_id", hospitalId)
|
|
|
.eq("behospital_code", analyzeVO.getBehospitalCode())
|
|
|
- .select("whole_data")
|
|
|
+ .select("whole_data", "rec_id", "hospital_id")
|
|
|
.orderByAsc("transfer_in_date")
|
|
|
);
|
|
|
|
|
@@ -500,7 +500,7 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
.eq("hospital_id", hospitalId)
|
|
|
.eq("behospital_code", analyzeVO.getBehospitalCode())
|
|
|
- .select("whole_data")
|
|
|
+ .select("whole_data", "rec_id", "hospital_id")
|
|
|
.orderByAsc("rec_date")
|
|
|
);
|
|
|
// -------------------------------------文书数据改造结束----------------------------------
|
|
@@ -577,7 +577,7 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
|
|
|
|
|
|
// 化验
|
|
|
- //使用sql进行关联优化数据查询
|
|
|
+ //使用sql进行关联优化数据查询
|
|
|
List<MedLisResultDTO> medLisResultListDTO = medLisResultFacade.getMedLisResultList(behospitalInfoList.get(0));
|
|
|
List<MedLisResult> medLisResultList = new ArrayList<>();
|
|
|
for (MedLisResultDTO medLisResultSingle : medLisResultListDTO) {
|
|
@@ -588,7 +588,7 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
}
|
|
|
|
|
|
// 辅检
|
|
|
- //使用sql进行关联优化数据查询
|
|
|
+ //使用sql进行关联优化数据查询
|
|
|
List<MedPacsResult> medPacsResultList = medPacsResultFacade.getMedPacsResultList(behospitalInfoList.get(0));
|
|
|
|
|
|
|
|
@@ -602,181 +602,173 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
|
|
|
//会诊申请单
|
|
|
if (ListUtil.isNotEmpty(medConsultationApplyList)) {
|
|
|
- newAddData("会诊申请单", medConsultationApplyList, recMap,medrecVoList);
|
|
|
- }else{
|
|
|
+ newAddData("会诊申请单", medConsultationApplyList, recMap, medrecVoList);
|
|
|
+ } else {
|
|
|
addDataWithKey("会诊申请单", recMap, medrecVoList,
|
|
|
Arrays.asList("会诊申请单"));
|
|
|
}
|
|
|
-/*
|
|
|
//会诊结果单
|
|
|
if (ListUtil.isNotEmpty(medConsultationResultList)) {
|
|
|
- newAddData("会诊结果单", medConsultationResultList, medrecVoList);
|
|
|
- }else{
|
|
|
+ newAddData("会诊结果单", medConsultationResultList, recMap, medrecVoList);
|
|
|
+ } else {
|
|
|
addDataWithKey("会诊结果单", recMap, medrecVoList,
|
|
|
Arrays.asList("会诊记录", "会诊结果单", "会诊申请单"));
|
|
|
}
|
|
|
|
|
|
//会诊单(申请和结果)
|
|
|
if (ListUtil.isNotEmpty(medConsultationNoteList)) {
|
|
|
- newAddData("会诊单(申请和结果)", medConsultationNoteList, medrecVoList);
|
|
|
+ newAddData("会诊单(申请和结果)", medConsultationNoteList, recMap, medrecVoList);
|
|
|
}
|
|
|
//入院记录
|
|
|
if (ListUtil.isNotEmpty(medAdmissionNoteList)) {
|
|
|
- newAddData("入院记录", medAdmissionNoteList, medrecVoList);
|
|
|
- }else{
|
|
|
+ newAddData("入院记录", medAdmissionNoteList, recMap, medrecVoList);
|
|
|
+ } else {
|
|
|
addData("入院记录", recMap, medrecVoList);
|
|
|
}
|
|
|
|
|
|
//输血效果评价
|
|
|
if (ListUtil.isNotEmpty(medBloodResultList)) {
|
|
|
- newAddData("输血效果评价", medBloodResultList, medrecVoList);
|
|
|
- }else{
|
|
|
+ newAddData("输血效果评价", medBloodResultList, recMap, medrecVoList);
|
|
|
+ } else {
|
|
|
addData("输血后效果评价", recMap, medrecVoList);
|
|
|
}
|
|
|
|
|
|
//输血记录
|
|
|
if (ListUtil.isNotEmpty(medBloodTransfusionList)) {
|
|
|
- newAddData("输血记录", medBloodTransfusionList, medrecVoList);
|
|
|
+ newAddData("输血记录", medBloodTransfusionList, recMap, medrecVoList);
|
|
|
+ } else {
|
|
|
+ addData("输血/血制品病程记录", recMap, medrecVoList);
|
|
|
}
|
|
|
|
|
|
+
|
|
|
//危急值记录
|
|
|
if (ListUtil.isNotEmpty(medCrisisNoteList)) {
|
|
|
- newAddData("危急值记录", medCrisisNoteList, medrecVoList);
|
|
|
- }else{
|
|
|
+ newAddData("危急值记录", medCrisisNoteList, recMap, medrecVoList);
|
|
|
+ } else {
|
|
|
addData("危急值记录", recMap, medrecVoList);
|
|
|
}
|
|
|
|
|
|
//死亡病例讨论记录
|
|
|
if (ListUtil.isNotEmpty(medDeathDiscussionList)) {
|
|
|
- newAddData("死亡病例讨论记录", medDeathDiscussionList, medrecVoList);
|
|
|
- }else{
|
|
|
+ newAddData("死亡病例讨论记录", medDeathDiscussionList, recMap, medrecVoList);
|
|
|
+ } else {
|
|
|
addData("死亡病例讨论记录", recMap, medrecVoList);
|
|
|
}
|
|
|
|
|
|
//死亡记录
|
|
|
if (ListUtil.isNotEmpty(medDeathNoteList)) {
|
|
|
- newAddData("死亡记录", medDeathNoteList, medrecVoList);
|
|
|
- }else{
|
|
|
+ newAddData("死亡记录", medDeathNoteList, recMap, medrecVoList);
|
|
|
+ } else {
|
|
|
addData("死亡记录", recMap, medrecVoList);
|
|
|
}
|
|
|
|
|
|
//疑难病例讨论记录
|
|
|
if (ListUtil.isNotEmpty(medDifficultCaseList)) {
|
|
|
- newAddData("疑难病例讨论记录", medDifficultCaseList, medrecVoList);
|
|
|
- }else{
|
|
|
+ newAddData("疑难病例讨论记录", medDifficultCaseList, recMap, medrecVoList);
|
|
|
+ } else {
|
|
|
addData("疑难病例讨论记录", recMap, medrecVoList);
|
|
|
}
|
|
|
|
|
|
//首次病程录
|
|
|
if (ListUtil.isNotEmpty(medFirstRecordList)) {
|
|
|
- newAddData("首次病程录", medFirstRecordList, medrecVoList);
|
|
|
- }else{
|
|
|
+ newAddData("首次病程录", medFirstRecordList, recMap, medrecVoList);
|
|
|
+ } else {
|
|
|
addData("首次病程录", recMap, medrecVoList);
|
|
|
}
|
|
|
|
|
|
//病危通知单
|
|
|
if (ListUtil.isNotEmpty(medIllCriticallyList)) {
|
|
|
- newAddData("病危通知单", medIllCriticallyList, medrecVoList);
|
|
|
- }else{
|
|
|
+ newAddData("病危通知单", medIllCriticallyList, recMap, medrecVoList);
|
|
|
+ } else {
|
|
|
addData("病危通知书", recMap, medrecVoList);
|
|
|
}
|
|
|
|
|
|
//病重通知单
|
|
|
if (ListUtil.isNotEmpty(medIllSeriouslList)) {
|
|
|
- newAddData("病重通知单", medIllSeriouslList, medrecVoList);
|
|
|
+ newAddData("病重通知单", medIllSeriouslList, recMap, medrecVoList);
|
|
|
+ } else {
|
|
|
+ addData("病重通知书", recMap, medrecVoList);
|
|
|
}
|
|
|
|
|
|
//出院小结
|
|
|
if (ListUtil.isNotEmpty(medLeaveHospitalList)) {
|
|
|
- newAddData("出院小结", medLeaveHospitalList, medrecVoList);
|
|
|
- }else{
|
|
|
+ newAddData("出院小结", medLeaveHospitalList, recMap, medrecVoList);
|
|
|
+ } else {
|
|
|
addData("出院小结", recMap, medrecVoList);
|
|
|
}
|
|
|
|
|
|
//术后首程
|
|
|
if (ListUtil.isNotEmpty(medOperativeFirstRecordList)) {
|
|
|
- newAddData("术后首程", medOperativeFirstRecordList, medrecVoList);
|
|
|
+ newAddData("术后首程", medOperativeFirstRecordList, recMap, medrecVoList);
|
|
|
+ } else {
|
|
|
+ addDataWithKey("术后首次病程及谈话记录", recMap, medrecVoList,
|
|
|
+ Arrays.asList("术后首次病程及谈话记录"));
|
|
|
}
|
|
|
|
|
|
//手术记录
|
|
|
if (ListUtil.isNotEmpty(medOperativeNoteList)) {
|
|
|
- newAddData("手术记录", medOperativeNoteList, medrecVoList);
|
|
|
+ newAddData("手术记录", medOperativeNoteList, recMap, medrecVoList);
|
|
|
+ } else {
|
|
|
+ addDataWithKey("手术记录", recMap, medrecVoList,
|
|
|
+ Arrays.asList("手术记录"));
|
|
|
}
|
|
|
|
|
|
//阶段小结
|
|
|
if (ListUtil.isNotEmpty(medPeriodConclusionList)) {
|
|
|
- newAddData("阶段小结", medPeriodConclusionList, medrecVoList);
|
|
|
- }else{
|
|
|
+ newAddData("阶段小结", medPeriodConclusionList, recMap, medrecVoList);
|
|
|
+ } else {
|
|
|
addData("阶段小结", recMap, medrecVoList);
|
|
|
}
|
|
|
|
|
|
//术前讨论小结
|
|
|
if (ListUtil.isNotEmpty(medPreoperativeDiscussionList)) {
|
|
|
- newAddData("术前讨论小结", medPreoperativeDiscussionList, medrecVoList);
|
|
|
+ newAddData("术前讨论小结", medPreoperativeDiscussionList, recMap, medrecVoList);
|
|
|
+ } else {
|
|
|
+ addDataWithKey("术前讨论、术前小结", recMap, medrecVoList,
|
|
|
+ Arrays.asList("术前讨论、术前小结"));
|
|
|
}
|
|
|
|
|
|
+
|
|
|
//抢救记录
|
|
|
if (ListUtil.isNotEmpty(medRescueNoteList)) {
|
|
|
- newAddData("抢救记录", medRescueNoteList, medrecVoList);
|
|
|
- }else{
|
|
|
+ newAddData("抢救记录", medRescueNoteList, recMap, medrecVoList);
|
|
|
+ } else {
|
|
|
addData("抢救记录", recMap, medrecVoList);
|
|
|
}
|
|
|
|
|
|
//转入记录
|
|
|
if (ListUtil.isNotEmpty(medTransferInNoteList)) {
|
|
|
- newAddData("转入记录", medTransferInNoteList, medrecVoList);
|
|
|
- }else{
|
|
|
+ newAddData("转入记录", medTransferInNoteList, recMap, medrecVoList);
|
|
|
+ } else {
|
|
|
addDataWithKey("转入记录", recMap, medrecVoList,
|
|
|
Arrays.asList("转入记录"));
|
|
|
}
|
|
|
|
|
|
//转出记录
|
|
|
if (ListUtil.isNotEmpty(medTransferOutNoteList)) {
|
|
|
- newAddData("转出记录", medTransferOutNoteList, medrecVoList);
|
|
|
- }else{
|
|
|
+ newAddData("转出记录", medTransferOutNoteList, recMap, medrecVoList);
|
|
|
+ } else {
|
|
|
addDataWithKey("转出记录", recMap, medrecVoList,
|
|
|
Arrays.asList("转出记录"));
|
|
|
}
|
|
|
|
|
|
//查房记录
|
|
|
if (ListUtil.isNotEmpty(medWardRecordList)) {
|
|
|
- newAddData("查房记录", medWardRecordList, medrecVoList);
|
|
|
- }else{
|
|
|
+ newAddData("查房记录", medWardRecordList, recMap, medrecVoList);
|
|
|
+ } else {
|
|
|
addData("查房记录", recMap, medrecVoList);
|
|
|
- }*/
|
|
|
-
|
|
|
- //==============非结构化表拥有,文书单独查出来====================
|
|
|
-
|
|
|
-// // 会诊记录
|
|
|
-// 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);
|
|
|
+ }
|
|
|
+
|
|
|
+ //==============非结构化表拥有,文书单独查出来====================
|
|
|
+ addDataWithKey("手术知情同意书", recMap, medrecVoList,
|
|
|
+ Arrays.asList("手术知情同意书"));
|
|
|
+
|
|
|
+ addDataWithKey("手术安全核查表", recMap, medrecVoList,
|
|
|
+ Arrays.asList("手术安全核查表"));
|
|
|
+
|
|
|
addData("病理检验送检单", recMap, medrecVoList);
|
|
|
- addData("日常病程录", recMap, medrecVoList);//结构化表名为首次病程录
|
|
|
+
|
|
|
+ addData("日常病程录", recMap, medrecVoList);
|
|
|
|
|
|
addDataWithInnerKey("知情同意书", recMap, medrecVoList);
|
|
|
addDataWithInnerKey("谈话告知书", recMap, medrecVoList);
|
|
@@ -883,17 +875,26 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
*/
|
|
|
public void addData(String key, Map<String, List<RecordContentDTO>> recMap, List<MedrecVo> medrecVoList) {
|
|
|
List<RecordContentDTO> list = recMap.get(key);
|
|
|
- Map<String, List<String>> listMap = new HashMap<>();
|
|
|
if (ListUtil.isNotEmpty(list)) {
|
|
|
MedrecVo medrecVo = new MedrecVo();
|
|
|
- if("输血后效果评价".equals(key)){
|
|
|
- medrecVo.setTitle("输血效果评价");
|
|
|
- }else{
|
|
|
- medrecVo.setTitle(key);
|
|
|
+ String k = key;
|
|
|
+ //确保k值能
|
|
|
+ if ("输血后效果评价".equals(key)) {
|
|
|
+ k = "输血效果评价";
|
|
|
+ }
|
|
|
+ if ("病重通知书".equals(key)) {
|
|
|
+ k = "病重通知单";
|
|
|
+ }
|
|
|
+ if ("病危通知书".equals(key)) {
|
|
|
+ k = "病危通知单";
|
|
|
+ }
|
|
|
+ if ("输血/血制品病程记录".equals(key)) {
|
|
|
+ k = "输血记录";
|
|
|
}
|
|
|
|
|
|
Map<String, Object> content = new HashMap<>();
|
|
|
content.put("content", list);
|
|
|
+ medrecVo.setTitle(k);
|
|
|
medrecVo.setContent(content);
|
|
|
medrecVoList.add(medrecVo);
|
|
|
}
|
|
@@ -909,7 +910,14 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
public void addDataWithKey(String key, Map<String, List<RecordContentDTO>> recMap,
|
|
|
List<MedrecVo> medrecVoList, List<String> keyList) {
|
|
|
MedrecVo medrecVo = new MedrecVo();
|
|
|
- medrecVo.setTitle(key);
|
|
|
+ String m = key;
|
|
|
+ if ("术前讨论、术前小结".equals(key)) {
|
|
|
+ m = "术前讨论小结";
|
|
|
+ }
|
|
|
+ if ("术后首次病程及谈话记录".equals(key)) {
|
|
|
+ m = "术后首程";
|
|
|
+ }
|
|
|
+ medrecVo.setTitle(m);
|
|
|
Map<String, Object> content = new HashMap<>();
|
|
|
Map<String, Object> listMap = new HashMap<>();
|
|
|
Boolean flag = false;
|
|
@@ -920,21 +928,19 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
}
|
|
|
}
|
|
|
if (flag) {
|
|
|
- if(ListUtil.isNotEmpty(keyList)&&keyList.size()==3){
|
|
|
- // 会诊记录特殊处理,有会诊申请单,没有会诊结果单,复制一份到会诊结果单
|
|
|
- if ("会诊记录".equals(key) && listMap.get("会诊申请单") != null
|
|
|
- && listMap.get("会诊结果单") == null) {
|
|
|
- listMap.put("会诊结果单", listMap.get("会诊申请单"));
|
|
|
+ if (ListUtil.isNotEmpty(keyList) && keyList.size() == 3) {
|
|
|
+ // 会诊记录特殊处理,有会诊申请单,没有会诊结果单,复制一份到会诊结果单
|
|
|
+ if (listMap.get("会诊申请单") != null && listMap.get("会诊结果单") == null) {
|
|
|
+ listMap.put("会诊结果单", listMap.get("会诊申请单"));
|
|
|
+ }
|
|
|
+ //只封装会诊结果单数据
|
|
|
+ for (String k : keyList) {
|
|
|
+ if (!"会诊结果单".equals(k) && ListUtil.isNotEmpty(recMap.get(k))) {
|
|
|
+ listMap.remove(k);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
- //只封装会诊结果单数据
|
|
|
-
|
|
|
- for (String k : keyList) {
|
|
|
- if (!"会诊结果单".equals(k)&&ListUtil.isNotEmpty(recMap.get(k))) {
|
|
|
- listMap.remove(k);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- listMap.put("isParsed",0);
|
|
|
+ listMap.put("isParsed", 0);
|
|
|
content.put("content", listMap);
|
|
|
medrecVo.setContent(content);
|
|
|
medrecVoList.add(medrecVo);
|
|
@@ -977,40 +983,78 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
* @param list
|
|
|
* @param medrecVoList
|
|
|
*/
|
|
|
-public <T> void newAddData(String key, List<T> list, Map<String, List<RecordContentDTO>> recMap, List<MedrecVo> medrecVoList) {
|
|
|
- MedrecVo medrecVo = new MedrecVo();
|
|
|
- medrecVo.setTitle(key);
|
|
|
- Map<String, Object> content = new HashMap<>();
|
|
|
- Map<String, Object> listMap = new HashMap<>();
|
|
|
- List<String> contents = new ArrayList<>();
|
|
|
- Boolean flag = false;
|
|
|
- String k = key;
|
|
|
- if("输血效果评价".equals(key)){
|
|
|
- k="输血后效果评价";
|
|
|
- }
|
|
|
- if (ListUtil.isNotEmpty(recMap.get(k))) {
|
|
|
- listMap.put(key, recMap.get(k));
|
|
|
- flag = true;
|
|
|
+ public <T> void newAddData(String key, List<T> list, Map<String, List<RecordContentDTO>> recMap, List<MedrecVo> medrecVoList) {
|
|
|
+ MedrecVo medrecVo = new MedrecVo();
|
|
|
+ medrecVo.setTitle(key);
|
|
|
+ Map<String, Object> content = new HashMap<>();
|
|
|
+ Map<String, Object> listMap = new HashMap<>();
|
|
|
+ List<RePlaceData> contents = new ArrayList<>();
|
|
|
+ List<Map<String, Object>> returnData = new ArrayList<>();
|
|
|
+ String k = key;
|
|
|
+
|
|
|
+ if ("输血效果评价".equals(key)) {
|
|
|
+ k = "输血后效果评价";
|
|
|
}
|
|
|
- for (T bean : list) {
|
|
|
- try {
|
|
|
- Map<String, Object> objectMap = MapUtil.objectToMap(bean);
|
|
|
- String jsonStr = (String) objectMap.get("wholeData");
|
|
|
- contents.add(jsonStr);
|
|
|
- } catch (Exception e) {
|
|
|
- e.printStackTrace();
|
|
|
+ if ("病危通知单".equals(key)) {
|
|
|
+ k = "病危通知书";
|
|
|
+ }
|
|
|
+ if ("病重通知单".equals(key)) {
|
|
|
+ k = "病重通知书";
|
|
|
+ }
|
|
|
+ if ("术后首程".equals(key)) {
|
|
|
+ k = "术后首次病程及谈话记录";
|
|
|
+ }
|
|
|
+ if ("术前讨论小结".equals(key)) {
|
|
|
+ k = "术前讨论、术前小结";
|
|
|
+ }
|
|
|
+ if ("输血记录".equals(key)) {
|
|
|
+ k = "输血/血制品病程记录";
|
|
|
}
|
|
|
- }
|
|
|
|
|
|
- if (flag) {
|
|
|
+ //从结构化表中取出应用数据
|
|
|
+ for (T bean : list) {
|
|
|
+ try {
|
|
|
+ RePlaceData rePlaceData = new RePlaceData();
|
|
|
+ Map<String, Object> objectMap = MapUtil.objectToMap(bean);
|
|
|
+ String recId = (String) objectMap.get("recId");
|
|
|
+ rePlaceData.setRecId(recId);
|
|
|
+ Long hospitalId = (Long) objectMap.get("hospitalId");
|
|
|
+ rePlaceData.setHospitalId(hospitalId);
|
|
|
+ String jsonData = (String) objectMap.get("wholeData");
|
|
|
+ rePlaceData.setJsonData(jsonData);
|
|
|
+ contents.add(rePlaceData);
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
- listMap.put("isParsed",1);
|
|
|
- content.put("content", listMap);
|
|
|
- medrecVo.setContent(content);
|
|
|
- medrecVoList.add(medrecVo);
|
|
|
+ //将文书xml替换成结构化数据
|
|
|
+ if (ListUtil.isNotEmpty(recMap.get(k))) {
|
|
|
+ List<RecordContentDTO> recordContentDTOS = recMap.get(k);
|
|
|
+ for (RecordContentDTO recordContentDTO : recordContentDTOS) {
|
|
|
+ if (ListUtil.isNotEmpty(contents)) {
|
|
|
+ for (RePlaceData rePlaceData : contents) {
|
|
|
+ if (StringUtil.isNotEmpty(recordContentDTO.getRecId()) &&
|
|
|
+ rePlaceData.getRecId().equals(recordContentDTO.getRecId()) &&
|
|
|
+ rePlaceData.getHospitalId().equals(recordContentDTO.getHospitalId())) {
|
|
|
+ recordContentDTO.setXmlText(rePlaceData.getJsonData());
|
|
|
+ recordContentDTO.setIsParsed(1);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ try {
|
|
|
+ Map<String, Object> objectMap = MapUtil.objectToMap(recordContentDTO);
|
|
|
+ returnData.add(objectMap);
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ listMap.put(key, returnData);
|
|
|
+ content.put("content", listMap);
|
|
|
+ medrecVo.setContent(content);
|
|
|
+ medrecVoList.add(medrecVo);
|
|
|
+ }
|
|
|
}
|
|
|
-}
|
|
|
-
|
|
|
|
|
|
|
|
|
/**
|