use of uk.nhs.adaptors.pss.translator.util.ResourceFilterUtil in project nia-patient-switching-standard-adaptor by NHSDigital.
the class DiagnosticReportMapper method mapResources.
@Override
public List<DiagnosticReport> mapResources(RCMRMT030101UK04EhrExtract ehrExtract, Patient patient, List<Encounter> encounters, String practiseCode) {
return mapEhrExtractToFhirResource(ehrExtract, (extract, composition, component) -> extractAllCompoundStatements(component).filter(Objects::nonNull).filter(ResourceFilterUtil::isDiagnosticReport).map(compoundStatement -> {
DiagnosticReport diagnosticReport = createDiagnosticReport(compoundStatement, patient, composition, encounters, practiseCode);
getIssued(ehrExtract, compoundStatement, composition).ifPresent(diagnosticReport::setIssuedElement);
return diagnosticReport;
})).toList();
}
Aggregations