Skip to content

Commit 1fdb3be

Browse files
NPA-6165: Superseed performer for grantee in consent (#295)
# Pull Request ## 🧾 Ticket Link <!-- Add the Jira ticket link here --> https://nhsd-jira.digital.nhs.uk/browse/NPA-6165 --- ## 📄 Description/Summary of Changes <!-- Describe the changes made in this PR. Include the purpose/scope/impact of the changes --> - Deprecate performer for new extension grantee in Consent --- ## 🧪 Developer Testing Carried Out <!-- Describe what tests (automated/unit/manual etc.) have been done for the ticket. Include: --> <!-- - Any tests added/updated --> <!-- - Evidence that each acceptance criterion from the Jira ticket is met --> - <!-- Add bullet points for testing instructions --> - <!-- Add bullet points for testing instructions --> - <!-- Add bullet points for testing instructions --> --- ## 🧪 Reviewer Testing Required <!-- Describe how to test the changes that have been made in the ticket. Include: --> <!-- - Testing environment details (e.g. sandbox/local setup) --> <!-- - Steps to verify the changes --> - [ ] <!-- Add bullet points for testing instructions --> - [ ] <!-- Add bullet points for testing instructions --> - [ ] <!-- Add bullet points for testing instructions --> --- ## ✅ Developer Checklist <!-- Complete before submitting the PR --> - [ ] PR title follows the format: `NPA-XXXX: <short-description>` - [ ] Branch name follows the convention: `<type>/NPA-XXXX/<short-description>` - [ ] Commit messages follow the template: `NPA-XXXX: <short-description>` - [ ] All acceptance criteria from the Jira ticket are addressed - [ ] Automated tests (unit/integration/API/infrastructure etc. tests) are added or updated - [ ] Assignees and appropriate labels (e.g. `terraform`, `documentation`) are added --- ## 👀 Reviewer Checklist <!-- To be completed by the reviewer --> - [ ] Changes meet the acceptance criteria of the Jira ticket - [ ] Code is able to be merged (no conflicts and adheres to coding standards) - [ ] Sufficient test evidence is provided (manual and/or automated) - [ ] Infrastructure/operational/build changes are validated (if applicable) --- ## 🚀 Post-merge <!-- Actions to complete after merging --> After merging and deploying changes to the sandbox, Postman collection or spec examples please run the Run Postman collection workflow. This will run the tests within the collection to check that the sandbox is working as expected once deployed.
1 parent 99fcdc9 commit 1fdb3be

File tree

30 files changed

+20403
-20617
lines changed

30 files changed

+20403
-20617
lines changed

postman/validated_relationship_service.integration.postman_collection.json

Lines changed: 9238 additions & 9240 deletions
Large diffs are not rendered by default.

postman/validated_relationship_service.sandbox.postman_collection.json

Lines changed: 10917 additions & 11163 deletions
Large diffs are not rendered by default.

sandbox/api/constants.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@
8282
POST_CONSENT__DIRECTORY = "./api/examples/POST_Consent/"
8383
POST_CONSENT__SUCCESS = f"{POST_CONSENT__DIRECTORY}success.yaml"
8484
POST_CONSENT__DUPLICATE_RELATIONSHIP_ERROR = f"{POST_CONSENT__DIRECTORY}errors/duplicate_relationship_error.yaml"
85-
POST_CONSENT__PERFORMER_IDENTIFIER_ERROR = f"{POST_CONSENT__DIRECTORY}errors/invalid_performer_identifier_error.yaml"
8685
POST_CONSENT__MISSING_FREE_TEXT_FOR_OTHER = f"{POST_CONSENT__DIRECTORY}errors/missing_free_text_for_other.yaml"
8786

8887
# PATCH Consent

sandbox/api/post_consent.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
from .constants import (
77
INTERNAL_SERVER_ERROR_EXAMPLE,
88
POST_CONSENT__DUPLICATE_RELATIONSHIP_ERROR,
9-
POST_CONSENT__PERFORMER_IDENTIFIER_ERROR,
109
POST_CONSENT__SUCCESS,
1110
POST_CONSENT__MISSING_FREE_TEXT_FOR_OTHER,
1211
)
@@ -40,10 +39,6 @@ def post_consent_response() -> Union[dict, tuple]:
4039
elif patient_identifier == "9000000049":
4140
response = generate_response_from_example(POST_CONSENT__DUPLICATE_RELATIONSHIP_ERROR, 409)
4241

43-
# Invalid performer NHS number
44-
elif patient_identifier == "9000000000":
45-
response = generate_response_from_example(POST_CONSENT__PERFORMER_IDENTIFIER_ERROR, 422)
46-
4742
elif patient_identifier == "9000000050":
4843
# Missing free text for OTHER reason code (should fail)
4944
response = generate_response_from_example(POST_CONSENT__MISSING_FREE_TEXT_FOR_OTHER, 400)

sandbox/api/tests/test_post_consent.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
from sandbox.api.constants import (
88
POST_CONSENT__DUPLICATE_RELATIONSHIP_ERROR,
9-
POST_CONSENT__PERFORMER_IDENTIFIER_ERROR,
109
POST_CONSENT__SUCCESS,
1110
POST_CONSENT__MISSING_FREE_TEXT_FOR_OTHER,
1211
)
@@ -29,7 +28,6 @@
2928
201,
3029
"90b9863e-e33c-4895-a333-fd0ea0e23205",
3130
),
32-
("9000000000", POST_CONSENT__PERFORMER_IDENTIFIER_ERROR, 422, None),
3331
("9000000049", POST_CONSENT__DUPLICATE_RELATIONSHIP_ERROR, 409, None),
3432
(
3533
"9000000050",

specification/examples/requests/POST_Consent/adult_to_adult_proxy_creation.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,6 @@ ConsentAdultToAdultGuardianRequest:
1919
system: https://fhir.nhs.uk/Id/nhs-number
2020
value: "9000000012"
2121
dateTime: "2025-02-11T14:30:00Z"
22-
performer:
23-
- type: RelatedPerson
24-
identifier:
25-
system: https://fhir.nhs.uk/Id/nhs-number
26-
value: "9000000017"
2722
provision:
2823
type: permit
2924
period:
@@ -46,3 +41,8 @@ ConsentAdultToAdultGuardianRequest:
4641
- system: https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason
4742
code: ROLE_CREATED
4843
display: Role created
44+
- url: https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee
45+
valueReference:
46+
identifier:
47+
system: https://fhir.nhs.uk/Id/nhs-number
48+
value: '9000000017'

specification/examples/requests/POST_Consent/parent_child_proxy_creation.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,6 @@ ConsentParentChildProxyCreationRequest:
1919
system: https://fhir.nhs.uk/Id/nhs-number
2020
value: "9000000012"
2121
dateTime: "2025-02-11T14:30:00Z"
22-
performer:
23-
- type: RelatedPerson
24-
identifier:
25-
system: https://fhir.nhs.uk/Id/nhs-number
26-
value: "9000000009"
2722
provision:
2823
type: permit
2924
period:
@@ -47,3 +42,8 @@ ConsentParentChildProxyCreationRequest:
4742
- system: https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason
4843
code: ROLE_CREATED
4944
display: Role created
45+
- url: https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee
46+
valueReference:
47+
identifier:
48+
system: https://fhir.nhs.uk/Id/nhs-number
49+
value: '9000000009'

specification/examples/responses/GET_Consent/filtered-relationships-status-active-include-details.yaml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,6 @@ ConsentMultipleRelationshipsStatusActiveIncludeDetailsBundle:
8686
system: "https://fhir.nhs.uk/Id/nhs-number"
8787
value: "9000000009"
8888
dateTime: "2024-07-21T17:32:28Z"
89-
performer:
90-
- identifier:
91-
system: "https://fhir.nhs.uk/Id/nhs-number"
92-
value: "9000000017"
9389
policy:
9490
- authority: "https://www.england.nhs.uk"
9591
uri: "REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD"
@@ -115,6 +111,11 @@ ConsentMultipleRelationshipsStatusActiveIncludeDetailsBundle:
115111
- system: https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason
116112
code: ROLE_CREATED
117113
display: Role created
114+
- url: https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee
115+
valueReference:
116+
identifier:
117+
system: https://fhir.nhs.uk/Id/nhs-number
118+
value: '9000000017'
118119
search:
119120
mode: match
120121
- fullUrl: "https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/RP974720"
@@ -184,10 +185,6 @@ ConsentMultipleRelationshipsStatusActiveIncludeDetailsBundle:
184185
system: "https://fhir.nhs.uk/Id/nhs-number"
185186
value: "9000000005"
186187
dateTime: "2024-07-21T17:32:28Z"
187-
performer:
188-
- identifier:
189-
system: "https://fhir.nhs.uk/Id/nhs-number"
190-
value: "9000000017"
191188
policy:
192189
- authority: "https://www.england.nhs.uk"
193190
uri: "REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD"
@@ -213,5 +210,10 @@ ConsentMultipleRelationshipsStatusActiveIncludeDetailsBundle:
213210
- system: https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason
214211
code: ROLE_CREATED
215212
display: Role created
213+
- url: https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee
214+
valueReference:
215+
identifier:
216+
system: https://fhir.nhs.uk/Id/nhs-number
217+
value: '9000000017'
216218
search:
217219
mode: match

specification/examples/responses/GET_Consent/filtered-relationships-status-inactive.yaml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,6 @@ ConsentMultipleRelationshipsStatusInactiveBundle:
3030
system: 'https://fhir.nhs.uk/Id/nhs-number'
3131
value: '9000000006'
3232
dateTime: '2024-07-21T17:32:28Z'
33-
performer:
34-
- identifier:
35-
system: 'https://fhir.nhs.uk/Id/nhs-number'
36-
value: '9000000017'
3733
policy:
3834
- authority: https://www.england.nhs.uk
3935
uri: REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD
@@ -59,6 +55,11 @@ ConsentMultipleRelationshipsStatusInactiveBundle:
5955
- system: https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason
6056
code: ROLE_DEACTIVATED_END_DATE_REACHED
6157
display: End date reached
58+
- url: https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee
59+
valueReference:
60+
identifier:
61+
system: https://fhir.nhs.uk/Id/nhs-number
62+
value: '9000000017'
6263
search:
6364
mode: match
6465
- fullUrl: https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/ABCD12B3
@@ -81,10 +82,6 @@ ConsentMultipleRelationshipsStatusInactiveBundle:
8182
system: 'https://fhir.nhs.uk/Id/nhs-number'
8283
value: '9000000007'
8384
dateTime: '2024-07-21T17:32:28Z'
84-
performer:
85-
- identifier:
86-
system: 'https://fhir.nhs.uk/Id/nhs-number'
87-
value: '9000000017'
8885
policy:
8986
- authority: https://www.england.nhs.uk
9087
uri: REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD
@@ -111,5 +108,10 @@ ConsentMultipleRelationshipsStatusInactiveBundle:
111108
code: OTHER
112109
display: Other reason
113110
text: Patient would not respond to phone calls
111+
- url: https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee
112+
valueReference:
113+
identifier:
114+
system: https://fhir.nhs.uk/Id/nhs-number
115+
value: '9000000017'
114116
search:
115117
mode: match

specification/examples/responses/GET_Consent/filtered-relationships-status-proposed-active.yaml

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,6 @@ ConsentMultipleRelationshipsStatusProposedActiveBundle:
3030
system: 'https://fhir.nhs.uk/Id/nhs-number'
3131
value: '9000000009'
3232
dateTime: '2024-07-21T17:32:28Z'
33-
performer:
34-
- identifier:
35-
system: 'https://fhir.nhs.uk/Id/nhs-number'
36-
value: '9000000017'
3733
policy:
3834
- authority: https://www.england.nhs.uk
3935
uri: REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD
@@ -59,6 +55,11 @@ ConsentMultipleRelationshipsStatusProposedActiveBundle:
5955
- system: https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason
6056
code: ROLE_CREATED
6157
display: Role created
58+
- url: https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee
59+
valueReference:
60+
identifier:
61+
system: https://fhir.nhs.uk/Id/nhs-number
62+
value: '9000000017'
6263
search:
6364
mode: match
6465

@@ -82,10 +83,6 @@ ConsentMultipleRelationshipsStatusProposedActiveBundle:
8283
system: 'https://fhir.nhs.uk/Id/nhs-number'
8384
value: '9000000005'
8485
dateTime: '2024-07-21T17:32:28Z'
85-
performer:
86-
- identifier:
87-
system: 'https://fhir.nhs.uk/Id/nhs-number'
88-
value: '9000000017'
8986
policy:
9087
- authority: https://www.england.nhs.uk
9188
uri: REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD
@@ -111,6 +108,11 @@ ConsentMultipleRelationshipsStatusProposedActiveBundle:
111108
- system: https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason
112109
code: ROLE_CREATED
113110
display: Role created
111+
- url: https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee
112+
valueReference:
113+
identifier:
114+
system: https://fhir.nhs.uk/Id/nhs-number
115+
value: '9000000017'
114116
search:
115117
mode: match
116118

@@ -134,10 +136,6 @@ ConsentMultipleRelationshipsStatusProposedActiveBundle:
134136
system: 'https://fhir.nhs.uk/Id/nhs-number'
135137
value: '9000000020'
136138
dateTime: '2024-07-21T17:32:28Z'
137-
performer:
138-
- identifier:
139-
system: 'https://fhir.nhs.uk/Id/nhs-number'
140-
value: '9000000017'
141139
policy:
142140
- authority: https://www.england.nhs.uk
143141
uri: REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD
@@ -163,6 +161,11 @@ ConsentMultipleRelationshipsStatusProposedActiveBundle:
163161
- system: https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason
164162
code: APPLICATION_SUBMITTED
165163
display: Application submitted online
164+
- url: https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee
165+
valueReference:
166+
identifier:
167+
system: https://fhir.nhs.uk/Id/nhs-number
168+
value: '9000000017'
166169
search:
167170
mode: match
168171

@@ -186,10 +189,6 @@ ConsentMultipleRelationshipsStatusProposedActiveBundle:
186189
system: 'https://fhir.nhs.uk/Id/nhs-number'
187190
value: '9000000021'
188191
dateTime: '2024-07-21T17:32:28Z'
189-
performer:
190-
- identifier:
191-
system: 'https://fhir.nhs.uk/Id/nhs-number'
192-
value: '9000000017'
193192
policy:
194193
- authority: https://www.england.nhs.uk
195194
uri: REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD
@@ -215,5 +214,10 @@ ConsentMultipleRelationshipsStatusProposedActiveBundle:
215214
- system: https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason
216215
code: APPLICATION_SUBMITTED
217216
display: Application submitted online
217+
- url: https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee
218+
valueReference:
219+
identifier:
220+
system: https://fhir.nhs.uk/Id/nhs-number
221+
value: '9000000017'
218222
search:
219223
mode: match

0 commit comments

Comments
 (0)