Skip to content

Commit 3e58280

Browse files
NPA-6014: Schema updates for provision Consent endpoints
1 parent 525bfad commit 3e58280

File tree

3 files changed

+60
-54
lines changed

3 files changed

+60
-54
lines changed
Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
ReplaceLegalBasisRequest:
22
summary: Replace legal basis
3-
description: payload used to replace the legal basis of a consent resource
3+
description: payload used to add a new actor (legal basis) to the consent provision
44
value:
55
- op: replace
6-
path: /provision/actor
6+
path: /provision/0/actor
77
value:
8-
- role:
9-
coding:
10-
- system: https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis
11-
code: court-appointed-personal-welfare-deputy
12-
display: Court appointed personal welfare deputy
13-
reference:
14-
type: RelatedPerson
15-
identifier:
16-
system: https://fhir.nhs.uk/Id/nhs-number
17-
value: "9000000017"
8+
role:
9+
coding:
10+
- system: https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis
11+
code: court-appointed-personal-welfare-deputy
12+
display: Court appointed personal welfare deputy
13+
reference:
14+
type: RelatedPerson
15+
identifier:
16+
system: https://fhir.nhs.uk/Id/nhs-number
17+
value: "9000000017"
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
UpdateProvisionEndDate:
2+
summary: Set provision end date
3+
description: >
4+
Example apply end date to a relationship.
5+
The relationship will be considered as ended following this date.
6+
value:
7+
- op: add
8+
path: /provision/0/period/end
9+
value: "2026-12-31T23:59:59Z"

specification/validated-relationships-service-api.yaml

Lines changed: 39 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -987,15 +987,8 @@ paths:
987987
examples:
988988
statusUpdate:
989989
$ref: "./examples/requests/PATCH_Consent/replace_status.yaml#/StatusUpdate"
990-
updateProvision:
991-
summary: Set an end date for a role
992-
description: |
993-
Example apply end date to a relationship.
994-
The relationship will be considered as ended following this date.
995-
value:
996-
- op: replace
997-
path: /provision/period/end
998-
value: "2026-12-31"
990+
updateProvisionEndDate:
991+
$ref: "./examples/requests/PATCH_Consent/replace_provision_end_date.yaml#/UpdateProvisionEndDate"
999992
multipleUpdates:
1000993
summary: Set status to active with an end date
1001994
description: |
@@ -1015,9 +1008,9 @@ paths:
10151008
- system: http://terminology.hl7.org/CodeSystem/consent-reason
10161009
code: "ROLE_ACTIVATED"
10171010
display: "Role activated"
1018-
- op: replace
1019-
path: /provision/period/end
1020-
value: "2026-12-31"
1011+
- op: add
1012+
path: /provision/0/period/end
1013+
value: "2026-12-31T23:59:59Z"
10211014
replaceLegalBasis:
10221015
$ref: "./examples/requests/PATCH_Consent/replace_legal_basis.yaml#/ReplaceLegalBasisRequest"
10231016
responses:
@@ -2315,33 +2308,35 @@ components:
23152308
format: uri
23162309

23172310
Provision:
2318-
type: object
2319-
properties:
2320-
period:
2321-
type: object
2322-
description: "Timeframe for this provision."
2323-
properties:
2324-
start:
2325-
type: string
2326-
description: "Starting time with inclusive boundary"
2327-
format: date-time
2328-
end:
2329-
type: string
2330-
description: "End time with inclusive boundary, if not ongoing"
2331-
format: date-time
2332-
actor:
2333-
type: array
2334-
description: "Individuals or organisations involved in the provision"
2335-
items:
2311+
type: array
2312+
description: "Constraints to the base Consent policy rule, which may be enforced over time."
2313+
items:
2314+
type: object
2315+
properties:
2316+
period:
23362317
type: object
2318+
description: "Timeframe for this provision."
23372319
properties:
2338-
reference:
2339-
$ref: "#/components/schemas/Reference"
2340-
description: "Individuals or organizations that agreed to the consent"
2341-
role:
2342-
$ref: "#/components/schemas/CodeableConcept"
2343-
description: "Classification of the role of consent, bound to http://terminology.hl7.org/CodeSystem/v3-RoleCode"
2344-
2320+
start:
2321+
type: string
2322+
description: "Starting time with inclusive boundary"
2323+
format: date-time
2324+
end:
2325+
type: string
2326+
description: "End time with inclusive boundary, if not ongoing"
2327+
format: date-time
2328+
actor:
2329+
type: array
2330+
description: "Individuals or organisations involved in the provision"
2331+
items:
2332+
type: object
2333+
properties:
2334+
reference:
2335+
$ref: "#/components/schemas/Reference"
2336+
description: "Individuals or organizations that agreed to the consent"
2337+
role:
2338+
$ref: "#/components/schemas/CodeableConcept"
2339+
description: "Classification of the role of consent, bound to http://terminology.hl7.org/CodeSystem/v3-RoleCode"
23452340
Extension:
23462341
type: object
23472342
properties:
@@ -2504,11 +2499,13 @@ components:
25042499
enum: [add, remove, replace]
25052500
path:
25062501
type: string
2507-
enum:
2508-
- /status
2509-
- /provision/period/end
2510-
- /provision/actor
2511-
- /extension
2502+
oneOf:
2503+
- description: "Static paths that do not require an index."
2504+
enum:
2505+
- /status
2506+
- /extension/-
2507+
- /provision/0/period/end
2508+
- /provision/0/actor
25122509
value:
25132510
oneOf:
25142511
- type: string

0 commit comments

Comments
 (0)