use of org.hl7.gravity.refimpl.sdohexchange.dto.response.BaseConsentDto in project Gravity-SDOH-Exchange-RI by FHIR.
the class ConsentService method listBaseConsentsInfo.
public List<BaseConsentDto> listBaseConsentsInfo() {
Bundle bundle = consentRepository.findAllByPatient(SmartOnFhirContext.get().getPatient());
List<Consent> consentResources = FhirUtil.getFromBundle(bundle, Consent.class);
return consentResources.stream().map(consent -> new BaseConsentDto(consent.getIdElement().getIdPart(), consent.getSourceAttachment().getTitle())).collect(Collectors.toList());
}
Aggregations