fix: 佛山三院lis采集接口修改,gen类型合并,其他类型不合并

master
wyb 4 months ago
parent 874fb72aee
commit 88ac1daa58

@ -15,6 +15,8 @@ import com.docus.server.fsy.api.dto.LisPatientGroupReportRequest;
import com.docus.server.fsy.api.dto.LisPatientGroupReportResponse;
import com.docus.server.fsy.api.dto.LisPatientListRequest;
import com.docus.server.fsy.api.dto.LisPatientListResponse;
import com.docus.server.fsy.api.dto.LisPatientReportRequest;
import com.docus.server.fsy.api.dto.LisPatientReportResponse;
import com.docus.server.fsy.converter.LisReportConverter;
import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.extern.slf4j.Slf4j;
@ -87,31 +89,37 @@ public class LisPatientReportCollectJob {
log.info("佛山三院Lis检验报告采集任务,采集任务id{} 未查询到Lis患者文件数据", taskId);
continue;
}
// 报告类型gen需要合并
List<LisPatientListResponse.Patient> genPatientList = patientList.stream().filter(p -> "gen".equalsIgnoreCase(p.getRepReportType())).collect(Collectors.toList());
List<LisPatientListResponse.Patient> otherPatientList = patientList.stream().filter(p -> !"gen".equalsIgnoreCase(p.getRepReportType())).collect(Collectors.toList());
/// 文件列表查询每个文件,进行上报下载服务 ,于 2025-3-11 更换为 合并获取接口
// for (LisPatientListResponse.Patient patient : patientList) {
// LisPatientReportRequest lisPatientReportRequest = new LisPatientReportRequest();
// lisPatientReportRequest.setRepId(patient.getRepId());
// lisPatientReportRequest.setCustomReportSuffix("");
// LisPatientReportResponse lisReportServicePatientReport = lisReportService.getPatientReport(lisPatientReportRequest);
// ReportDownDto reportDownDto = LisReportConverter.convertDownloadPlatform(reportDownTwoDto, patient, lisReportServicePatientReport);
// reportDownDto.setCollectorid(lisCollectorId);
// reportDownDto.setAssortid(lisAssortId);
// downPlatformService.report(reportDownDto);
// }
// 合并获取接口
String repIds = patientList.stream().map(LisPatientListResponse.Patient::getRepId).collect(Collectors.joining(","));
LisPatientGroupReportRequest request = new LisPatientGroupReportRequest();
request.setReportCode("GroupPrint");
request.setRepIds(repIds);
LisPatientGroupReportResponse groupReport = lisReportService.getPatientGroupReport(request);
ReportDownDto reportDownDto = LisReportConverter.convertDownloadPlatform(reportDownTwoDto, groupReport);
reportDownDto.setCollectorid(lisCollectorId);
reportDownDto.setAssortid(lisAssortId);
tBasicMapper.cancelFileBySource(lisCollectorId, reportDownTwoDto.getPatientId());
downPlatformService.report(reportDownDto);
if (Func.isNotEmpty(genPatientList)) {
// 合并获取接口
String repIds = genPatientList.stream().map(LisPatientListResponse.Patient::getRepId).collect(Collectors.joining(","));
LisPatientGroupReportRequest request = new LisPatientGroupReportRequest();
request.setReportCode("GroupPrint");
request.setRepIds(repIds);
LisPatientGroupReportResponse groupReport = lisReportService.getPatientGroupReport(request);
ReportDownDto reportDownDto = LisReportConverter.convertDownloadPlatform(reportDownTwoDto, groupReport);
reportDownDto.setCollectorid(lisCollectorId);
reportDownDto.setAssortid(lisAssortId);
downPlatformService.report(reportDownDto);
}
if (Func.isNotEmpty(otherPatientList)) {
// 文件列表查询每个文件,进行上报下载服务
for (LisPatientListResponse.Patient patient : otherPatientList) {
LisPatientReportRequest lisPatientReportRequest = new LisPatientReportRequest();
lisPatientReportRequest.setRepId(patient.getRepId());
lisPatientReportRequest.setCustomReportSuffix("");
LisPatientReportResponse lisReportServicePatientReport = lisReportService.getPatientReport(lisPatientReportRequest);
ReportDownDto reportDownDto = LisReportConverter.convertDownloadPlatform(reportDownTwoDto, patient, lisReportServicePatientReport);
reportDownDto.setCollectorid(lisCollectorId);
reportDownDto.setAssortid(lisAssortId);
downPlatformService.report(reportDownDto);
}
}
}
} catch (Exception ex) {
log.error("====================> 佛山三院Lis检验报告采集任务出现异常_" + ex.getMessage(), ex);

@ -37,5 +37,11 @@ public class LisPatientListResponse {
*
*/
private String repInDate;
/**
* gen mic
*/
private String repReportType;
}
}

@ -110,6 +110,9 @@ public class LisReportConverter {
if ("RepInDate".equals(node.getNodeName())) {
patient.setRepInDate(node.getTextContent());
}
if ("RepReportType".equals(node.getNodeName())) {
patient.setRepReportType(node.getTextContent());
}
}
patients.add(patient);
}

Loading…
Cancel
Save