diff --git a/postman/validated_relationship_service.integration.postman_collection.json b/postman/validated_relationship_service.integration.postman_collection.json index 1abfe654..8155564f 100644 --- a/postman/validated_relationship_service.integration.postman_collection.json +++ b/postman/validated_relationship_service.integration.postman_collection.json @@ -10050,4 +10050,4 @@ "value": "" } ] -} \ No newline at end of file +} diff --git a/postman/validated_relationship_service.sandbox.postman_collection.json b/postman/validated_relationship_service.sandbox.postman_collection.json index 03facbdb..2e586338 100644 --- a/postman/validated_relationship_service.sandbox.postman_collection.json +++ b/postman/validated_relationship_service.sandbox.postman_collection.json @@ -11554,4 +11554,4 @@ "value": "https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4" } ] -} \ No newline at end of file +} diff --git a/sandbox/api/post_consent.py b/sandbox/api/post_consent.py index a44cbd41..0a8f220d 100644 --- a/sandbox/api/post_consent.py +++ b/sandbox/api/post_consent.py @@ -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 diff --git a/sandbox/api/tests/test_post_consent.py b/sandbox/api/tests/test_post_consent.py index 4978647a..1207cfd3 100644 --- a/sandbox/api/tests/test_post_consent.py +++ b/sandbox/api/tests/test_post_consent.py @@ -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: diff --git a/specification/examples/requests/PATCH_Consent/replace_legal_basis.yaml b/specification/examples/requests/PATCH_Consent/replace_legal_basis.yaml deleted file mode 100644 index a08a4f72..00000000 --- a/specification/examples/requests/PATCH_Consent/replace_legal_basis.yaml +++ /dev/null @@ -1,17 +0,0 @@ -ReplaceLegalBasisRequest: - summary: Replace legal basis - description: payload used to add a new actor (legal basis) to the consent provision - value: - - op: replace - path: /provision/actor - value: - 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" diff --git a/specification/examples/requests/PATCH_Consent/replace_regulatory_basis.yaml b/specification/examples/requests/PATCH_Consent/replace_regulatory_basis.yaml new file mode 100644 index 00000000..d86432d0 --- /dev/null +++ b/specification/examples/requests/PATCH_Consent/replace_regulatory_basis.yaml @@ -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 diff --git a/specification/examples/requests/POST_Consent/adult_to_adult_proxy_creation.yaml b/specification/examples/requests/POST_Consent/adult_to_adult_proxy_creation.yaml index acbfb14b..45c443e9 100644 --- a/specification/examples/requests/POST_Consent/adult_to_adult_proxy_creation.yaml +++ b/specification/examples/requests/POST_Consent/adult_to_adult_proxy_creation.yaml @@ -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 diff --git a/specification/examples/requests/POST_Consent/parent_child_proxy_creation.yaml b/specification/examples/requests/POST_Consent/parent_child_proxy_creation.yaml index df500ac1..35bd7667 100644 --- a/specification/examples/requests/POST_Consent/parent_child_proxy_creation.yaml +++ b/specification/examples/requests/POST_Consent/parent_child_proxy_creation.yaml @@ -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: diff --git a/specification/examples/responses/GET_Consent/filtered-relationships-status-active-include-details.yaml b/specification/examples/responses/GET_Consent/filtered-relationships-status-active-include-details.yaml index 7a01311a..c4686c3f 100644 --- a/specification/examples/responses/GET_Consent/filtered-relationships-status-active-include-details.yaml +++ b/specification/examples/responses/GET_Consent/filtered-relationships-status-active-include-details.yaml @@ -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" @@ -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: @@ -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 diff --git a/specification/examples/responses/GET_Consent/filtered-relationships-status-inactive.yaml b/specification/examples/responses/GET_Consent/filtered-relationships-status-inactive.yaml index 12afd03f..aa4b1ea6 100644 --- a/specification/examples/responses/GET_Consent/filtered-relationships-status-inactive.yaml +++ b/specification/examples/responses/GET_Consent/filtered-relationships-status-inactive.yaml @@ -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 @@ -88,30 +89,31 @@ ConsentMultipleRelationshipsStatusInactiveBundle: provision: type: permit actor: - - reference: - 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 + - 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 diff --git a/specification/examples/responses/GET_Consent/filtered-relationships-status-proposed-active.yaml b/specification/examples/responses/GET_Consent/filtered-relationships-status-proposed-active.yaml index 348a7ff4..c925499c 100644 --- a/specification/examples/responses/GET_Consent/filtered-relationships-status-proposed-active.yaml +++ b/specification/examples/responses/GET_Consent/filtered-relationships-status-proposed-active.yaml @@ -40,11 +40,6 @@ ConsentMultipleRelationshipsStatusProposedActiveBundle: 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' @@ -55,6 +50,12 @@ ConsentMultipleRelationshipsStatusProposedActiveBundle: - 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: @@ -98,11 +99,6 @@ ConsentMultipleRelationshipsStatusProposedActiveBundle: 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' @@ -113,6 +109,12 @@ ConsentMultipleRelationshipsStatusProposedActiveBundle: - 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: @@ -156,11 +158,6 @@ ConsentMultipleRelationshipsStatusProposedActiveBundle: 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' @@ -171,6 +168,12 @@ ConsentMultipleRelationshipsStatusProposedActiveBundle: - system: https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason code: APPLICATION_SUBMITTED display: Application submitted online + - 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: @@ -214,11 +217,6 @@ ConsentMultipleRelationshipsStatusProposedActiveBundle: 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' @@ -229,6 +227,12 @@ ConsentMultipleRelationshipsStatusProposedActiveBundle: - system: https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason code: APPLICATION_SUBMITTED display: Application submitted online + - 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: diff --git a/specification/examples/responses/GET_Consent/multiple-relationships-include-patient.yaml b/specification/examples/responses/GET_Consent/multiple-relationships-include-patient.yaml index fa287995..6118be44 100644 --- a/specification/examples/responses/GET_Consent/multiple-relationships-include-patient.yaml +++ b/specification/examples/responses/GET_Consent/multiple-relationships-include-patient.yaml @@ -72,11 +72,6 @@ ConsentMultipleRelationshipsIncludePatientBundle: identifier: system: https://fhir.nhs.uk/Id/nhs-number value: '9000000022' - 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" @@ -87,6 +82,12 @@ ConsentMultipleRelationshipsIncludePatientBundle: - 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: @@ -158,11 +159,6 @@ ConsentMultipleRelationshipsIncludePatientBundle: identifier: system: https://fhir.nhs.uk/Id/nhs-number value: '9000000022' - 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" @@ -173,6 +169,12 @@ ConsentMultipleRelationshipsIncludePatientBundle: - 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: @@ -244,11 +246,6 @@ ConsentMultipleRelationshipsIncludePatientBundle: identifier: system: https://fhir.nhs.uk/Id/nhs-number value: '9000000022' - 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" @@ -259,6 +256,12 @@ ConsentMultipleRelationshipsIncludePatientBundle: - 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: diff --git a/specification/examples/responses/GET_Consent/multiple-relationships-include-performer-patient.yaml b/specification/examples/responses/GET_Consent/multiple-relationships-include-performer-patient.yaml index 559834de..55990492 100644 --- a/specification/examples/responses/GET_Consent/multiple-relationships-include-performer-patient.yaml +++ b/specification/examples/responses/GET_Consent/multiple-relationships-include-performer-patient.yaml @@ -96,11 +96,6 @@ ConsentMultipleRelationshipsIncludePerformerPatientBundle: identifier: system: https://fhir.nhs.uk/Id/nhs-number value: '9000000022' - 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" @@ -111,6 +106,12 @@ ConsentMultipleRelationshipsIncludePerformerPatientBundle: - 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: @@ -201,11 +202,6 @@ ConsentMultipleRelationshipsIncludePerformerPatientBundle: identifier: system: https://fhir.nhs.uk/Id/nhs-number value: '9000000022' - role: - coding: - - code: best-interest - display: Best Interest - system: https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis period: end: "2026-02-11" start: "2025-02-11" @@ -216,6 +212,12 @@ ConsentMultipleRelationshipsIncludePerformerPatientBundle: - 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: "best-interest" + display: "Best Interest" - url: https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee valueReference: identifier: @@ -306,11 +308,6 @@ ConsentMultipleRelationshipsIncludePerformerPatientBundle: identifier: system: https://fhir.nhs.uk/Id/nhs-number value: '9000000022' - role: - coding: - - code: best-interest - display: Best Interest - system: https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis period: end: "2026-02-11" start: "2025-02-11" @@ -321,6 +318,12 @@ ConsentMultipleRelationshipsIncludePerformerPatientBundle: - 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: "best-interest" + display: "Best Interest" - url: https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee valueReference: identifier: diff --git a/specification/examples/responses/GET_Consent/multiple-relationships-include-performer.yaml b/specification/examples/responses/GET_Consent/multiple-relationships-include-performer.yaml index cc813ede..48e91fba 100644 --- a/specification/examples/responses/GET_Consent/multiple-relationships-include-performer.yaml +++ b/specification/examples/responses/GET_Consent/multiple-relationships-include-performer.yaml @@ -65,11 +65,6 @@ ConsentMultipleRelationshipsIncludePerformerBundle: identifier: system: https://fhir.nhs.uk/Id/nhs-number value: '9000000022' - 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' @@ -80,6 +75,12 @@ ConsentMultipleRelationshipsIncludePerformerBundle: - 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: @@ -143,11 +144,6 @@ ConsentMultipleRelationshipsIncludePerformerBundle: identifier: system: https://fhir.nhs.uk/Id/nhs-number value: '9000000022' - role: - coding: - - code: best-interest - display: Best Interest - system: https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis period: end: '2026-02-11' start: '2025-02-11' @@ -158,6 +154,12 @@ ConsentMultipleRelationshipsIncludePerformerBundle: - 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: best-interest + display: Best interest - url: https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee valueReference: identifier: @@ -221,11 +223,6 @@ ConsentMultipleRelationshipsIncludePerformerBundle: identifier: system: https://fhir.nhs.uk/Id/nhs-number value: '9000000022' - role: - coding: - - code: best-interest - display: Best Interest - system: https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis period: end: '2026-02-11' start: '2025-02-11' @@ -236,6 +233,12 @@ ConsentMultipleRelationshipsIncludePerformerBundle: - 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: 'best-interest' + display: 'Best interest' - url: https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee valueReference: identifier: diff --git a/specification/examples/responses/GET_Consent/multiple-relationships-single-patient-include-patient.yaml b/specification/examples/responses/GET_Consent/multiple-relationships-single-patient-include-patient.yaml index 21cd4169..4940c89a 100644 --- a/specification/examples/responses/GET_Consent/multiple-relationships-single-patient-include-patient.yaml +++ b/specification/examples/responses/GET_Consent/multiple-relationships-single-patient-include-patient.yaml @@ -69,11 +69,6 @@ ConsentMultipleRelationshipsSinglePatientIncludePatientBundle: identifier: system: https://fhir.nhs.uk/Id/nhs-number value: '9000000020' - role: - coding: - - code: court-appointed-personal-welfare-deputy - display: Court appointed personal welfare deputy - system: https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis period: end: "2026-02-11" start: "2025-02-11" @@ -84,6 +79,12 @@ ConsentMultipleRelationshipsSinglePatientIncludePatientBundle: - 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: "court-appointed-personal-welfare-deputy" + display: "Court appointed personal welfare deputy" - url: https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee valueReference: identifier: @@ -126,11 +127,6 @@ ConsentMultipleRelationshipsSinglePatientIncludePatientBundle: identifier: system: https://fhir.nhs.uk/Id/nhs-number value: '9000000021' - role: - coding: - - code: court-appointed-personal-welfare-deputy - display: Court appointed personal welfare deputy - system: https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis period: end: "2026-02-11" start: "2025-02-11" @@ -141,6 +137,12 @@ ConsentMultipleRelationshipsSinglePatientIncludePatientBundle: - 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: "court-appointed-personal-welfare-deputy" + display: "Court appointed personal welfare deputy" - url: https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee valueReference: identifier: @@ -183,11 +185,6 @@ ConsentMultipleRelationshipsSinglePatientIncludePatientBundle: identifier: system: https://fhir.nhs.uk/Id/nhs-number value: '9000000022' - 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" @@ -198,6 +195,12 @@ ConsentMultipleRelationshipsSinglePatientIncludePatientBundle: - 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: diff --git a/specification/examples/responses/GET_Consent/multiple-relationships-single-patient-include-performer-patient.yaml b/specification/examples/responses/GET_Consent/multiple-relationships-single-patient-include-performer-patient.yaml index a2f9a9ef..efc18a0a 100644 --- a/specification/examples/responses/GET_Consent/multiple-relationships-single-patient-include-performer-patient.yaml +++ b/specification/examples/responses/GET_Consent/multiple-relationships-single-patient-include-performer-patient.yaml @@ -91,11 +91,6 @@ ConsentMultipleRelationshipsSinglePatientIncludePerformerPatientBundle: identifier: system: https://fhir.nhs.uk/Id/nhs-number value: '9000000020' - role: - coding: - - code: court-appointed-personal-welfare-deputy - display: Court appointed personal welfare deputy - system: https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis period: end: "2026-02-11" start: "2025-02-11" @@ -106,6 +101,12 @@ ConsentMultipleRelationshipsSinglePatientIncludePerformerPatientBundle: - 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: "court-appointed-personal-welfare-deputy" + display: "Court appointed personal welfare deputy" - url: https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee valueReference: identifier: @@ -166,11 +167,6 @@ ConsentMultipleRelationshipsSinglePatientIncludePerformerPatientBundle: identifier: system: https://fhir.nhs.uk/Id/nhs-number value: '9000000021' - role: - coding: - - code: court-appointed-personal-welfare-deputy - display: Court appointed personal welfare deputy - system: https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis period: end: "2026-02-11" start: "2025-02-11" @@ -181,6 +177,12 @@ ConsentMultipleRelationshipsSinglePatientIncludePerformerPatientBundle: - 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: "court-appointed-personal-welfare-deputy" + display: "Court appointed personal welfare deputy" - url: https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee valueReference: identifier: @@ -241,11 +243,6 @@ ConsentMultipleRelationshipsSinglePatientIncludePerformerPatientBundle: identifier: system: https://fhir.nhs.uk/Id/nhs-number value: '9000000022' - 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" @@ -256,6 +253,12 @@ ConsentMultipleRelationshipsSinglePatientIncludePerformerPatientBundle: - 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: diff --git a/specification/examples/responses/GET_Consent/multiple-relationships-single-patient-include-performer.yaml b/specification/examples/responses/GET_Consent/multiple-relationships-single-patient-include-performer.yaml index c2fc940d..593ebf55 100644 --- a/specification/examples/responses/GET_Consent/multiple-relationships-single-patient-include-performer.yaml +++ b/specification/examples/responses/GET_Consent/multiple-relationships-single-patient-include-performer.yaml @@ -62,11 +62,6 @@ ConsentMultipleRelationshipsSinglePatientIncludePerformerPatientBundle: identifier: system: https://fhir.nhs.uk/Id/nhs-number value: '9000000020' - role: - coding: - - code: court-appointed-personal-welfare-deputy - display: Court appointed personal welfare deputy - system: https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis period: end: '2026-02-11' start: '2025-02-11' @@ -77,6 +72,12 @@ ConsentMultipleRelationshipsSinglePatientIncludePerformerPatientBundle: - 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: "court-appointed-personal-welfare-deputy" + display: "Court appointed personal welfare deputy" - url: https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee valueReference: identifier: @@ -137,11 +138,6 @@ ConsentMultipleRelationshipsSinglePatientIncludePerformerPatientBundle: identifier: system: https://fhir.nhs.uk/Id/nhs-number value: '9000000021' - role: - coding: - - code: court-appointed-personal-welfare-deputy - display: Court appointed personal welfare deputy - system: https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis period: end: '2026-02-11' start: '2025-02-11' @@ -152,6 +148,12 @@ ConsentMultipleRelationshipsSinglePatientIncludePerformerPatientBundle: - 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: "court-appointed-personal-welfare-deputy" + display: "Court appointed personal welfare deputy" - url: https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee valueReference: identifier: @@ -212,11 +214,6 @@ ConsentMultipleRelationshipsSinglePatientIncludePerformerPatientBundle: identifier: system: https://fhir.nhs.uk/Id/nhs-number value: '9000000022' - 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' @@ -227,6 +224,12 @@ ConsentMultipleRelationshipsSinglePatientIncludePerformerPatientBundle: - 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: diff --git a/specification/examples/responses/GET_Consent/multiple-relationships-single-patient.yaml b/specification/examples/responses/GET_Consent/multiple-relationships-single-patient.yaml index 1b133722..30c14904 100644 --- a/specification/examples/responses/GET_Consent/multiple-relationships-single-patient.yaml +++ b/specification/examples/responses/GET_Consent/multiple-relationships-single-patient.yaml @@ -40,11 +40,6 @@ ConsentMultipleRelationshipsSinglePatientBundle: identifier: system: https://fhir.nhs.uk/Id/nhs-number value: '9000000020' - 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' @@ -55,6 +50,12 @@ ConsentMultipleRelationshipsSinglePatientBundle: - 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: @@ -97,11 +98,6 @@ ConsentMultipleRelationshipsSinglePatientBundle: identifier: system: https://fhir.nhs.uk/Id/nhs-number value: '9000000021' - role: - coding: - - code: court-appointed-personal-welfare-deputy - display: Court appointed personal welfare deputy - system: https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis period: end: '2026-02-11' start: '2025-02-11' @@ -112,6 +108,12 @@ ConsentMultipleRelationshipsSinglePatientBundle: - 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: "court-appointed-personal-welfare-deputy" + display: "Court appointed personal welfare deputy" - url: https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee valueReference: identifier: @@ -154,11 +156,6 @@ ConsentMultipleRelationshipsSinglePatientBundle: identifier: system: https://fhir.nhs.uk/Id/nhs-number value: '9000000022' - role: - coding: - - code: court-appointed-personal-welfare-deputy - display: Court appointed personal welfare deputy - system: https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis period: end: '2026-02-11' start: '2025-02-11' @@ -169,6 +166,12 @@ ConsentMultipleRelationshipsSinglePatientBundle: - 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: "court-appointed-personal-welfare-deputy" + display: "Court appointed personal welfare deputy" - url: https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee valueReference: identifier: diff --git a/specification/examples/responses/GET_Consent/multiple-relationships.yaml b/specification/examples/responses/GET_Consent/multiple-relationships.yaml index ee24d794..768617a5 100644 --- a/specification/examples/responses/GET_Consent/multiple-relationships.yaml +++ b/specification/examples/responses/GET_Consent/multiple-relationships.yaml @@ -40,11 +40,6 @@ ConsentMultipleRelationshipsBundle: identifier: system: https://fhir.nhs.uk/Id/nhs-number value: '9000000022' - 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' @@ -55,6 +50,12 @@ ConsentMultipleRelationshipsBundle: - 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: @@ -97,11 +98,6 @@ ConsentMultipleRelationshipsBundle: identifier: system: https://fhir.nhs.uk/Id/nhs-number value: '9000000022' - 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' @@ -112,6 +108,12 @@ ConsentMultipleRelationshipsBundle: - 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: @@ -154,11 +156,6 @@ ConsentMultipleRelationshipsBundle: identifier: system: https://fhir.nhs.uk/Id/nhs-number value: '9000000022' - 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' @@ -169,6 +166,12 @@ ConsentMultipleRelationshipsBundle: - 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: diff --git a/specification/examples/responses/GET_Consent/single-consenting-adult-relationship-include-patient.yaml b/specification/examples/responses/GET_Consent/single-consenting-adult-relationship-include-patient.yaml index c85322b6..1f2011fa 100644 --- a/specification/examples/responses/GET_Consent/single-consenting-adult-relationship-include-patient.yaml +++ b/specification/examples/responses/GET_Consent/single-consenting-adult-relationship-include-patient.yaml @@ -69,11 +69,6 @@ ConsentSingleConsentingAdultRelationshipIncludePatientBundle: identifier: system: https://fhir.nhs.uk/Id/nhs-number value: '9000000010' - role: - coding: - - code: parental-responsibility - display: Parental responsibility - system: https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis period: end: "2029-02-11" start: "2025-02-11" @@ -84,6 +79,12 @@ ConsentSingleConsentingAdultRelationshipIncludePatientBundle: - 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: diff --git a/specification/examples/responses/GET_Consent/single-consenting-adult-relationship-include-performer-patient.yaml b/specification/examples/responses/GET_Consent/single-consenting-adult-relationship-include-performer-patient.yaml index e6142394..72d243a2 100644 --- a/specification/examples/responses/GET_Consent/single-consenting-adult-relationship-include-performer-patient.yaml +++ b/specification/examples/responses/GET_Consent/single-consenting-adult-relationship-include-performer-patient.yaml @@ -90,11 +90,6 @@ ConsentSingleConsentingAdultRelationshipIncludePerformerPatientBundle: identifier: system: https://fhir.nhs.uk/Id/nhs-number value: '9000000010' - role: - coding: - - code: parental-responsibility - display: Parental responsibility - system: https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis period: end: "2029-02-11" start: "2025-02-11" @@ -105,6 +100,12 @@ ConsentSingleConsentingAdultRelationshipIncludePerformerPatientBundle: - 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: diff --git a/specification/examples/responses/GET_Consent/single-consenting-adult-relationship-include-performer.yaml b/specification/examples/responses/GET_Consent/single-consenting-adult-relationship-include-performer.yaml index c8e51d63..7957a585 100644 --- a/specification/examples/responses/GET_Consent/single-consenting-adult-relationship-include-performer.yaml +++ b/specification/examples/responses/GET_Consent/single-consenting-adult-relationship-include-performer.yaml @@ -60,11 +60,6 @@ ConsentSingleConsentingAdultRelationshipIncludePerformerBundle: identifier: system: https://fhir.nhs.uk/Id/nhs-number value: '9000000010' - role: - coding: - - code: parental-responsibility - display: Parental responsibility - system: https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis period: end: "2029-02-11" start: "2025-02-11" @@ -75,6 +70,12 @@ ConsentSingleConsentingAdultRelationshipIncludePerformerBundle: - 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: diff --git a/specification/examples/responses/GET_Consent/single-consenting-adult-relationship.yaml b/specification/examples/responses/GET_Consent/single-consenting-adult-relationship.yaml index 7ae1f72f..423399b1 100644 --- a/specification/examples/responses/GET_Consent/single-consenting-adult-relationship.yaml +++ b/specification/examples/responses/GET_Consent/single-consenting-adult-relationship.yaml @@ -40,11 +40,6 @@ ConsentSingleConsentingAdultRelationshipBundle: identifier: system: https://fhir.nhs.uk/Id/nhs-number value: '9000000010' - role: - coding: - - code: court-appointed-personal-welfare-deputy - display: Court appointed personal welfare deputy - system: https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis period: end: '2026-02-11' start: '2025-02-11' @@ -55,6 +50,12 @@ ConsentSingleConsentingAdultRelationshipBundle: - 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: "court-appointed-personal-welfare-deputy" + display: "Court appointed personal welfare deputy" - url: https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee valueReference: identifier: diff --git a/specification/examples/responses/GET_Consent/single-mother-child-relationship-include-patient.yaml b/specification/examples/responses/GET_Consent/single-mother-child-relationship-include-patient.yaml index ba31b175..51011e78 100644 --- a/specification/examples/responses/GET_Consent/single-mother-child-relationship-include-patient.yaml +++ b/specification/examples/responses/GET_Consent/single-mother-child-relationship-include-patient.yaml @@ -69,11 +69,6 @@ ConsentSingleAdultChildRelationshipIncludePatientBundle: identifier: system: https://fhir.nhs.uk/Id/nhs-number value: '9000000019' - role: - coding: - - code: parental-responsibility - display: Parental responsibility - system: https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis extension: - url: https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason valueCodeableConcept: @@ -81,6 +76,12 @@ ConsentSingleAdultChildRelationshipIncludePatientBundle: - 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: diff --git a/specification/examples/responses/GET_Consent/single-mother-child-relationship-include-performer-patient.yaml b/specification/examples/responses/GET_Consent/single-mother-child-relationship-include-performer-patient.yaml index d642568e..6572d0fe 100644 --- a/specification/examples/responses/GET_Consent/single-mother-child-relationship-include-performer-patient.yaml +++ b/specification/examples/responses/GET_Consent/single-mother-child-relationship-include-performer-patient.yaml @@ -94,11 +94,6 @@ ConsentSingleAdultChildRelationshipIncludePerformerPatientBundle: identifier: system: https://fhir.nhs.uk/Id/nhs-number value: '9000000019' - role: - coding: - - code: parental-responsibility - display: Parental responsibility - system: https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis period: end: "2029-02-11" start: "2025-02-11" @@ -109,6 +104,12 @@ ConsentSingleAdultChildRelationshipIncludePerformerPatientBundle: - 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: diff --git a/specification/examples/responses/GET_Consent/single-mother-child-relationship-include-performer.yaml b/specification/examples/responses/GET_Consent/single-mother-child-relationship-include-performer.yaml index 56dcb1f4..e54189fb 100644 --- a/specification/examples/responses/GET_Consent/single-mother-child-relationship-include-performer.yaml +++ b/specification/examples/responses/GET_Consent/single-mother-child-relationship-include-performer.yaml @@ -63,11 +63,6 @@ ConsentSingleAdultChildRelationshipIncludePerformerBundle: identifier: system: https://fhir.nhs.uk/Id/nhs-number value: '9000000019' - role: - coding: - - code: parental-responsibility - display: Parental responsibility - system: https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis period: end: "2029-02-11" start: "2025-02-11" @@ -78,6 +73,12 @@ ConsentSingleAdultChildRelationshipIncludePerformerBundle: - 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: diff --git a/specification/examples/responses/GET_Consent/single-mother-child-relationship-unknown-legal-basis.yaml b/specification/examples/responses/GET_Consent/single-mother-child-relationship-unknown-legal-basis.yaml index c76f4903..d28196b6 100644 --- a/specification/examples/responses/GET_Consent/single-mother-child-relationship-unknown-legal-basis.yaml +++ b/specification/examples/responses/GET_Consent/single-mother-child-relationship-unknown-legal-basis.yaml @@ -43,11 +43,6 @@ ConsentSingleAdultChildRelationshipUnknownLegalBasisBundle: system: https://fhir.nhs.uk/Id/nhs-number value: '9000000111' type: RelatedPerson - role: - coding: - - code: UNK - display: Unknown - system: https://terminology.hl7.org/CodeSystem/v3-NullFlavor period: start: '2025-02-11' end: '2026-02-11' @@ -58,6 +53,12 @@ ConsentSingleAdultChildRelationshipUnknownLegalBasisBundle: - 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: "UNK" + display: "Unknown" - url: https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee valueReference: identifier: diff --git a/specification/examples/responses/GET_Consent/single-mother-child-relationship.yaml b/specification/examples/responses/GET_Consent/single-mother-child-relationship.yaml index 47e1bd17..ed0c1f04 100644 --- a/specification/examples/responses/GET_Consent/single-mother-child-relationship.yaml +++ b/specification/examples/responses/GET_Consent/single-mother-child-relationship.yaml @@ -38,17 +38,18 @@ ConsentSingleAdultChildRelationshipBundle: actor: - reference: identifier: - system: https://fhir.nhs.uk/Id/nhs-number - value: '9000000019' - role: - coding: - - code: parental-responsibility - display: Parental responsibility - system: https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis + system: https://fhir.nhs.uk/Id/nhs-number + value: '9000000019' period: end: '2029-02-11' start: '2025-02-11' extension: + - 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://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason valueCodeableConcept: coding: diff --git a/specification/validated-relationships-service-api.yaml b/specification/validated-relationships-service-api.yaml index 2cf0a202..f0f106b8 100644 --- a/specification/validated-relationships-service-api.yaml +++ b/specification/validated-relationships-service-api.yaml @@ -1037,8 +1037,8 @@ paths: - op: add path: /provision/period/end value: "2026-12-31T23:59:59Z" - replaceLegalBasis: - $ref: "./examples/requests/PATCH_Consent/replace_legal_basis.yaml#/ReplaceLegalBasisRequest" + regulatoryBasis: + $ref: "./examples/requests/PATCH_Consent/replace_regulatory_basis.yaml#/ReplaceRegulatoryBasisRequest" responses: "200": description: Consent resource successfully updated @@ -2324,6 +2324,7 @@ components: items: anyOf: - $ref: "#/components/schemas/StatusReasonExtension" + - $ref: "#/components/schemas/RegulatoryBasisExtension" - $ref: "#/components/schemas/GranteeExtension" - $ref: "#/components/schemas/GrantorExtension" description: "Additional content. For active proxy roles, grantor is required." @@ -2373,7 +2374,8 @@ components: description: "Individuals or organizations that agreed to the consent" role: $ref: "#/components/schemas/CodeableConcept" - description: "Classification of the role of consent, bound to http://terminology.hl7.org/CodeSystem/v3-RoleCode" + description: "Deprecated. Instead use the Regulatory Basis Extension." + deprecated: true StatusReasonExtension: type: object @@ -2386,6 +2388,17 @@ components: $ref: "#/components/schemas/CodeableConcept" description: Classification of the status. + RegulatoryBasisExtension: + type: object + properties: + url: + type: string + enum: + - "http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.regulatoryBasis" + valueCodeableConcept: + $ref: "#/components/schemas/CodeableConcept" + description: Classification of the regulatory basis for the consent. + GranteeExtension: type: object properties: