|
|
@ -201,12 +201,22 @@ public class PmsTreatmentServiceImpl implements PmsTreatmentService { |
|
|
|
List<Object> commonFollowupQueue = redisCache.getCacheList("common_followup_queue"); |
|
|
|
for (PmsTreatmentVo.TreatmentVO treatmentVO : query) { |
|
|
|
PmsTreatmentRecordExample pmsTreatmentRecordExample = new PmsTreatmentRecordExample(); |
|
|
|
pmsTreatmentRecordExample.createCriteria().andDelFlagEqualTo((byte) 0).andQuestionCodeEqualTo("JBXX_ZYZD").andTreatmentIdEqualTo(treatmentVO.getId()); |
|
|
|
pmsTreatmentRecordExample.createCriteria().andDelFlagEqualTo((byte) 0).andQuestionCodeIn(CollectionUtil.newArrayList("JBXX_ZYZD", "JBXX_ZYZD_QT")).andTreatmentIdEqualTo(treatmentVO.getId()); |
|
|
|
List<PmsTreatmentRecord> pmsTreatmentRecords = pmsTreatmentRecordMapper.selectByExample(pmsTreatmentRecordExample); |
|
|
|
if (CollectionUtil.isNotEmpty(pmsTreatmentRecords)) { |
|
|
|
String answer = pmsTreatmentRecords.get(0).getAnswer(); |
|
|
|
if (StrUtil.isNotEmpty(answer)) { |
|
|
|
treatmentVO.setDiagnosisName(answer.replace("!@#", ",")); |
|
|
|
for (PmsTreatmentRecord pmsTreatmentRecord : pmsTreatmentRecords) { |
|
|
|
if ("JBXX_ZYZD".equals(pmsTreatmentRecord.getQuestionCode())) { |
|
|
|
String answer = pmsTreatmentRecord.getAnswer(); |
|
|
|
if (StrUtil.isNotEmpty(answer)) { |
|
|
|
treatmentVO.setDiagnosisName(answer.replace("!@#", ",")); |
|
|
|
} |
|
|
|
} |
|
|
|
if ("JBXX_ZYZD_QT".equals(pmsTreatmentRecord.getQuestionCode())) { |
|
|
|
String answer = pmsTreatmentRecord.getAnswer(); |
|
|
|
if (StrUtil.isNotEmpty(answer)) { |
|
|
|
treatmentVO.setZyzdQt(answer.replace("!@#", ",")); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
List<PmsTreatmentVo.TreatmentVO.QueueVo> queueVos = fmsFollowupDao.queryQueueListByPatientId(treatmentVO.getPatientId()); |
|
|
@ -461,12 +471,14 @@ public class PmsTreatmentServiceImpl implements PmsTreatmentService { |
|
|
|
} |
|
|
|
} |
|
|
|
writer.writeCellValue(8, row, treatmentVOList.get(i).getIdCard()); |
|
|
|
writer.writeCellValue(9, row, treatmentVOList.get(i).getVisitType() == 0 ? "门诊" : "住院"); |
|
|
|
writer.writeCellValue(10, row, treatmentVOList.get(i).getVisitNumber()); |
|
|
|
writer.writeCellValue(11, row, DateUtil.format(treatmentVOList.get(i).getVisitTime(), "yyyy-MM-dd HH:mm:ss")); |
|
|
|
writer.writeCellValue(12, row, DateUtil.format(treatmentVOList.get(i).getDischargeTime(), "yyyy-MM-dd HH:mm:ss")); |
|
|
|
writer.writeCellValue(13, row, treatmentVOList.get(i).getDoctor()); |
|
|
|
writer.writeCellValue(14, row, treatmentVOList.get(i).getCreateBy()); |
|
|
|
writer.writeCellValue(9, row, treatmentVOList.get(i).getDiagnosisName()); |
|
|
|
writer.writeCellValue(10, row, treatmentVOList.get(i).getZyzdQt()); |
|
|
|
writer.writeCellValue(11, row, treatmentVOList.get(i).getVisitType() == 0 ? "门诊" : "住院"); |
|
|
|
writer.writeCellValue(12, row, treatmentVOList.get(i).getVisitNumber()); |
|
|
|
writer.writeCellValue(13, row, DateUtil.format(treatmentVOList.get(i).getVisitTime(), "yyyy-MM-dd HH:mm:ss")); |
|
|
|
writer.writeCellValue(14, row, DateUtil.format(treatmentVOList.get(i).getDischargeTime(), "yyyy-MM-dd HH:mm:ss")); |
|
|
|
writer.writeCellValue(15, row, treatmentVOList.get(i).getDoctor()); |
|
|
|
writer.writeCellValue(16, row, treatmentVOList.get(i).getCreateBy()); |
|
|
|
} |
|
|
|
String filename = StrUtil.format("HZDA-{}.xlsx", DateUtil.date().toString("yyyyMMdd")); |
|
|
|
|
|
|
@ -478,8 +490,7 @@ public class PmsTreatmentServiceImpl implements PmsTreatmentService { |
|
|
|
try { |
|
|
|
out = response.getOutputStream(); |
|
|
|
writer.flush(out); |
|
|
|
} catch ( |
|
|
|
IOException e) { |
|
|
|
} catch (IOException e) { |
|
|
|
e.printStackTrace(); |
|
|
|
} finally { |
|
|
|
// 关闭writer,释放内存
|
|
|
@ -676,8 +687,7 @@ public class PmsTreatmentServiceImpl implements PmsTreatmentService { |
|
|
|
addTreatment(dto); |
|
|
|
} catch (Exception e) { |
|
|
|
e.printStackTrace(); |
|
|
|
throw new BaseException(StrUtil.format("导入诊疗信息错误:sheet:{},row:{}, {}", |
|
|
|
sheetIndex + 1, rowIndex + 1, ExceptionUtil.getExceptionMessage(e))); |
|
|
|
throw new BaseException(StrUtil.format("导入诊疗信息错误:sheet:{},row:{}, {}", sheetIndex + 1, rowIndex + 1, ExceptionUtil.getExceptionMessage(e))); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
@ -780,8 +790,7 @@ public class PmsTreatmentServiceImpl implements PmsTreatmentService { |
|
|
|
try { |
|
|
|
out = response.getOutputStream(); |
|
|
|
writer.flush(out); |
|
|
|
} catch ( |
|
|
|
IOException e) { |
|
|
|
} catch (IOException e) { |
|
|
|
e.printStackTrace(); |
|
|
|
} finally { |
|
|
|
// 关闭writer,释放内存
|
|
|
|