From dd8ef439eb09a6d0f196c9e411334bae29df2c2e Mon Sep 17 00:00:00 2001 From: Joris Scharp Date: Tue, 10 Oct 2023 16:28:45 +0200 Subject: [PATCH] Enforcing the `Task.for` as this is now required by the profile. --- pom.xml | 2 +- .../smartservice/service/fhir/TaskFhirClientService.java | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 6a8ae7e..14366e8 100644 --- a/pom.xml +++ b/pom.xml @@ -11,7 +11,7 @@ nl.koppeltaal spring-boot-starter-smart-service - 1.1.50-SNAPSHOT + 1.1.51-SNAPSHOT Koppeltaal-2.0-Spring-SMART-Service spring-boot-starter-smart-service project to connect to a FHIR Store that works according to the SMART Backend Service flow (https://hl7.org/fhir/uv/bulkdata/authorization/index.html) diff --git a/src/main/java/nl/koppeltaal/spring/boot/starter/smartservice/service/fhir/TaskFhirClientService.java b/src/main/java/nl/koppeltaal/spring/boot/starter/smartservice/service/fhir/TaskFhirClientService.java index 52d06d0..440610c 100644 --- a/src/main/java/nl/koppeltaal/spring/boot/starter/smartservice/service/fhir/TaskFhirClientService.java +++ b/src/main/java/nl/koppeltaal/spring/boot/starter/smartservice/service/fhir/TaskFhirClientService.java @@ -61,7 +61,9 @@ public Task getOrCreateTask(Patient patient, Practitioner practitioner, Activity } task.addIdentifier(taskIdentifier); - task.setOwner(buildReference(patient)); + Reference patientReference = buildReference(patient); + task.setFor(patientReference); + task.setOwner(patientReference); if (practitioner != null) { task.setRequester(buildReference(practitioner)); }