Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
c51cca4
NPA-1654: Update responses, from GET and POST Consent responses
ChristopherBacon Jan 27, 2026
3700478
NPA-6154: Put back in the role from the actor object
ChristopherBacon Jan 27, 2026
f7fe3e6
NPA-6154: Change the replace legal basis to regulatory basis
ChristopherBacon Jan 27, 2026
c53e8c6
NPA-6154: Changes to the Postman collections
ChristopherBacon Jan 28, 2026
16a985b
NPA-6154: Round 2 Postman collection updates
ChristopherBacon Feb 5, 2026
6c084bb
Merge branch 'master' into task/NPA-6154/regulatory-basis-extension
ChristopherBacon Feb 5, 2026
9b90f80
NPA-6154: Formatting extension issues
ChristopherBacon Feb 5, 2026
09880d3
NPA-6154: Spec fixes
ChristopherBacon Feb 5, 2026
143323e
NPA-6154: File Change for breaking spec
ChristopherBacon Feb 6, 2026
2b6ec58
NPA-6154: Updated spec changes
ChristopherBacon Feb 6, 2026
b17f8e2
NPA-6154: Commented changes removing roles
ChristopherBacon Feb 9, 2026
9a8fc92
NPA-6154: remove performer
ChristopherBacon Feb 10, 2026
9658df9
NPA-6154: Remove performer blocks from Integration
ChristopherBacon Feb 10, 2026
63ab835
Merge branch 'master' into task/NPA-6154/regulatory-basis-extension
ChristopherBacon Feb 10, 2026
2a0662a
NPA-6154: Update the Sandbox tests
ChristopherBacon Feb 11, 2026
cc513f8
NPA-6154: Format python
ChristopherBacon Feb 11, 2026
fb3f346
NPA-6154: Formatting the python file
ChristopherBacon Feb 11, 2026
2277117
Merge branch 'master' into task/NPA-6154/regulatory-basis-extension
LeoKHoward Feb 11, 2026
8e4143b
NPA-6154: Update date for the Postman collections
ChristopherBacon Feb 12, 2026
5729187
Merge branch 'task/NPA-6154/regulatory-basis-extension' of https://gi…
ChristopherBacon Feb 12, 2026
a8d90d4
NPA-6154: Remove final provision.actor. role
ChristopherBacon Feb 13, 2026
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 @@ -10050,4 +10050,4 @@
"value": ""
}
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11554,4 +11554,4 @@
"value": "https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4"
}
]
}
}
3 changes: 2 additions & 1 deletion sandbox/api/post_consent.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ def post_consent_response() -> Union[dict, tuple]:
logger.debug("Received request to POST consent")
# Validate body - beyond the scope of sandbox - assume body is valid for scenario
json = request.get_json()
patient_identifier = json["performer"][0]["identifier"]["value"]
grantee_ext = next(ext for ext in json["extension"] if "grantee" in ext["url"])
patient_identifier = grantee_ext["valueReference"]["identifier"]["value"]
response = None

