Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

16 changes: 15 additions & 1 deletion specification/validated-relationships-service-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -942,6 +942,11 @@ paths:
* JSON Patch operations must be valid according to RFC 6902
* Status changes must use valid status codes from <http://hl7.org/fhir/consent-state-codes>

**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:
Expand Down Expand Up @@ -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"
Expand Down