|
|
|
@ -276,7 +276,7 @@ public class ReportJob {
|
|
|
|
|
reportDto.setAdmisstimes(parent.getAdmissTimes());
|
|
|
|
|
reportDto.setInpatientNo(parent.getInpatientNo());
|
|
|
|
|
reportDto.setPatientId(parent.getPatientId());
|
|
|
|
|
reportDto.setSysFlag(reportQueryNurseInsertSugarCollectorId+SdRyReportQueryConfig.BABY_COLLECTOR_ID_SUFFIX);
|
|
|
|
|
reportDto.setSysFlag(reportQueryNurseInsertSugarCollectorId + SdRyReportQueryConfig.BABY_COLLECTOR_ID_SUFFIX);
|
|
|
|
|
}
|
|
|
|
|
reportService.report(reportDto);
|
|
|
|
|
collectFileCount++;
|
|
|
|
@ -768,11 +768,11 @@ public class ReportJob {
|
|
|
|
|
Instant adminssDateInstant = admissDate.toInstant();
|
|
|
|
|
Instant disDateInstant = disDate.toInstant();
|
|
|
|
|
// 开始时间去入院前三天
|
|
|
|
|
LocalDate admissLocalDate = adminssDateInstant.atZone(zoneId).toLocalDate();
|
|
|
|
|
LocalDate startTimeLocalDate = admissLocalDate.plusDays(-3);
|
|
|
|
|
LocalDate disLocalDate = disDateInstant.atZone(zoneId).toLocalDate();
|
|
|
|
|
String startTime = startTimeLocalDate.toString() + " 00:00:00";
|
|
|
|
|
String endTime = disLocalDate.toString() + " 23:59:59";
|
|
|
|
|
LocalDateTime admissLocalDateTime = adminssDateInstant.atZone(zoneId).toLocalDateTime();
|
|
|
|
|
LocalDateTime startTimeLocalDateTime = admissLocalDateTime.plusDays(-3);
|
|
|
|
|
LocalDateTime disLocalDateTime = disDateInstant.atZone(zoneId).toLocalDateTime();
|
|
|
|
|
String startTime = Func.formatDateTime(startTimeLocalDateTime);
|
|
|
|
|
String endTime = Func.formatDateTime(disLocalDateTime);
|
|
|
|
|
|
|
|
|
|
SdJxReportDto sdJxReportDto = new SdJxReportDto();
|
|
|
|
|
sdJxReportDto.setPage(true);
|
|
|
|
@ -823,11 +823,11 @@ public class ReportJob {
|
|
|
|
|
Instant adminssDateInstant = admissDate.toInstant();
|
|
|
|
|
Instant disDateInstant = disDate.toInstant();
|
|
|
|
|
// 开始时间去入院前三天
|
|
|
|
|
LocalDate admissLocalDate = adminssDateInstant.atZone(zoneId).toLocalDate();
|
|
|
|
|
LocalDate startTimeLocalDate = admissLocalDate.plusDays(-3);
|
|
|
|
|
LocalDate disLocalDate = disDateInstant.atZone(zoneId).toLocalDate();
|
|
|
|
|
String startTime = startTimeLocalDate.toString() + " 00:00:00";
|
|
|
|
|
String endTime = disLocalDate.toString() + " 23:59:59";
|
|
|
|
|
LocalDateTime admissLocalDateTime = adminssDateInstant.atZone(zoneId).toLocalDateTime();
|
|
|
|
|
LocalDateTime startTimeLocalDateTime = admissLocalDateTime.plusDays(-3);
|
|
|
|
|
LocalDateTime disLocalDateTime = disDateInstant.atZone(zoneId).toLocalDateTime();
|
|
|
|
|
String startTime = Func.formatDateTime(startTimeLocalDateTime);
|
|
|
|
|
String endTime = Func.formatDateTime(disLocalDateTime);
|
|
|
|
|
|
|
|
|
|
SdJxReportDto sdJxReportDto = new SdJxReportDto();
|
|
|
|
|
sdJxReportDto.setPage(true);
|
|
|
|
@ -883,6 +883,16 @@ public class ReportJob {
|
|
|
|
|
String resultJsonStr = Func.toJson(result);
|
|
|
|
|
List<JSONObject> reportObjectList = Func.parseJsonArray(resultJsonStr, JSONObject.class);
|
|
|
|
|
if (Func.isNotEmpty(reportObjectList)) {
|
|
|
|
|
|
|
|
|
|
// 开始时间去入院前三天
|
|
|
|
|
ZoneId zoneId = ZoneId.systemDefault();
|
|
|
|
|
Instant adminssDateInstant = tBasic.getAdmissDate().toInstant();
|
|
|
|
|
Instant disDateInstant = tBasic.getDisDate().toInstant();
|
|
|
|
|
// 开始时间去入院前三天
|
|
|
|
|
LocalDateTime admissLocalDateTime = adminssDateInstant.atZone(zoneId).toLocalDateTime();
|
|
|
|
|
LocalDateTime startTimeLocalDateTime = admissLocalDateTime.plusDays(-3);
|
|
|
|
|
LocalDateTime disLocalDateTime = disDateInstant.atZone(zoneId).toLocalDateTime();
|
|
|
|
|
|
|
|
|
|
for (JSONObject reportObject : reportObjectList) {
|
|
|
|
|
// 检验报告号
|
|
|
|
|
String labReportSn = String.valueOf(reportObject.get("LAB_REPORT_SN"));
|
|
|
|
@ -894,6 +904,13 @@ public class ReportJob {
|
|
|
|
|
String reportTypeName = String.valueOf(reportObject.get("REPORT_TYPE_NAME"));
|
|
|
|
|
// 系统修改
|
|
|
|
|
String updateBy = String.valueOf(reportObject.get("UPDATEBY"));
|
|
|
|
|
// 申请时间
|
|
|
|
|
Date requestTime = reportObject.getDate("REQUEST_TIME");
|
|
|
|
|
LocalDateTime requestTime2LocalDateTime = requestTime.toInstant().atZone(zoneId).toLocalDateTime();
|
|
|
|
|
if (requestTime2LocalDateTime.isBefore(startTimeLocalDateTime) || requestTime2LocalDateTime.isAfter(disLocalDateTime)) {
|
|
|
|
|
log.warn("解析LIS报告,病案号:{},住院次数:{},该报告RequestTime不在入院时间-3天与出院时间范围内,不下载此病案!信息:{}", tBasic.getInpatientNo(), tBasic.getAdmissTimes(), reportObject);
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ReportDto reportDto = new ReportDto();
|
|
|
|
|
reportDto.setAdmisstimes(tBasic.getAdmissTimes());
|
|
|
|
|