# Successful parent-child proxy creation
Expand Down
9 changes: 8 additions & 1 deletion sandbox/api/tests/test_post_consent.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,14 @@ def test_post_consent_when_valid_returns_expected_response(
content_type="application/json",
)
# Act
json = {"performer": [{"identifier": {"value": nhs_num}}]}
json = {
"extension": [
{
"url": "https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee",
"valueReference": {"identifier": {"value": nhs_num}},
}
]
}
response = client.post(CONSENT_API_ENDPOINT, json=json)
# Assert
if id is not None:
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
ReplaceRegulatoryBasisRequest:
summary: Replace regulatory basis
description: payload used to add a new actor (regulatory basis) to the consent provision
value:
- op: add
path: /extension/-
value:
- url: "http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.regulatoryBasis"
valueCodeableConcept:
coding:
- system: "https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis"
code: court-appointed-personal-welfare-deputy
display: Court appointed personal welfare deputy
Original file line number Diff line number Diff line change
Expand Up @@ -24,24 +24,25 @@ ConsentAdultToAdultGuardianRequest:
period:
start: "2026-02-11T14:30:00Z"
actor:
- role:
coding:
- 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:
system: https://fhir.nhs.uk/Id/nhs-number
value: "9000000017"
- reference:
type: RelatedPerson
identifier:
system: https://fhir.nhs.uk/Id/nhs-number
value: "9000000017"
extension:
- url: https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason
valueCodeableConcept:
coding:
- system: https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason
code: ROLE_CREATED
display: Role created
- url: https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee
display: Role created from scratch by GP
- url: "http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.regulatoryBasis"
valueCodeableConcept:
coding:
- system: "https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis"
code: "court-appointed-personal-welfare-deputy"
display: "Court Appointed Personal Welfare Deputy"
- url: http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee
valueReference:
identifier:
system: https://fhir.nhs.uk/Id/nhs-number
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,28 +25,30 @@ ConsentParentChildProxyCreationRequest:
start: "2025-02-11T14:30:00Z"
end: "2029-02-11T14:30:00Z"
actor:
- role:
coding:
- system: https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis
code: parental-responsibility
display: Parental responsibility
reference:
type: RelatedPerson
identifier:
system: https://fhir.nhs.uk/Id/nhs-number
value: "9000000009"
- reference:
type: RelatedPerson
identifier:
system: https://fhir.nhs.uk/Id/nhs-number
value: "9000000009"
extension:
- url: https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason
valueCodeableConcept:
coding:
- system: https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason
code: ROLE_CREATED
display: Role created
- url: https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee
display: Role created from scratch by GP
- url: http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee
valueReference:
identifier:
system: https://fhir.nhs.uk/Id/nhs-number
value: '9000000009'
display: Role created
- url: "http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.regulatoryBasis"
valueCodeableConcept:
coding:
- system: "https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis"
code: "parental-responsibility"
display: "Parental responsibility"
- url: http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor
valueReference:
identifier:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,6 @@ ConsentMultipleRelationshipsStatusActiveIncludeDetailsBundle:
identifier:
system: "https://fhir.nhs.uk/Id/nhs-number"
value: "9000000017"
role:
coding:
- code: parental-responsibility
display: "Parental responsibility"
system: "https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis"
period:
end: "2026-02-11"
start: "2025-02-11"
Expand All @@ -111,6 +106,12 @@ ConsentMultipleRelationshipsStatusActiveIncludeDetailsBundle:
- system: https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason
code: ROLE_CREATED
display: Role created
- url: "http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.regulatoryBasis"
valueCodeableConcept:
coding:
- system: "https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis"
code: "parental-responsibility"
display: "Parental responsibility"
- url: https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee
valueReference:
identifier:
Expand Down Expand Up @@ -200,30 +201,31 @@ ConsentMultipleRelationshipsStatusActiveIncludeDetailsBundle:
identifier:
system: https://fhir.nhs.uk/Id/nhs-number
value: "9000000017"
role:
coding:
- code: parental-responsibility
display: Parental responsibility
system: https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis
period:
end: "2026-02-11"
start: "2025-02-11"
extension:
- url: https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason
valueCodeableConcept:
coding:
- system: https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason
code: ROLE_CREATED
display: Role created
- url: https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee
valueReference:
identifier:
system: https://fhir.nhs.uk/Id/nhs-number
value: '9000000017'
- url: http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor
valueReference:
identifier:
system: https://fhir.nhs.uk/Id/ods-organization-code
value: "G8101234"
- url: https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason
valueCodeableConcept:
coding:
- system: https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason
code: ROLE_CREATED
display: Role created
- url: "http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.regulatoryBasis"
valueCodeableConcept:
coding:
- system: "https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis"
code: "parental-responsibility"
display: "Parental responsibility"
- url: https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee
valueReference:
identifier:
system: https://fhir.nhs.uk/Id/nhs-number
value: '9000000017'
- url: http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor
valueReference:
identifier:
system: https://fhir.nhs.uk/Id/ods-organization-code
value: "G8101234"
search:
mode: match
Original file line number Diff line number Diff line change
Expand Up @@ -40,26 +40,27 @@ ConsentMultipleRelationshipsStatusInactiveBundle:
identifier:
system: https://fhir.nhs.uk/Id/nhs-number
value: '9000000017'
role:
coding:
- code: parental-responsibility
display: Parental responsibility
system: https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis
period:
end: '2026-02-11'
start: '2025-02-11'
extension:
- url: https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason
valueCodeableConcept:
coding:
- system: https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason
code: ROLE_DEACTIVATED_END_DATE_REACHED
display: End date reached
- url: https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee
valueReference:
identifier:
system: https://fhir.nhs.uk/Id/nhs-number
value: '9000000017'
- url: https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason
valueCodeableConcept:
coding:
- system: https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason
code: ROLE_DEACTIVATED_END_DATE_REACHED
display: End date reached
- url: "http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.regulatoryBasis"
valueCodeableConcept:
coding:
- system: "https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis"
code: "parental-responsibility"
display: "Parental responsibility"
- url: https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee
valueReference:
identifier:
system: https://fhir.nhs.uk/Id/nhs-number
value: '9000000017'
search:
mode: match
- fullUrl: https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/ABCD12B3
Expand Down Expand Up @@ -88,30 +89,31 @@ ConsentMultipleRelationshipsStatusInactiveBundle:
provision:
type: permit
actor:
- reference:
identifier:
system: https://fhir.nhs.uk/Id/nhs-number
value: '9000000017'
role:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove role

coding:
- code: parental-responsibility
display: Parental responsibility
system: https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis
- reference:
identifier:
system: https://fhir.nhs.uk/Id/nhs-number
value: '9000000017'
period:
end: '2026-02-11'
start: '2025-02-11'
extension:
- url: https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason
valueCodeableConcept:
coding:
- system: http://terminology.hl7.org/CodeSystem/consent-reason
code: OTHER
display: Other reason
text: Patient would not respond to phone calls
- url: https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee
valueReference:
identifier:
system: https://fhir.nhs.uk/Id/nhs-number
value: '9000000017'
- url: https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason
valueCodeableConcept:
coding:
- system: http://terminology.hl7.org/CodeSystem/consent-reason
code: OTHER
display: Other reason
text: Patient would not respond to phone calls
- url: "http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.regulatoryBasis"
valueCodeableConcept:
coding:
- system: "https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis"
code: "parental-responsibility"
display: "Parental responsibility"
- url: https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee
valueReference:
identifier:
system: https://fhir.nhs.uk/Id/nhs-number
value: '9000000017'
search:
mode: match
Loading