use of org.hl7.gravity.refimpl.sdohexchange.dto.converter.PatientTaskBundleToItemDtoConverter in project Gravity-SDOH-Exchange-RI by FHIR.
the class PatientTaskService method listTasks.
public List<PatientTaskItemDto> listTasks() {
Assert.notNull(SmartOnFhirContext.get().getPatient(), "Patient id cannot be null.");
Bundle tasksBundle = new PatientTaskQueryFactory().query(ehrClient, SmartOnFhirContext.get().getPatient()).include(Task.INCLUDE_PART_OF).where(new TokenClientParam("owner:Patient").exactly().code(SmartOnFhirContext.get().getPatient())).returnBundle(Bundle.class).execute();
addQuestionnairesToTaskBundle(tasksBundle);
return new PatientTaskBundleToItemDtoConverter().convert(tasksBundle);
}
Aggregations