From aa591d47371da25f253498ee7a18ac4298836320 Mon Sep 17 00:00:00 2001 From: ChristopherBacon Date: Tue, 18 Nov 2025 13:38:20 +0000 Subject: [PATCH 1/3] NPA-5757: update schema for status and status reason description --- .../validated-relationships-service-api.yaml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/specification/validated-relationships-service-api.yaml b/specification/validated-relationships-service-api.yaml index fd776c03..0289eee0 100644 --- a/specification/validated-relationships-service-api.yaml +++ b/specification/validated-relationships-service-api.yaml @@ -942,6 +942,11 @@ paths: * JSON Patch operations must be valid according to RFC 6902 * Status changes must use valid status codes from + **IMPORTANT: Business Rule Enforcement** + If you update the `/status` of a role, you **MUST** also provide a corresponding update to the `/extension` path in the same patch array to provide the `statusReason`. + + Requests that change status without providing a status reason will return an error + ## Access modes This endpoint supports the following access modes: @@ -992,12 +997,21 @@ paths: summary: Set status to active with an end date description: | Example of a combined update to a record. - The status will be changed to inactive. + The status will be changed to active. The relationship will be considered as ended following this date. value: - op: replace path: /status value: active + - op: replace + path: /extension + value: + - url: https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason + valueCodeableConcept: + coding: + - system: http://terminology.hl7.org/CodeSystem/consent-reason + code: "ROLE_ACTIVATED" + display: "Role activated" - op: replace path: /provision/period/end value: "2026-12-31" From f98850c402ccba89b68ba39fb62d60438558913b Mon Sep 17 00:00:00 2001 From: ChristopherBacon Date: Thu, 27 Nov 2025 15:30:40 +0000 Subject: [PATCH 2/3] NPA-5757: Update legal basis and status reason patch examples --- .../requests/PATCH_Consent/replace_legal_basis.yaml | 6 +++--- .../examples/requests/PATCH_Consent/replace_status.yaml | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/specification/examples/requests/PATCH_Consent/replace_legal_basis.yaml b/specification/examples/requests/PATCH_Consent/replace_legal_basis.yaml index 797047df..3eb69271 100644 --- a/specification/examples/requests/PATCH_Consent/replace_legal_basis.yaml +++ b/specification/examples/requests/PATCH_Consent/replace_legal_basis.yaml @@ -7,9 +7,9 @@ ReplaceLegalBasisRequest: value: - role: coding: - - system: http://terminology.hl7.org/CodeSystem/v3-RoleCode - code: GUARD - display: Guardian + - system: https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis + code: court-appointed-personal-welfare-deputy + display: Court appointed personal welfare deputy reference: type: RelatedPerson identifier: diff --git a/specification/examples/requests/PATCH_Consent/replace_status.yaml b/specification/examples/requests/PATCH_Consent/replace_status.yaml index 74766426..8b81b2f7 100644 --- a/specification/examples/requests/PATCH_Consent/replace_status.yaml +++ b/specification/examples/requests/PATCH_Consent/replace_status.yaml @@ -11,7 +11,7 @@ StatusUpdate: - url: https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason valueCodeableConcept: coding: - - system: http://terminology.hl7.org/CodeSystem/consent-reason - code: TBC - display: TBC + - system: https://terminology.hl7.org/CodeSystem/consent-reason + code: ROLE_CREATED + display: Role created from scratch by GP From 82fc4636a1c46c4f45d89549c7c62e5e3ac73f27 Mon Sep 17 00:00:00 2001 From: ChristopherBacon Date: Thu, 27 Nov 2025 15:38:25 +0000 Subject: [PATCH 3/3] NPA-5757: remove extra tab spacing --- .../examples/requests/PATCH_Consent/replace_status.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/specification/examples/requests/PATCH_Consent/replace_status.yaml b/specification/examples/requests/PATCH_Consent/replace_status.yaml index 8b81b2f7..8bc11782 100644 --- a/specification/examples/requests/PATCH_Consent/replace_status.yaml +++ b/specification/examples/requests/PATCH_Consent/replace_status.yaml @@ -11,7 +11,7 @@ StatusUpdate: - url: https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason valueCodeableConcept: coding: - - system: https://terminology.hl7.org/CodeSystem/consent-reason - code: ROLE_CREATED - display: Role created from scratch by GP + - system: https://terminology.hl7.org/CodeSystem/consent-reason + code: ROLE_CREATED + display: Role created from scratch by GP