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..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: 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 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"