From a827bc278c87d24ea6b8ba309c131f276a3fb581 Mon Sep 17 00:00:00 2001 From: LeoKHoward <38526889+LeoKHoward@users.noreply.github.com> Date: Tue, 10 Feb 2026 12:17:09 +0000 Subject: [PATCH 01/11] NPA-6153: Create Update Proxy Role Grantor Field Two --- sandbox/api/constants.py | 7 +++- sandbox/api/patch_consent.py | 24 ++++++++++-- sandbox/api/post_consent.py | 12 ++++-- sandbox/api/tests/test_patch_consent.py | 26 ++++++++++++- sandbox/api/tests/test_post_consent.py | 8 +++- .../invalid_grantor_identifier_system.yaml | 17 +++++++++ .../invalid_grantor_identifier_value.yaml | 17 +++++++++ ...ctive_status.yaml => missing_grantor.yaml} | 6 +-- .../errors/missing_grantor_identifier.yaml | 17 +++++++++ .../errors/missing_grantor_reference.yaml | 17 +++++++++ .../invalid_grantor_identifier_system.yaml | 4 +- .../invalid_grantor_identifier_value.yaml | 4 +- .../POST_Consent/errors/missing_grantor.yaml | 4 +- .../errors/missing_grantor_identifier.yaml | 17 +++++++++ .../errors/missing_grantor_reference.yaml | 4 +- .../validated-relationships-service-api.yaml | 38 +++++++++++++++---- 16 files changed, 192 insertions(+), 30 deletions(-) create mode 100644 specification/examples/responses/PATCH_Consent/errors/invalid_grantor_identifier_system.yaml create mode 100644 specification/examples/responses/PATCH_Consent/errors/invalid_grantor_identifier_value.yaml rename specification/examples/responses/PATCH_Consent/errors/{missing_grantor_for_active_status.yaml => missing_grantor.yaml} (74%) create mode 100644 specification/examples/responses/PATCH_Consent/errors/missing_grantor_identifier.yaml create mode 100644 specification/examples/responses/PATCH_Consent/errors/missing_grantor_reference.yaml create mode 100644 specification/examples/responses/POST_Consent/errors/missing_grantor_identifier.yaml diff --git a/sandbox/api/constants.py b/sandbox/api/constants.py index 3ff77513..31252eb0 100644 --- a/sandbox/api/constants.py +++ b/sandbox/api/constants.py @@ -87,6 +87,7 @@ POST_CONSENT__INVALID_GRANTOR_VALUE = f"{POST_CONSENT__DIRECTORY}errors/invalid_grantor_identifier_value.yaml" POST_CONSENT__INVALID_GRANTOR_SYSTEM = f"{POST_CONSENT__DIRECTORY}errors/invalid_grantor_identifier_system.yaml" POST_CONSENT__MISSING_GRANTOR_REFERENCE = f"{POST_CONSENT__DIRECTORY}errors/missing_grantor_reference.yaml" +POST_CONSENT__MISSING_GRANTOR_IDENTIFIER = f"{POST_CONSENT__DIRECTORY}errors/missing_grantor_identifier.yaml" # PATCH Consent PATCH_CONSENT__DIRECTORY = "./api/examples/PATCH_Consent/" @@ -98,7 +99,11 @@ PATCH_CONSENT__RESOURCE_NOT_FOUND = f"{PATCH_CONSENT__DIRECTORY}errors/resource_not_found.yaml" PATCH_CONSENT__INVALID_STATE_TRANSITION = f"{PATCH_CONSENT__DIRECTORY}errors/invalid_state_transition.yaml" PATCH_CONSENT__MISSING_FREE_TEXT_FOR_OTHER = f"{PATCH_CONSENT__DIRECTORY}errors/missing_free_text_for_other.yaml" -PATCH_CONSENT__MISSING_GRANTOR_FOR_ACTIVE = f"{PATCH_CONSENT__DIRECTORY}errors/missing_grantor_for_active_status.yaml" +PATCH_CONSENT__MISSING_GRANTOR = f"{PATCH_CONSENT__DIRECTORY}errors/missing_grantor.yaml" +PATCH_CONSENT__INVALID_GRANTOR_VALUE = f"{PATCH_CONSENT__DIRECTORY}errors/invalid_grantor_identifier_value.yaml" +PATCH_CONSENT__INVALID_GRANTOR_SYSTEM = f"{PATCH_CONSENT__DIRECTORY}errors/invalid_grantor_identifier_system.yaml" +PATCH_CONSENT__MISSING_GRANTOR_REFERENCE = f"{PATCH_CONSENT__DIRECTORY}errors/missing_grantor_reference.yaml" +PATCH_CONSENT__MISSING_GRANTOR_IDENTIFIER = f"{PATCH_CONSENT__DIRECTORY}errors/missing_grantor_identifier.yaml" # POST QuestionnaireResponse POST_QUESTIONNAIRE_RESPONSE_DIRECTORY = "./api/examples/POST_QuestionnaireResponse/" diff --git a/sandbox/api/patch_consent.py b/sandbox/api/patch_consent.py index 53a59ec7..d91cd5ad 100644 --- a/sandbox/api/patch_consent.py +++ b/sandbox/api/patch_consent.py @@ -11,7 +11,9 @@ PATCH_CONSENT__SUCCESS, PATCH_CONSENT__INVALID_STATUS_REASON, PATCH_CONSENT__MISSING_FREE_TEXT_FOR_OTHER, - PATCH_CONSENT__MISSING_GRANTOR_FOR_ACTIVE, + PATCH_CONSENT__MISSING_GRANTOR, PATCH_CONSENT__INVALID_GRANTOR_VALUE, + PATCH_CONSENT__INVALID_GRANTOR_SYSTEM, PATCH_CONSENT__MISSING_GRANTOR_REFERENCE, + PATCH_CONSENT__MISSING_GRANTOR_IDENTIFIER, ) from .utils import generate_response_from_example @@ -84,8 +86,24 @@ def patch_consent_response(id: str) -> Union[dict, tuple]: return generate_response_from_example(PATCH_CONSENT__SUCCESS, 200) elif id == "90957744-b971-496e-b7c3-ab971868ce14": - # PATCH to activate proxy role without providing grantor extension - return generate_response_from_example(PATCH_CONSENT__MISSING_GRANTOR_FOR_ACTIVE, 400) + # Missing grantor extension + return generate_response_from_example(PATCH_CONSENT__MISSING_GRANTOR, 400) + + elif id == "b68cbfc8-ccc2-48ad-b97b-b7410d773dc1": + # Invalid grantor identifier value + return generate_response_from_example(PATCH_CONSENT__INVALID_GRANTOR_VALUE, 422) + + elif id == "fd189522-68e5-42dc-b44c-989be0eaa2bf": + # Invalid grantor identifier system + return generate_response_from_example(PATCH_CONSENT__INVALID_GRANTOR_SYSTEM, 422) + + elif id == "7e764160-38b6-41eb-9012-a3e476cbc517": + # Missing grantor reference + return generate_response_from_example(PATCH_CONSENT__MISSING_GRANTOR_REFERENCE, 400) + + elif id == "faefd8c5-5e24-4415-8252-96e9241c7e78": + # Missing grantor identifier + return generate_response_from_example(PATCH_CONSENT__MISSING_GRANTOR_IDENTIFIER, 400) else: # Resource not found diff --git a/sandbox/api/post_consent.py b/sandbox/api/post_consent.py index a44cbd41..1c3dbe40 100644 --- a/sandbox/api/post_consent.py +++ b/sandbox/api/post_consent.py @@ -11,7 +11,7 @@ POST_CONSENT__MISSING_GRANTOR, POST_CONSENT__INVALID_GRANTOR_VALUE, POST_CONSENT__INVALID_GRANTOR_SYSTEM, - POST_CONSENT__MISSING_GRANTOR_REFERENCE, + POST_CONSENT__MISSING_GRANTOR_REFERENCE, POST_CONSENT__MISSING_GRANTOR_IDENTIFIER, ) from .utils import generate_response_from_example @@ -68,17 +68,21 @@ def post_consent_response() -> Union[dict, tuple]: response = generate_response_from_example(POST_CONSENT__MISSING_GRANTOR, 400) elif patient_identifier == "9000000055": - # Invalid/empty ODS code + # Invalid ODS code response = generate_response_from_example(POST_CONSENT__INVALID_GRANTOR_VALUE, 422) elif patient_identifier == "9000000056": - # Wrong system + # Invalid identifier system response = generate_response_from_example(POST_CONSENT__INVALID_GRANTOR_SYSTEM, 422) elif patient_identifier == "9000000057": - # Missing valueReference/identifier + # Missing valueReference response = generate_response_from_example(POST_CONSENT__MISSING_GRANTOR_REFERENCE, 400) + elif patient_identifier == "9000000058": + # Missing valueIdentifier + response = generate_response_from_example(POST_CONSENT__MISSING_GRANTOR_IDENTIFIER, 400) + else: # Out of scope errors raise ValueError("Invalid Request") diff --git a/sandbox/api/tests/test_patch_consent.py b/sandbox/api/tests/test_patch_consent.py index e288f1f0..03fd4ae0 100644 --- a/sandbox/api/tests/test_patch_consent.py +++ b/sandbox/api/tests/test_patch_consent.py @@ -13,7 +13,9 @@ PATCH_CONSENT__SUCCESS, PATCH_CONSENT__INVALID_STATUS_REASON, PATCH_CONSENT__MISSING_FREE_TEXT_FOR_OTHER, - PATCH_CONSENT__MISSING_GRANTOR_FOR_ACTIVE, + PATCH_CONSENT__MISSING_GRANTOR, PATCH_CONSENT__INVALID_GRANTOR_VALUE, + PATCH_CONSENT__INVALID_GRANTOR_SYSTEM, PATCH_CONSENT__MISSING_GRANTOR_REFERENCE, + PATCH_CONSENT__MISSING_GRANTOR_IDENTIFIER, ) CONSENT_API_ENDPOINT = "/FHIR/R4/Consent" @@ -53,7 +55,27 @@ ), ( "90957744-b971-496e-b7c3-ab971868ce14", - PATCH_CONSENT__MISSING_GRANTOR_FOR_ACTIVE, + PATCH_CONSENT__MISSING_GRANTOR, + 400, + ), + ( + "b68cbfc8-ccc2-48ad-b97b-b7410d773dc1", + PATCH_CONSENT__INVALID_GRANTOR_VALUE, + 422, + ), + ( + "fd189522-68e5-42dc-b44c-989be0eaa2bf", + PATCH_CONSENT__INVALID_GRANTOR_SYSTEM, + 422, + ), + ( + "7e764160-38b6-41eb-9012-a3e476cbc517", + PATCH_CONSENT__MISSING_GRANTOR_REFERENCE, + 400, + ), + ( + "faefd8c5-5e24-4415-8252-96e9241c7e78", + PATCH_CONSENT__MISSING_GRANTOR_IDENTIFIER, 400, ), ( diff --git a/sandbox/api/tests/test_post_consent.py b/sandbox/api/tests/test_post_consent.py index 4978647a..12ea5092 100644 --- a/sandbox/api/tests/test_post_consent.py +++ b/sandbox/api/tests/test_post_consent.py @@ -11,7 +11,7 @@ POST_CONSENT__MISSING_GRANTOR, POST_CONSENT__INVALID_GRANTOR_VALUE, POST_CONSENT__INVALID_GRANTOR_SYSTEM, - POST_CONSENT__MISSING_GRANTOR_REFERENCE, + POST_CONSENT__MISSING_GRANTOR_REFERENCE, POST_CONSENT__MISSING_GRANTOR_IDENTIFIER, ) CONSENT_API_ENDPOINT = "/FHIR/R4/Consent" @@ -63,6 +63,12 @@ 400, None, ), + ( + "9000000058", + POST_CONSENT__MISSING_GRANTOR_IDENTIFIER, + 400, + None, + ), ( "9000000051", POST_CONSENT__SUCCESS, diff --git a/specification/examples/responses/PATCH_Consent/errors/invalid_grantor_identifier_system.yaml b/specification/examples/responses/PATCH_Consent/errors/invalid_grantor_identifier_system.yaml new file mode 100644 index 00000000..37822373 --- /dev/null +++ b/specification/examples/responses/PATCH_Consent/errors/invalid_grantor_identifier_system.yaml @@ -0,0 +1,17 @@ +PatchConsentInvalidGrantorIdentifierSystemError: + summary: Invalid Grantor Identifier System + description: Returned when the grantor identifier system is incorrect + value: + issue: + - code: invalid + details: + coding: + - code: INVALID_GRANTOR_SYSTEM + display: Invalid grantor identifier system + system: https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode + version: "1" + diagnostics: Valid grantor extension identifier system is required when creating/updating a consent with status 'active' + expression: + - "extension.where(url = 'http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor').valueReference.identifier.system" + severity: error + resourceType: OperationOutcome diff --git a/specification/examples/responses/PATCH_Consent/errors/invalid_grantor_identifier_value.yaml b/specification/examples/responses/PATCH_Consent/errors/invalid_grantor_identifier_value.yaml new file mode 100644 index 00000000..0becb92c --- /dev/null +++ b/specification/examples/responses/PATCH_Consent/errors/invalid_grantor_identifier_value.yaml @@ -0,0 +1,17 @@ +PatchConsentInvalidGrantorIdentifierValueError: + summary: Invalid Grantor ODS Code + description: Returned when the grantor ODS code value is invalid + value: + issue: + - code: invalid + details: + coding: + - code: INVALID_GRANTOR_VALUE + display: Invalid grantor identifier value + system: https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode + version: "1" + diagnostics: Valid grantor extension identifier value is required when creating/updating a consent with status 'active' + expression: + - "extension.where(url = 'http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor').valueReference.identifier.value" + severity: error + resourceType: OperationOutcome diff --git a/specification/examples/responses/PATCH_Consent/errors/missing_grantor_for_active_status.yaml b/specification/examples/responses/PATCH_Consent/errors/missing_grantor.yaml similarity index 74% rename from specification/examples/responses/PATCH_Consent/errors/missing_grantor_for_active_status.yaml rename to specification/examples/responses/PATCH_Consent/errors/missing_grantor.yaml index 9fb19e55..4a4b07d2 100644 --- a/specification/examples/responses/PATCH_Consent/errors/missing_grantor_for_active_status.yaml +++ b/specification/examples/responses/PATCH_Consent/errors/missing_grantor.yaml @@ -1,5 +1,5 @@ -PatchConsentMissingGrantorForActiveStatusError: - summary: Missing Grantor on Status Activation +PatchConsentMissingGrantorError: + summary: Missing Grantor Extension for Active Consent description: Returned when a PATCH request attempts to set status to 'active' without including a grantor extension in the same request value: issue: @@ -10,7 +10,7 @@ PatchConsentMissingGrantorForActiveStatusError: display: Grantor required for active status system: https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode version: "1" - diagnostics: Grantor extension must be included in the same PATCH request when changing status to active + diagnostics: Grantor extension is required when creating/updating an active proxy role expression: - "extension.where(url = 'http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor')" severity: error diff --git a/specification/examples/responses/PATCH_Consent/errors/missing_grantor_identifier.yaml b/specification/examples/responses/PATCH_Consent/errors/missing_grantor_identifier.yaml new file mode 100644 index 00000000..ec6bb64a --- /dev/null +++ b/specification/examples/responses/PATCH_Consent/errors/missing_grantor_identifier.yaml @@ -0,0 +1,17 @@ +PatchConsentMissingGrantorIdentifierError: + summary: Missing Grantor Identifier Structure + description: Returned when the grantor extension is missing identifier + value: + issue: + - code: invalid + details: + coding: + - code: MISSING_GRANTOR_IDENTIFIER + display: Missing grantor identifier + system: https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode + version: "1" + diagnostics: Grantor extension must contain a valueIdentifier + expression: + - "extension.where(url = 'http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor').valueReference.identifier" + severity: error + resourceType: OperationOutcome diff --git a/specification/examples/responses/PATCH_Consent/errors/missing_grantor_reference.yaml b/specification/examples/responses/PATCH_Consent/errors/missing_grantor_reference.yaml new file mode 100644 index 00000000..e994d9d7 --- /dev/null +++ b/specification/examples/responses/PATCH_Consent/errors/missing_grantor_reference.yaml @@ -0,0 +1,17 @@ +PatchConsentMissingGrantorReferenceError: + summary: Missing Grantor Reference Structure + description: Returned when the grantor extension is missing reference + value: + issue: + - code: invalid + details: + coding: + - code: MISSING_GRANTOR_REFERENCE + display: Missing grantor reference + system: https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode + version: "1" + diagnostics: Grantor extension must contain a valueReference + expression: + - "extension.where(url = 'http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor').valueReference" + severity: error + resourceType: OperationOutcome diff --git a/specification/examples/responses/POST_Consent/errors/invalid_grantor_identifier_system.yaml b/specification/examples/responses/POST_Consent/errors/invalid_grantor_identifier_system.yaml index 19856635..01ccdc82 100644 --- a/specification/examples/responses/POST_Consent/errors/invalid_grantor_identifier_system.yaml +++ b/specification/examples/responses/POST_Consent/errors/invalid_grantor_identifier_system.yaml @@ -1,6 +1,6 @@ PostConsentInvalidGrantorIdentifierSystemError: summary: Invalid Grantor Identifier System - description: Returned when the grantor identifier system is incorrect or missing + description: Returned when the grantor identifier system is incorrect value: issue: - code: invalid @@ -10,7 +10,7 @@ PostConsentInvalidGrantorIdentifierSystemError: display: Invalid grantor identifier system system: https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode version: "1" - diagnostics: Grantor extension is required when creating a consent with status 'active' + diagnostics: Valid grantor extension identifier system is required when creating/updating a consent with status 'active' expression: - "extension.where(url = 'http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor').valueReference.identifier.system" severity: error diff --git a/specification/examples/responses/POST_Consent/errors/invalid_grantor_identifier_value.yaml b/specification/examples/responses/POST_Consent/errors/invalid_grantor_identifier_value.yaml index 3868b845..266f3bd4 100644 --- a/specification/examples/responses/POST_Consent/errors/invalid_grantor_identifier_value.yaml +++ b/specification/examples/responses/POST_Consent/errors/invalid_grantor_identifier_value.yaml @@ -1,6 +1,6 @@ PostConsentInvalidGrantorIdentifierValueError: summary: Invalid Grantor ODS Code - description: Returned when the grantor ODS code value is missing, empty, or invalid + description: Returned when the grantor ODS code value is invalid value: issue: - code: invalid @@ -10,7 +10,7 @@ PostConsentInvalidGrantorIdentifierValueError: display: Invalid grantor identifier value system: https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode version: "1" - diagnostics: Grantor extension is required when creating a consent with status 'active' + diagnostics: Valid grantor extension identifier value is required when creating/updating a consent with status 'active' expression: - "extension.where(url = 'http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor').valueReference.identifier.value" severity: error diff --git a/specification/examples/responses/POST_Consent/errors/missing_grantor.yaml b/specification/examples/responses/POST_Consent/errors/missing_grantor.yaml index db52ff9d..aabb9eb0 100644 --- a/specification/examples/responses/POST_Consent/errors/missing_grantor.yaml +++ b/specification/examples/responses/POST_Consent/errors/missing_grantor.yaml @@ -1,6 +1,6 @@ PostConsentMissingGrantorError: summary: Missing Grantor Extension for Active Consent - description: Returned when creating a consent with status 'active' but no grantor extension is included + description: Returned when creating a POST consent request with status 'active' but no grantor extension is included value: issue: - code: invalid @@ -10,7 +10,7 @@ PostConsentMissingGrantorError: display: Grantor required for active status system: https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode version: "1" - diagnostics: Grantor extension is required when creating a consent with status 'active' + diagnostics: Grantor extension is required when creating/updating an active proxy role expression: - "extension.where(url = 'http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor')" severity: error diff --git a/specification/examples/responses/POST_Consent/errors/missing_grantor_identifier.yaml b/specification/examples/responses/POST_Consent/errors/missing_grantor_identifier.yaml new file mode 100644 index 00000000..cd198342 --- /dev/null +++ b/specification/examples/responses/POST_Consent/errors/missing_grantor_identifier.yaml @@ -0,0 +1,17 @@ +PostConsentMissingGrantorIdentifierError: + summary: Missing Grantor Identifier Structure + description: Returned when the grantor extension is missing reference + value: + issue: + - code: invalid + details: + coding: + - code: MISSING_GRANTOR_IDENTIFIER + display: Missing grantor identifier + system: https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode + version: "1" + diagnostics: Grantor extension must contain a valueIdentifier + expression: + - "extension.where(url = 'http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor').valueReference.identifier" + severity: error + resourceType: OperationOutcome diff --git a/specification/examples/responses/POST_Consent/errors/missing_grantor_reference.yaml b/specification/examples/responses/POST_Consent/errors/missing_grantor_reference.yaml index f5497866..de3a0045 100644 --- a/specification/examples/responses/POST_Consent/errors/missing_grantor_reference.yaml +++ b/specification/examples/responses/POST_Consent/errors/missing_grantor_reference.yaml @@ -1,6 +1,6 @@ PostConsentMissingGrantorReferenceError: summary: Missing Grantor Reference Structure - description: Returned when the grantor extension is malformed (missing valueReference or identifier) + description: Returned when the grantor extension is missing reference value: issue: - code: invalid @@ -10,7 +10,7 @@ PostConsentMissingGrantorReferenceError: display: Missing grantor reference system: https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode version: "1" - diagnostics: Grantor extension must contain a valueReference with identifier + diagnostics: Grantor extension must contain a valueReference expression: - "extension.where(url = 'http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor').valueReference" severity: error diff --git a/specification/validated-relationships-service-api.yaml b/specification/validated-relationships-service-api.yaml index 2cf0a202..19db6c8a 100644 --- a/specification/validated-relationships-service-api.yaml +++ b/specification/validated-relationships-service-api.yaml @@ -706,8 +706,9 @@ paths: | Non-OTHER reason code without free text | Request with a reason code other than 'OTHER', no free text, performer identifier `9000000052` | HTTP Status 201 and OperationOutcome response | | Non-OTHER reason code with free text | Request with a reason code other than 'OTHER', with free text, performer identifier `9000000053` | HTTP Status 201 and OperationOutcome response | | Missing free text for OTHER reason code | Request with reason code 'OTHER' but missing free text, performer identifier `9000000050` | HTTP Status 400 and MISSING_FREE_TEXT_FOR_OTHER error response | - | Missing grantor when status=active | Valid request with status 'active' but no grantor extension, performer identifier `9000000054` | HTTP Status 400 and MISSING_GRANTOR error response | - | Missing grantor valueReference/identifier | Request with grantor extension but malformed (no valueReference or identifier), performer identifier `9000000057` | HTTP Status 400 and MISSING_GRANTOR_REFERENCE error response | + | Missing grantor | Valid request with status 'active' but no grantor extension, performer identifier `9000000054` | HTTP Status 400 and MISSING_GRANTOR error response | + | Missing grantor valueReference | Request with grantor extension but missing valueReference, performer identifier `9000000057` | HTTP Status 400 and MISSING_GRANTOR_REFERENCE error response | + | Missing grantor valueIdentifier | Request with grantor extension but missing valueIdentifier, performer identifier `9000000058` | HTTP Status 400 and MISSING_GRANTOR_IDENTIFIER error response | | Invalid grantor ODS code value | Request with grantor extension but missing/empty/invalid ODS code, performer identifier `9000000055` | HTTP Status 422 and INVALID_GRANTOR_VALUE error response | | Invalid grantor identifier system | Request with grantor extension but wrong/missing identifier system, performer identifier `9000000056` | HTTP Status 422 and INVALID_GRANTOR_SYSTEM error response | | Duplicate relationship | Request for relationship that already exists, with performer identifier value of `9000000049` | HTTP Status 409 and DUPLICATE_RELATIONSHIP error response | @@ -756,7 +757,8 @@ paths: | 400 | `MISSING_PATIENT` | Missing patient. | | 400 | `MISSING_GRANTEE` | Missing grantee. | | 400 | `MISSING_GRANTOR` | Grantor extension is required when creating or activating an active proxy role. | - | 400 | `MISSING_GRANTOR_REFERENCE` | Grantor extension is present but missing valueReference or identifier. | + | 400 | `MISSING_GRANTOR_REFERENCE` | Grantor extension is present but missing valueReference. | + | 400 | `MISSING_GRANTOR_IDENTIFIER`| Grantor extension is present but missing valueIdentifier. | | 400 | `MISSING_STATUS` | Missing status. | | 400 | `MISSING_SCOPE` | Missing scope. | | 400 | `MISSING_CATEGORY` | Missing category. | @@ -779,7 +781,7 @@ paths: | 422 | `INVALID_DATETIME` | Invalid datetime. | | 422 | `INVALID_PROVISION` | Invalid provision. | | 422 | `INVALID_EXTENSION` | Invalid extension. | - | 422 | `INVALID_GRANTOR_VALUE` | Grantor ODS code is missing, empty, whitespace-only, or invalid format. | + | 422 | `INVALID_GRANTOR_VALUE` | Grantor ODS code is missing, empty, whitespace-only or invalid format. | | 422 | `INVALID_GRANTOR_SYSTEM` | Grantor identifier system is invalid (must be 'https://fhir.nhs.uk/Id/ods-organization-code'). | | 422 | `INVALID_PARAMETER` | Invalid request parameter. For details, see the diagnostics field. | | 429 | `THROTTLED` | You have exceeded your application's [rate limit](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#rate-limits). | @@ -809,6 +811,8 @@ paths: $ref: "./examples/responses/POST_Consent/errors/missing_grantor.yaml#/PostConsentMissingGrantorError" postConsentMissingGrantorReferenceError: $ref: "./examples/responses/POST_Consent/errors/missing_grantor_reference.yaml#/PostConsentMissingGrantorReferenceError" + postConsentMissingGrantorIdentifierError: + $ref: "./examples/responses/POST_Consent/errors/missing_grantor_identifier.yaml#/PostConsentMissingGrantorIdentifierError" postConsentInvalidGrantorIdentifierSystemError: $ref: "./examples/responses/POST_Consent/errors/invalid_grantor_identifier_system.yaml#/PostConsentInvalidGrantorIdentifierSystemError" postConsentInvalidGrantorIdentifierValueError: @@ -999,7 +1003,12 @@ paths: | Resource not found | Patch for non-existent Consent, request with an id not listed here | HTTP Status 404 and RESOURCE_NOT_FOUND error response | | Invalid state transition | Patch attempting invalid status change, request with id '7b7f47b8-96e5-43eb-b733-283bf1449f2c' | HTTP Status 422 and INVALID_STATE_TRANSITION error response | | Missing free text for OTHER reason code | Patch with reason code 'OTHER' but missing free text, id='d4e8a6f2-1c3b-4a7e-9d2f-8b5c7e9f1a3d' | HTTP Status 400 and MISSING_FREE_TEXT_FOR_OTHER error response | - | Missing grantor when activating status | Patch attempting to set status to 'active' without grantor extension, id='90957744-b971-496e-b7c3-ab971868ce14' | HTTP Status 400 and MISSING_GRANTOR_FOR_ACTIVE error response | + | Missing grantor | Patch attempting to set status to 'active' without grantor extension, id='90957744-b971-496e-b7c3-ab971868ce14' | HTTP Status 400 and MISSING_GRANTOR error response | + | Missing grantor valueReference | Request with grantor extension but missing valueReference, id='7e764160-38b6-41eb-9012-a3e476cbc517' | HTTP Status 400 and MISSING_GRANTOR_REFERENCE error response | + | Missing grantor valueIdentifier | Request with grantor extension but missing valueIdentifier, id='faefd8c5-5e24-4415-8252-96e9241c7e78' | HTTP Status 400 and MISSING_GRANTOR_IDENTIFIER error response | + | Invalid grantor ODS code value | Request with grantor extension but missing/empty/invalid ODS code, id='b68cbfc8-ccc2-48ad-b97b-b7410d773dc1' | HTTP Status 422 and INVALID_GRANTOR_VALUE error response | + | Invalid grantor identifier system | Request with grantor extension but wrong/missing identifier system, id='fd189522-68e5-42dc-b44c-989be0eaa2bf' | HTTP Status 422 and INVALID_GRANTOR_SYSTEM error response | + parameters: - $ref: "#/components/parameters/ConsentID" requestBody: @@ -1060,7 +1069,9 @@ paths: | 400 | `INVALID_PATCH_FORMAT` | Invalid patch format. | | 400 | `INVALID_PATCH` | Invalid patch. | | 400 | `MISSING_VALUE` | Missing header or parameter. For details, see the `diagnostics` field. | - | 400 | `MISSING_GRANTOR_FOR_ACTIVE`| Grantor extension is required when creating or activating a consent with status "active". For details, see the `diagnostics` field. | + | 400 | `MISSING_GRANTOR` | Grantor extension is required when creating or activating a consent with status "active". For details, see the `diagnostics` field. | + | 400 | `MISSING_GRANTOR_REFERENCE` | Grantor extension reference is required when creating or activating a consent with status "active". For details, see the `diagnostics` field. | + | 400 | `MISSING_GRANTOR_IDENTIFIER`| Grantor extension identifier is required when creating or activating a consent with status "active". For details, see the `diagnostics` field. | | 401 | `ACCESS_DENIED` | Missing or invalid OAuth 2.0 bearer token in request. | | 403 | `FORBIDDEN` | Access denied to resource. | | 404 | `INVALIDATED_RESOURCE` | Resource that has been marked as invalid was requested - invalid resources cannot be retrieved | @@ -1074,6 +1085,8 @@ paths: | 422 | `INVALID_LEGAL_BASIS_CODE` | Invalid legal basis code. | | 422 | `INVALID_END_DATE` | End date is invalid. | | 422 | `DUPLICATE_PATCHES` | Two or more patches use same path. | + | 422 | `INVALID_GRANTOR_VALUE` | Invalid grantor identifier value. For details, see the `diagnostics` field. | + | 422 | `INVALID_GRANTOR_SYSTEM` | Invalid grantor system value. For details, see the `diagnostics` field. | | 429 | `THROTTLED` | You have exceeded your application's [rate limit](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#rate-limits). | content: @@ -1093,8 +1106,17 @@ paths: $ref: "./examples/responses/PATCH_Consent/errors/invalid_state_transition.yaml#/PatchConsentInvalidStateTransitionError" patchConsentMissingFreeTextForOther: $ref: "./examples/responses/PATCH_Consent/errors/missing_free_text_for_other.yaml#/PatchConsentMissingFreeTextForOtherError" - patchConsentMissingGrantorForActiveStatusError: - $ref: "./examples/responses/PATCH_Consent/errors/missing_grantor_for_active_status.yaml#/PatchConsentMissingGrantorForActiveStatusError" + patchConsentMissingGrantorError: + $ref: "./examples/responses/PATCH_Consent/errors/missing_grantor.yaml#/PatchConsentMissingGrantorError" + patchConsentMissingGrantorReferenceError: + $ref: "./examples/responses/PATCH_Consent/errors/missing_grantor_reference.yaml#/PatchConsentMissingGrantorReferenceError" + patchConsentMissingGrantorIdentifierError: + $ref: "./examples/responses/PATCH_Consent/errors/missing_grantor_identifier.yaml#/PatchConsentMissingGrantorIdentifierError" + patchConsentInvalidGrantorIdentifierSystemError: + $ref: "./examples/responses/PATCH_Consent/errors/invalid_grantor_identifier_system.yaml#/PatchConsentInvalidGrantorIdentifierSystemError" + patchConsentInvalidGrantorIdentifierValueError: + $ref: "./examples/responses/PATCH_Consent/errors/invalid_grantor_identifier_value.yaml#/PatchConsentInvalidGrantorIdentifierValueError" + "5XX": description: | Errors will be returned for the first error encountered in the request. An error occurred as follows: From 0c0224ad6ffd930777e8cd8365f1c6f0622dbe24 Mon Sep 17 00:00:00 2001 From: LeoKHoward <38526889+LeoKHoward@users.noreply.github.com> Date: Tue, 10 Feb 2026 12:18:48 +0000 Subject: [PATCH 02/11] NPA-6153: Sandbox formatting --- sandbox/api/patch_consent.py | 6 ++++-- sandbox/api/post_consent.py | 3 ++- sandbox/api/tests/test_patch_consent.py | 6 ++++-- sandbox/api/tests/test_post_consent.py | 3 ++- 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/sandbox/api/patch_consent.py b/sandbox/api/patch_consent.py index d91cd5ad..41899d8e 100644 --- a/sandbox/api/patch_consent.py +++ b/sandbox/api/patch_consent.py @@ -11,8 +11,10 @@ PATCH_CONSENT__SUCCESS, PATCH_CONSENT__INVALID_STATUS_REASON, PATCH_CONSENT__MISSING_FREE_TEXT_FOR_OTHER, - PATCH_CONSENT__MISSING_GRANTOR, PATCH_CONSENT__INVALID_GRANTOR_VALUE, - PATCH_CONSENT__INVALID_GRANTOR_SYSTEM, PATCH_CONSENT__MISSING_GRANTOR_REFERENCE, + PATCH_CONSENT__MISSING_GRANTOR, + PATCH_CONSENT__INVALID_GRANTOR_VALUE, + PATCH_CONSENT__INVALID_GRANTOR_SYSTEM, + PATCH_CONSENT__MISSING_GRANTOR_REFERENCE, PATCH_CONSENT__MISSING_GRANTOR_IDENTIFIER, ) from .utils import generate_response_from_example diff --git a/sandbox/api/post_consent.py b/sandbox/api/post_consent.py index 1c3dbe40..a194ed80 100644 --- a/sandbox/api/post_consent.py +++ b/sandbox/api/post_consent.py @@ -11,7 +11,8 @@ POST_CONSENT__MISSING_GRANTOR, POST_CONSENT__INVALID_GRANTOR_VALUE, POST_CONSENT__INVALID_GRANTOR_SYSTEM, - POST_CONSENT__MISSING_GRANTOR_REFERENCE, POST_CONSENT__MISSING_GRANTOR_IDENTIFIER, + POST_CONSENT__MISSING_GRANTOR_REFERENCE, + POST_CONSENT__MISSING_GRANTOR_IDENTIFIER, ) from .utils import generate_response_from_example diff --git a/sandbox/api/tests/test_patch_consent.py b/sandbox/api/tests/test_patch_consent.py index 03fd4ae0..9705c66c 100644 --- a/sandbox/api/tests/test_patch_consent.py +++ b/sandbox/api/tests/test_patch_consent.py @@ -13,8 +13,10 @@ PATCH_CONSENT__SUCCESS, PATCH_CONSENT__INVALID_STATUS_REASON, PATCH_CONSENT__MISSING_FREE_TEXT_FOR_OTHER, - PATCH_CONSENT__MISSING_GRANTOR, PATCH_CONSENT__INVALID_GRANTOR_VALUE, - PATCH_CONSENT__INVALID_GRANTOR_SYSTEM, PATCH_CONSENT__MISSING_GRANTOR_REFERENCE, + PATCH_CONSENT__MISSING_GRANTOR, + PATCH_CONSENT__INVALID_GRANTOR_VALUE, + PATCH_CONSENT__INVALID_GRANTOR_SYSTEM, + PATCH_CONSENT__MISSING_GRANTOR_REFERENCE, PATCH_CONSENT__MISSING_GRANTOR_IDENTIFIER, ) diff --git a/sandbox/api/tests/test_post_consent.py b/sandbox/api/tests/test_post_consent.py index 12ea5092..9bb76917 100644 --- a/sandbox/api/tests/test_post_consent.py +++ b/sandbox/api/tests/test_post_consent.py @@ -11,7 +11,8 @@ POST_CONSENT__MISSING_GRANTOR, POST_CONSENT__INVALID_GRANTOR_VALUE, POST_CONSENT__INVALID_GRANTOR_SYSTEM, - POST_CONSENT__MISSING_GRANTOR_REFERENCE, POST_CONSENT__MISSING_GRANTOR_IDENTIFIER, + POST_CONSENT__MISSING_GRANTOR_REFERENCE, + POST_CONSENT__MISSING_GRANTOR_IDENTIFIER, ) CONSENT_API_ENDPOINT = "/FHIR/R4/Consent" From 21f6107eec8cffc79de15e0c74619d366d872c89 Mon Sep 17 00:00:00 2001 From: LeoKHoward <38526889+LeoKHoward@users.noreply.github.com> Date: Wed, 11 Feb 2026 09:23:59 +0000 Subject: [PATCH 03/11] NPA-6153: Commit sandbox changes --- ...ip_service.sandbox.postman_collection.json | 643 +++++++++++++++++- 1 file changed, 636 insertions(+), 7 deletions(-) diff --git a/postman/validated_relationship_service.sandbox.postman_collection.json b/postman/validated_relationship_service.sandbox.postman_collection.json index 58a728b0..b5f1e8ff 100644 --- a/postman/validated_relationship_service.sandbox.postman_collection.json +++ b/postman/validated_relationship_service.sandbox.postman_collection.json @@ -1,11 +1,11 @@ { "info": { - "_postman_id": "c94b6209-92a0-4515-9528-11206adfcae2", + "_postman_id": "42b78898-1d68-430e-b112-1b90e5002695", "name": "Validated Relationship Service Sandbox 06/02/26", "description": "This Postman collection includes example scenarios for each of the Validated Relationship Service (VRS) API endpoints, covering both valid and invalid request scenarios.\n\nThe collection is pointed towards the VRS sandbox environment, which will return a specific example response based on the request sent. All data shown in the requests or responses is test data.\n\nOur sandbox environment only covers the scenarios listed in the Postman collection and is open access. It does not allow you to test authorisation or any scenarios beyond the ones documented.\n\nFull specification is available at [https://digital.nhs.uk/developer/api-catalogue/validated-relationship-service](https://digital.nhs.uk/developer/api-catalogue/validated-relationship-service)", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", "_exporter_id": "46399153", - "_collection_link": "https://www.postman.com/leohoward/workspace/vrsa-06-02-2026/collection/46399153-c94b6209-92a0-4515-9528-11206adfcae2?action=share&source=collection_link&creator=46399153" + "_collection_link": "https://www.postman.com/leohoward/workspace/vrsa-10-02-2026/collection/46399153-42b78898-1d68-430e-b112-1b90e5002695?action=share&source=collection_link&creator=46399153" }, "item": [ { @@ -8609,6 +8609,351 @@ }, "response": [] }, + { + "name": "Missing grantor", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"issue\": [", + " {", + " \"code\": \"invalid\",", + " \"details\": {", + " \"coding\": [", + " {", + " \"code\": \"MISSING_GRANTOR\",", + " \"display\": \"Grantor required for active status\",", + " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", + " \"version\": \"1\"", + " }", + " ]", + " },", + " \"diagnostics\": \"Grantor extension is required when creating/updating an active proxy role\",", + " \"expression\": [", + " \"extension.where(url = 'http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor')\"", + " ],", + " \"severity\": \"error\"", + " }", + " ],", + " \"resourceType\": \"OperationOutcome\"", + "}", + "", + "pm.test(\"Status code is 400\", function () {", + " pm.response.to.have.status(400);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " var responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n\t\"resourceType\": \"Consent\",\n\t\"status\": \"active\",\n\t\"scope\": {\n\t\t\"coding\": [\n\t\t\t{\n\t\t\t\t\"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\",\n\t\t\t\t\"code\": \"patient-privacy\",\n\t\t\t\t\"display\": \"Privacy Consent\"\n\t\t\t}\n\t\t]\n\t},\n\t\"category\": [\n\t\t{\n\t\t\t\"coding\": [\n\t\t\t\t{\n\t\t\t\t\t\"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\",\n\t\t\t\t\t\"code\": \"INFA\",\n\t\t\t\t\t\"display\": \"information access\"\n\t\t\t\t}\n\t\t\t]\n\t\t}\n\t],\n\t\"patient\": {\n\t\t\"type\": \"Patient\",\n\t\t\"identifier\": {\n\t\t\t\"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n\t\t\t\"value\": \"9000000054\"\n\t\t}\n\t},\n\t\"dateTime\": \"2025-02-11T14:30:00Z\",\n\t\"performer\": [\n\t\t{\n\t\t\t\"type\": \"RelatedPerson\",\n\t\t\t\"identifier\": {\n\t\t\t\t\"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n\t\t\t\t\"value\": \"9000000054\"\n\t\t\t}\n\t\t}\n\t],\n\t\"provision\": {\n\t\t\"type\": \"permit\",\n\t\t\"period\": {\n\t\t\t\"start\": \"2025-02-11\",\n\t\t\t\"end\": \"2026-02-11\"\n\t\t},\n\t\t\"actor\": [\n\t\t\t{\n\t\t\t\t\"role\": {\n\t\t\t\t\t\"coding\": [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n\t\t\t\t\t\t\t\"code\": \"PRN\",\n\t\t\t\t\t\t\t\"display\": \"Parent\"\n\t\t\t\t\t\t}\n\t\t\t\t\t]\n\t\t\t\t},\n\t\t\t\t\"reference\": {\n\t\t\t\t\t\"type\": \"RelatedPerson\",\n\t\t\t\t\t\"identifier\": {\n\t\t\t\t\t\t\"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n\t\t\t\t\t\t\"value\": \"9000000054\"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t]\n\t},\n\t\"extension\": [\n\t\t{\n\t\t\t\"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n\t\t\t\"valueCodeableConcept\": {\n\t\t\t\t\"coding\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"system\": \"http://terminology.hl7.org/CodeSystem/consent-reason\",\n\t\t\t\t\t\t\"code\": \"TBC\",\n\t\t\t\t\t\t\"display\": \"TBC\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n\t\t\t\"valueReference\": {\n\t\t\t\t\"identifier\": {\n\t\t\t\t\t\"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n\t\t\t\t\t\"value\": \"9736898148\"\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t]\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{api_base_url}}/Consent", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ] + } + }, + "response": [] + }, + { + "name": "Missing grantor identifier", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"issue\": [", + " {", + " \"code\": \"invalid\",", + " \"details\": {", + " \"coding\": [", + " {", + " \"code\": \"MISSING_GRANTOR_IDENTIFIER\",", + " \"display\": \"Missing grantor identifier\",", + " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", + " \"version\": \"1\"", + " }", + " ]", + " },", + " \"diagnostics\": \"Grantor extension must contain a valueIdentifier\",", + " \"expression\": [", + " \"extension.where(url = 'http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor').valueReference.identifier\"", + " ],", + " \"severity\": \"error\"", + " }", + " ],", + " \"resourceType\": \"OperationOutcome\"", + "}", + "", + "pm.test(\"Status code is 400\", function () {", + " pm.response.to.have.status(400);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " var responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"resourceType\": \"Consent\",\n \"status\": \"active\",\n \"scope\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\",\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\"\n }\n ]\n },\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\",\n \"code\": \"INFA\",\n \"display\": \"information access\"\n }\n ]\n }\n ],\n \"patient\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000058\"\n }\n },\n \"dateTime\": \"2025-02-11T14:30:00Z\",\n \"performer\": [\n {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000058\"\n }\n }\n ],\n \"provision\": {\n \"type\": \"permit\",\n \"period\": {\n \"start\": \"2025-02-11\",\n \"end\": \"2026-02-11\"\n },\n \"actor\": [\n {\n \"role\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n ]\n },\n \"reference\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000058\"\n }\n }\n }\n ]\n },\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/consent-reason\",\n \"code\": \"TBC\",\n \"display\": \"TBC\"\n }\n ]\n }\n },\n {\n \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",\n \"valueReference\": {\n \"identifier\": {}\n }\n }\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{api_base_url}}/Consent", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ] + } + }, + "response": [] + }, + { + "name": "Invalid grantor system", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"issue\": [", + " {", + " \"code\": \"invalid\",", + " \"details\": {", + " \"coding\": [", + " {", + " \"code\": \"INVALID_GRANTOR_SYSTEM\",", + " \"display\": \"Invalid grantor identifier system\",", + " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", + " \"version\": \"1\"", + " }", + " ]", + " },", + " \"diagnostics\": \"Valid grantor extension identifier system is required when creating/updating a consent with status 'active'\",", + " \"expression\": [", + " \"extension.where(url = 'http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor').valueReference.identifier.system\"", + " ],", + " \"severity\": \"error\"", + " }", + " ],", + " \"resourceType\": \"OperationOutcome\"", + "}", + "", + "pm.test(\"Status code is 422\", function () {", + " pm.response.to.have.status(422);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " var responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"resourceType\": \"Consent\",\n \"status\": \"active\",\n \"scope\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\",\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\"\n }\n ]\n },\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\",\n \"code\": \"INFA\",\n \"display\": \"information access\"\n }\n ]\n }\n ],\n \"patient\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000056\"\n }\n },\n \"dateTime\": \"2025-02-11T14:30:00Z\",\n \"performer\": [\n {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000056\"\n }\n }\n ],\n \"provision\": {\n \"type\": \"permit\",\n \"period\": {\n \"start\": \"2025-02-11\",\n \"end\": \"2026-02-11\"\n },\n \"actor\": [\n {\n \"role\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n ]\n },\n \"reference\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000056\"\n }\n }\n }\n ]\n },\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/consent-reason\",\n \"code\": \"TBC\",\n \"display\": \"TBC\"\n }\n ]\n }\n },\n {\n \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"BAD\",\n \"value\": \"G8101234\"\n }\n }\n }\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{api_base_url}}/Consent", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ] + } + }, + "response": [] + }, + { + "name": "Invalid grantor value", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"issue\": [", + " {", + " \"code\": \"invalid\",", + " \"details\": {", + " \"coding\": [", + " {", + " \"code\": \"INVALID_GRANTOR_VALUE\",", + " \"display\": \"Invalid grantor identifier value\",", + " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", + " \"version\": \"1\"", + " }", + " ]", + " },", + " \"diagnostics\": \"Valid grantor extension identifier value is required when creating/updating a consent with status 'active'\",", + " \"expression\": [", + " \"extension.where(url = 'http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor').valueReference.identifier.value\"", + " ],", + " \"severity\": \"error\"", + " }", + " ],", + " \"resourceType\": \"OperationOutcome\"", + "}", + "", + "pm.test(\"Status code is 422\", function () {", + " pm.response.to.have.status(422);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " var responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"resourceType\": \"Consent\",\n \"status\": \"active\",\n \"scope\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\",\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\"\n }\n ]\n },\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\",\n \"code\": \"INFA\",\n \"display\": \"information access\"\n }\n ]\n }\n ],\n \"patient\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000055\"\n }\n },\n \"dateTime\": \"2025-02-11T14:30:00Z\",\n \"performer\": [\n {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000055\"\n }\n }\n ],\n \"provision\": {\n \"type\": \"permit\",\n \"period\": {\n \"start\": \"2025-02-11\",\n \"end\": \"2026-02-11\"\n },\n \"actor\": [\n {\n \"role\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n ]\n },\n \"reference\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000055\"\n }\n }\n }\n ]\n },\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/consent-reason\",\n \"code\": \"TBC\",\n \"display\": \"TBC\"\n }\n ]\n }\n },\n {\n \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"BAD\"\n }\n }\n }\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{api_base_url}}/Consent", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ] + } + }, + "response": [] + }, + { + "name": "Missing grantor reference", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"issue\": [", + " {", + " \"code\": \"invalid\",", + " \"details\": {", + " \"coding\": [", + " {", + " \"code\": \"MISSING_GRANTOR_REFERENCE\",", + " \"display\": \"Missing grantor reference\",", + " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", + " \"version\": \"1\"", + " }", + " ]", + " },", + " \"diagnostics\": \"Grantor extension must contain a valueReference\",", + " \"expression\": [", + " \"extension.where(url = 'http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor').valueReference\"", + " ],", + " \"severity\": \"error\"", + " }", + " ],", + " \"resourceType\": \"OperationOutcome\"", + "}", + "", + "pm.test(\"Status code is 400\", function () {", + " pm.response.to.have.status(400);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " var responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"resourceType\": \"Consent\",\n \"status\": \"active\",\n \"scope\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\",\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\"\n }\n ]\n },\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\",\n \"code\": \"INFA\",\n \"display\": \"information access\"\n }\n ]\n }\n ],\n \"patient\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000057\"\n }\n },\n \"dateTime\": \"2025-02-11T14:30:00Z\",\n \"performer\": [\n {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000057\"\n }\n }\n ],\n \"provision\": {\n \"type\": \"permit\",\n \"period\": {\n \"start\": \"2025-02-11\",\n \"end\": \"2026-02-11\"\n },\n \"actor\": [\n {\n \"role\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n ]\n },\n \"reference\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000057\"\n }\n }\n }\n ]\n },\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/consent-reason\",\n \"code\": \"TBC\",\n \"display\": \"TBC\"\n }\n ]\n }\n },\n {\n \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",\n \"valueReference\": {}\n }\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{api_base_url}}/Consent", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ] + } + }, + "response": [] + }, { "name": "Adult-adult proxy creation", "event": [ @@ -10757,10 +11102,6 @@ " \"issue\": [", " {", " \"code\": \"invalid\",", - "\t\t\t\t\t\t\"expression\": [", - " \"extension.where(url = 'http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor')\"", - " ],", - " \"diagnostics\": \"Grantor extension must be included in the same PATCH request when changing status to active\",", " \"details\": {", " \"coding\": [", " {", @@ -10771,6 +11112,10 @@ " }", " ]", " },", + " \"diagnostics\": \"Grantor extension is required when creating/updating an active proxy role\",", + " \"expression\": [", + " \"extension.where(url = 'http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor')\"", + " ],", " \"severity\": \"error\"", " }", " ],", @@ -10796,7 +11141,7 @@ "header": [], "body": { "mode": "raw", - "raw": "[\n {\n \"op\": \"replace\",\n \"path\": \"/status\",\n \"value\": \"active\"\n },\n {\n \"op\": \"add\",\n \"path\": \"/extension/-\",\n \"value\": [\n {\n \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created\"\n }\n ]\n }\n }\n ]\n },\n {\n \"op\": \"replace\",\n \"path\": \"/provision/period/end\",\n \"value\": \"2026-12-31T23:59:59Z\"\n }\n]", + "raw": "[\n {\n \"op\": \"replace\",\n \"path\": \"/status\",\n \"value\": \"active\"\n },\n {\n \"op\": \"add\",\n \"path\": \"/extension/-\",\n \"value\": [\n {\n \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created\"\n }\n ]\n }\n },\n {\n \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n }\n ]\n },\n {\n \"op\": \"replace\",\n \"path\": \"/provision/period/end\",\n \"value\": \"2026-12-31T23:59:59Z\"\n }\n]", "options": { "raw": { "language": "json" @@ -10817,6 +11162,290 @@ }, "response": [] }, + { + "name": "Missing Grantor identifier", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"issue\": [", + " {", + " \"code\": \"invalid\",", + " \"details\": {", + " \"coding\": [", + " {", + " \"code\": \"MISSING_GRANTOR_IDENTIFIER\",", + " \"display\": \"Missing grantor identifier\",", + " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", + " \"version\": \"1\"", + " }", + " ]", + " },", + " \"diagnostics\": \"Grantor extension must contain a valueIdentifier\",", + " \"expression\": [", + " \"extension.where(url = 'http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor').valueReference.identifier\"", + " ],", + " \"severity\": \"error\"", + " }", + " ],", + " \"resourceType\": \"OperationOutcome\"", + "}", + "", + "pm.test(\"Status code is 400\", function () {", + " pm.response.to.have.status(400);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " var responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "PATCH", + "header": [], + "body": { + "mode": "raw", + "raw": "[\n {\n \"op\": \"replace\",\n \"path\": \"/status\",\n \"value\": \"active\"\n },\n {\n \"op\": \"add\",\n \"path\": \"/extension/-\",\n \"value\": [\n {\n \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created\"\n }\n ]\n }\n },\n {\n \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",\n \"valueReference\": {\n \"identifier\": {\n \"value\": \"G8101234\"\n }\n }\n }\n ]\n },\n {\n \"op\": \"replace\",\n \"path\": \"/provision/period/end\",\n \"value\": \"2026-12-31T23:59:59Z\"\n }\n]", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{api_base_url}}/Consent/faefd8c5-5e24-4415-8252-96e9241c7e78", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent", + "faefd8c5-5e24-4415-8252-96e9241c7e78" + ] + }, + "description": "Valid patch changing status to 'active'" + }, + "response": [] + }, + { + "name": "Missing Grantor reference", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"issue\": [", + " {", + " \"code\": \"invalid\",", + " \"details\": {", + " \"coding\": [", + " {", + " \"code\": \"MISSING_GRANTOR_REFERENCE\",", + " \"display\": \"Missing grantor reference\",", + " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", + " \"version\": \"1\"", + " }", + " ]", + " },", + " \"diagnostics\": \"Grantor extension must contain a valueReference\",", + " \"expression\": [", + " \"extension.where(url = 'http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor').valueReference\"", + " ],", + " \"severity\": \"error\"", + " }", + " ],", + " \"resourceType\": \"OperationOutcome\"", + "}", + "", + "pm.test(\"Status code is 400\", function () {", + " pm.response.to.have.status(400);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " var responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "PATCH", + "header": [], + "body": { + "mode": "raw", + "raw": "[\n {\n \"op\": \"replace\",\n \"path\": \"/status\",\n \"value\": \"active\"\n },\n {\n \"op\": \"add\",\n \"path\": \"/extension/-\",\n \"value\": [\n {\n \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created\"\n }\n ]\n }\n },\n {\n \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",\n \"valueReference\": {}\n }\n ]\n },\n {\n \"op\": \"replace\",\n \"path\": \"/provision/period/end\",\n \"value\": \"2026-12-31T23:59:59Z\"\n }\n]", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{api_base_url}}/Consent/7e764160-38b6-41eb-9012-a3e476cbc517", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent", + "7e764160-38b6-41eb-9012-a3e476cbc517" + ] + }, + "description": "Valid patch changing status to 'active'" + }, + "response": [] + }, + { + "name": "Invalid grantor identifier system", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"issue\": [", + " {", + " \"code\": \"invalid\",", + " \"details\": {", + " \"coding\": [", + " {", + " \"code\": \"INVALID_GRANTOR_SYSTEM\",", + " \"display\": \"Invalid grantor identifier system\",", + " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", + " \"version\": \"1\"", + " }", + " ]", + " },", + " \"diagnostics\": \"Valid grantor extension identifier system is required when creating/updating a consent with status 'active'\",", + " \"expression\": [", + " \"extension.where(url = 'http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor').valueReference.identifier.system\"", + " ],", + " \"severity\": \"error\"", + " }", + " ],", + " \"resourceType\": \"OperationOutcome\"", + "}", + "", + "pm.test(\"Status code is 422\", function () {", + " pm.response.to.have.status(422);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " var responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "PATCH", + "header": [], + "body": { + "mode": "raw", + "raw": "[\n {\n \"op\": \"replace\",\n \"path\": \"/status\",\n \"value\": \"active\"\n },\n {\n \"op\": \"add\",\n \"path\": \"/extension/-\",\n \"value\": [\n {\n \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",\n \"code\": \"ROLE_ACTIVATED\",\n \"display\": \"Role activated\"\n }\n ]\n }\n },\n {\n \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://wrong-system.com\",\n \"value\": \"G8101234\"\n }\n }\n }\n ]\n },\n {\n \"op\": \"replace\",\n \"path\": \"/provision/period/end\",\n \"value\": \"2026-12-31T23:59:59Z\"\n }\n]", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{api_base_url}}/Consent/fd189522-68e5-42dc-b44c-989be0eaa2bf", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent", + "fd189522-68e5-42dc-b44c-989be0eaa2bf" + ] + }, + "description": "Valid patch changing status to 'active'" + }, + "response": [] + }, + { + "name": "Invalid grantor identifier value", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"issue\": [", + " {", + " \"code\": \"invalid\",", + " \"details\": {", + " \"coding\": [", + " {", + " \"code\": \"INVALID_GRANTOR_VALUE\",", + " \"display\": \"Invalid grantor identifier value\",", + " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", + " \"version\": \"1\"", + " }", + " ]", + " },", + " \"diagnostics\": \"Valid grantor extension identifier value is required when creating/updating a consent with status 'active'\",", + " \"expression\": [", + " \"extension.where(url = 'http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor').valueReference.identifier.value\"", + " ],", + " \"severity\": \"error\"", + " }", + " ],", + " \"resourceType\": \"OperationOutcome\"", + "}", + "", + "pm.test(\"Status code is 422\", function () {", + " pm.response.to.have.status(422);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " var responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "PATCH", + "header": [], + "body": { + "mode": "raw", + "raw": "[\n {\n \"op\": \"replace\",\n \"path\": \"/status\",\n \"value\": \"active\"\n },\n {\n \"op\": \"add\",\n \"path\": \"/extension/-\",\n \"value\": [\n {\n \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",\n \"code\": \"ROLE_ACTIVATED\",\n \"display\": \"Role activated\"\n }\n ]\n }\n },\n {\n \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"BAD\"\n }\n }\n }\n ]\n },\n {\n \"op\": \"replace\",\n \"path\": \"/provision/period/end\",\n \"value\": \"2026-12-31T23:59:59Z\"\n }\n]", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{api_base_url}}/Consent/b68cbfc8-ccc2-48ad-b97b-b7410d773dc1", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent", + "b68cbfc8-ccc2-48ad-b97b-b7410d773dc1" + ] + }, + "description": "Valid patch changing status to 'active'" + }, + "response": [] + }, { "name": "Access level update", "event": [ From 78ef9e70091148b946f6011bf77433c78788d66f Mon Sep 17 00:00:00 2001 From: LeoKHoward <38526889+LeoKHoward@users.noreply.github.com> Date: Wed, 11 Feb 2026 11:45:09 +0000 Subject: [PATCH 04/11] NPA-6153: Updated postman integration --- ...ervice.integration.postman_collection.json | 921 +++++++++++++++--- 1 file changed, 776 insertions(+), 145 deletions(-) diff --git a/postman/validated_relationship_service.integration.postman_collection.json b/postman/validated_relationship_service.integration.postman_collection.json index 5e63fb8c..a26cd67c 100644 --- a/postman/validated_relationship_service.integration.postman_collection.json +++ b/postman/validated_relationship_service.integration.postman_collection.json @@ -1,11 +1,11 @@ { "info": { - "_postman_id": "d324ef50-a702-4812-ae1c-615a81316639", + "_postman_id": "c1dd5e2d-9dca-4360-8671-21fd0e6ae3e2", "name": "Validated Relationship Service - Integration - 09/02/26", "description": "## About the collection\n\nThe collection has been organised by API endpoint - you will find a folder for each one.\n\nWithin those endpoints are requests covering success and error response scenarios.\n\nEach request has at least 1 example against it. This shows the expected response for that request. Some requests have multiple examples showing how the response differs when different parameters are provided.\n\n### Authorization types\n\nWhen you send a request to the Validated Relationship Service, your request will first be authorised by the API Management service (APIM).\n\nThe Validated Relationship Service has 3 types of authorization:\n\n- CIS2 - For healthcare practitioners\n- App-restricted - for service-to-service authorization\n- Login - For patient/proxy access via the NHS App\n \n\nEach VRS API endpoint uses a different combination of these auth types depending on their use case.\n\nYou will need to follow the steps in the 'Getting Started' section below to set the correct authorization tokens for each of these types.\n\nPlease see the folder-level docs for each endpoint for details about what auth types are available to use.\n\n## Getting started\n\n### Environment variables\n\nYou will need to add the following environment variables to the collection.\n\n#### `cis2_token`\n\nAuthorization token value for CIS2 (healthcare practitioner access).\n\n_Only required when using endponts that require this auth method._\n\nThis value can be generated by running the `get_cis2_access_token_int.py` script . See more details in the 'How to create a valid Authorization header' section below.\n\n#### `login_token`\n\nAuthorization token value for NHS Login (patient access).\n\n_Only required when using endponts that require this auth method._\n\nThis value can be generated by running the `get_nhs_login_access_token_int.py` script . See more details in the 'How to create a valid Authorization header' section below.\n\n#### `vrs_api_private_key`\n\n**(This is not the same as the private key in the NHS Developer Account portal.)**\n\nAPI private key for the Validated Relationship Service integration application.\n\n_Only required when using endponts that use the app restricted auth method._\n\nThis value can be copied from the /main/vrs-app-credentials-{id} secret in **AWS Secrets Manager** or requested to be sent securely from a member of the VRS team.\n\n#### `nhs_developer_account_api_key`\n\nAPI app key for the Validated Relationship Service integration application.\n\n_Only required when using endponts that use the app restricted auth method._\n\nThis value can be copied from the NHS - Proxy Core Services - Integration environment resource in the NHS Developer Account portal.\n\n#### `consent_app_auth_header_value` (Generated automatically)\n\nAuthorization token value for app restricted auth.\n\n_Only required when using endponts that use the app restricted auth method._\n\n**You do not need to change this value as it is automatically set in the pre-request script.**\n\n#### `tpp_9674998535_access_token`, `tpp_9674998454_access_token`, `emis_9692113698_access_token,` and `emis_9692113612_access_token`\n\nAuthorization token value for connecting to GPIT supplier systems in NAM tests (Get proxy roles only).\n\n_Only required when running the_ `_Get proxy roles (GET/Consent) Valid request - NAM - Get proxy roles_` _requests._\n\nValues for these environment variables can be found on the [Test data page in Confluence](https://nhsd-confluence.digital.nhs.uk/spaces/NPA/pages/950553445/Test+data+and+accounts+repository+-+NPA#TestdataandaccountsrepositoryNPA-GPITtestaccountsforEXT).\n\n### How to create a valid Authorization header\n\n#### Manually through Python scripts (required for Login and CIS2)\n\n##### Pre-requisites\n\nAccess the token generation scripts from the [validated-relationships-service-api repo](https://github.com/NHSDigital/validated-relationships-service-api/tree/master/scripts):\n\n- get_app_access_token_int.py - for app restricted authorization\n- get_cis2_access_token_int.py - for CIS2 authorization\n- get_nhs_login_access_token_int.py - for Login user authorization\n \n\nSee the [README](https://github.com/NHSDigital/validated-relationships-service-api/tree/master/scripts/README.md) for information about how to run them and what environment variables are needed.\n\n##### Steps\n\n1. Generate bearer tokens for each of the above methods using the provided scripts\n2. Go to the Authorization tab for this Postman request\n3. Select 'Bearer token' from the drop-down\n4. Copy just the 'access_request' value from the script output into the Token field. You do **not** need to add the word 'bearer' before the value.\n \n\nTokens expire every 5 minutes. Once expired, you will receive an 'Unauthorised' response from the API endpoints. At this point, a new token will need to be generated by repeating the above steps.\n\n#### Automatically through pre-request script (for App-restricted)\n\nA pre-request script has been added to the endpoints where app-restricted auth can be used to obtain app-restricted tokens automatically. For this to work, you will need to add values for the following environment variables:\n\n- `private_key`\n- `api_key`\n \n\nIf those values are set and valid, then no further action is required.\n\n## Running a request\n\nOnce you have completed the above 'Getting Started' steps you will be able to send requests by either clicking the 'Send' button on each request, or the 'Try' button on each example.\n\nThe pre-prod environments are not constricted to just the requests provided in this collection. Feel free to change and create requests/examples as you require. However, only the test users provided will work in these environments.\n\n## Test data\n\nAll of the requests in the collection use test data and users that have been set up to demonstrate each specific scenario. No sensitive data is stored in this collection.\n\nSee each scenario for information about what test users are being used.", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", "_exporter_id": "46399153", - "_collection_link": "https://www.postman.com/leohoward/workspace/vrsa-06-02-2026/collection/46399153-d324ef50-a702-4812-ae1c-615a81316639?action=share&source=collection_link&creator=46399153" + "_collection_link": "https://www.postman.com/leohoward/workspace/vrsa-10-02-2026/collection/46399153-c1dd5e2d-9dca-4360-8671-21fd0e6ae3e2?action=share&source=collection_link&creator=46399153" }, "item": [ { @@ -5990,52 +5990,7 @@ ] }, { - "name": "Invalid performer NHS number - New proxy role", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "expectedResponseBody = {", - " \"issue\": [", - " {", - " \"code\": \"invalid\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"code\": \"INVALID_IDENTIFIER_VALUE\",", - " \"display\": \"Invalid identifier value.\",", - " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", - " \"version\": \"1\"", - " }", - " ]", - " },", - " \"diagnostics\": \"Performer identifier value is invalid\",", - " \"expression\": [", - " \"performer[0].identifier.value\"", - " ],", - " \"severity\": \"error\"", - " }", - " ],", - " \"resourceType\": \"OperationOutcome\"", - "};", - "", - "expectedErrorCode = 422;", - "", - "pm.test(\"Status code is \" + expectedErrorCode, function () {", - " pm.response.to.have.status(expectedErrorCode);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "}); " - ], - "type": "text/javascript", - "packages": {} - } - } - ], + "name": "Duplicate role - New proxy role", "request": { "auth": { "type": "bearer", @@ -6067,7 +6022,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"resourceType\": \"Consent\",\n \"status\": \"active\",\n \"scope\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\",\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\"\n }\n ]\n },\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\",\n \"code\": \"INFA\",\n \"display\": \"information access\"\n }\n ]\n }\n ],\n \"patient\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"dateTime\": \"{{$isoTimestamp}}\",\n \"provision\": {\n \"period\": {\n \"start\": \"2025-11-23\",\n \"end\": \"2030-11-23\"\n },\n \"actor\": [\n {\n \"role\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"MTH\",\n \"display\": \"Mother\"\n }\n ]\n },\n \"reference\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n }\n ]\n },\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/consent-reason\",\n \"code\": \"TBC\",\n \"display\": \"TBC\"\n }\n ]\n }\n },\n {\n \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"Invalid\"\n }\n }\n }\n ]\n}", + "raw": "{\n \"resourceType\": \"Consent\",\n \"status\": \"active\",\n \"scope\": {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\"\n }\n ]\n },\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",\n \"code\": \"INFA\",\n \"display\": \"information access\"\n }\n ]\n }\n ],\n \"patient\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"dateTime\": \"{{$isoTimestamp}}\",\n \"provision\": {\n \"period\": {\n \"start\": \"2025-12-02\",\n \"end\": \"2030-11-23\"\n },\n \"actor\": [\n {\n \"role\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\"\n }\n ]\n },\n \"reference\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n }\n ]\n },\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created\"\n }\n ]\n }\n },\n {\n \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n }\n ]\n}\n", "options": { "raw": { "language": "json" @@ -6083,22 +6038,22 @@ "Consent" ] }, - "description": "## Example scenario\n\n**Given** no proxy role exists in NPS between a proxy and patient \n**When** I send a POST /Consent request for the proxy and patient with an invalid performer id \n**Then** a 422 error response is returned with code 'INVALID_IDENTIFIER_VALUE'" + "description": "## Example scenario\n\n**Given** a proxy role already exists in NPS between a proxy and patient \n**When** I send a POST /Consent request for the same proxy and patient \n**Then** a 409 error is returned with code 'DUPLICATE_RELATIONSHIP'" }, "response": [ { - "name": "Invalid identifier value error returned", + "name": "Duplicate role error returned", "originalRequest": { "method": "POST", "header": [ { "key": "X-Request-ID", - "value": "fa822d40-196d-4112-8c87-b46631ba7463", + "value": "8616edc0-f04b-4d56-ac54-4c5dd8930d87", "type": "text" }, { "key": "X-Correlation-ID", - "value": "13f1ba14-20e9-48c8-b1ef-7f2c34d9bab3", + "value": "42cf4c55-e180-4b8f-abe3-60acd1780311", "type": "text" }, { @@ -6109,7 +6064,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"resourceType\": \"Consent\",\n \"status\": \"active\",\n \"scope\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\",\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\"\n }\n ],\n \"text\": \"Patient Privacy Consent\"\n },\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\",\n \"code\": \"INFA\",\n \"display\": \"Information Access\"\n }\n ],\n \"text\": \"Information Access Consent\"\n }\n ],\n \"patient\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"dateTime\": \"2026-01-12T15:09:49.952Z\",\n \"performer\": [\n {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"Invalid\"\n }\n }\n ],\n \"provision\": {\n \"period\": {\n \"start\": \"2025-11-23\",\n \"end\": \"2030-11-23\"\n },\n \"actor\": [\n {\n \"role\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"MTH\",\n \"display\": \"Mother\"\n }\n ]\n },\n \"reference\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n }\n ]\n },\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/consent-reason\",\n \"code\": \"TBC\",\n \"display\": \"TBC\"\n }\n ]\n }\n }\n ]\n}", + "raw": "{\n \"resourceType\": \"Consent\",\n \"status\": \"active\",\n \"scope\": {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\"\n }\n ]\n },\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",\n \"code\": \"INFA\",\n \"display\": \"information access\"\n }\n ]\n }\n ],\n \"patient\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"dateTime\": \"{{$isoTimestamp}}\",\n \"performer\": [\n {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n ],\n \"provision\": {\n \"period\": {\n \"start\": \"2025-12-02\",\n \"end\": \"2030-11-23\"\n },\n \"actor\": [\n {\n \"role\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\"\n }\n ]\n },\n \"reference\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n }\n ]\n },\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created\"\n }\n ]\n }\n }\n ]\n}\n", "options": { "raw": { "language": "json" @@ -6126,13 +6081,13 @@ ] } }, - "status": "Unprocessable Entity (WebDAV) (RFC 4918)", - "code": 422, + "status": "Conflict", + "code": 409, "_postman_previewlanguage": "Text", "header": [ { "key": "Date", - "value": "Fri, 28 Nov 2025 12:46:09 GMT" + "value": "Fri, 28 Nov 2025 12:41:31 GMT" }, { "key": "Content-Type", @@ -6140,7 +6095,7 @@ }, { "key": "Content-Length", - "value": "402" + "value": "352" }, { "key": "Connection", @@ -6148,23 +6103,23 @@ }, { "key": "x-amzn-RequestId", - "value": "369c4598-e093-44d1-8d27-015c1e1f8a40" + "value": "de65a534-5cee-45c1-845e-023e9ffab375" }, { "key": "x-amz-apigw-id", - "value": "UwTu1FORLPEFh3Q=" + "value": "UwTC8H42LPEFggg=" }, { "key": "X-Amzn-Trace-Id", - "value": "Root=1-69299991-27f38de5fa687e1e7d4659b3" + "value": "Root=1-69299878-54ea0e3b7bd5d7e836eaea8f" }, { "key": "X-Request-ID", - "value": "70591ef1-fbe0-442b-bd9a-545fb5713859" + "value": "dd90c863-82e3-4ef8-9568-3e68a64de1e0" }, { "key": "X-Correlation-ID", - "value": "037cf36b-1014-4177-bcc6-c1cd647aae42" + "value": "b08cd6b6-96fc-410c-84a9-e52732fcbc09" }, { "key": "Strict-Transport-Security", @@ -6172,23 +6127,13 @@ } ], "cookie": [], - "body": "{\n \"issue\": [\n {\n \"code\": \"invalid\",\n \"details\": {\n \"coding\": [\n {\n \"code\": \"INVALID_IDENTIFIER_VALUE\",\n \"display\": \"Invalid identifier value.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"Performer identifier value is invalid\",\n \"expression\": [\n \"performer[0].identifier.value\"\n ],\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" + "body": "{\n \"issue\": [\n {\n \"code\": \"invalid\",\n \"details\": {\n \"coding\": [\n {\n \"code\": \"DUPLICATE_RELATIONSHIP\",\n \"display\": \"Request must be for a new proxy role.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"Proxy role already exists.\",\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" } ] }, { - "name": "Duplicate role - New proxy role", + "name": "Missing scope - New proxy role", "request": { - "auth": { - "type": "bearer", - "bearer": [ - { - "key": "token", - "value": "{{cis2_token}}", - "type": "string" - } - ] - }, "method": "POST", "header": [ { @@ -6209,7 +6154,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"resourceType\": \"Consent\",\n \"status\": \"active\",\n \"scope\": {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\"\n }\n ]\n },\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",\n \"code\": \"INFA\",\n \"display\": \"information access\"\n }\n ]\n }\n ],\n \"patient\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"dateTime\": \"{{$isoTimestamp}}\",\n \"provision\": {\n \"period\": {\n \"start\": \"2025-12-02\",\n \"end\": \"2030-11-23\"\n },\n \"actor\": [\n {\n \"role\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\"\n }\n ]\n },\n \"reference\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n }\n ]\n },\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created\"\n }\n ]\n }\n },\n {\n \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n }\n ]\n}\n", + "raw": "{\n \"resourceType\": \"Consent\",\n \"status\": \"active\",\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\",\n \"code\": \"INFA\",\n \"display\": \"information access\"\n }\n ]\n }\n ],\n \"patient\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"dateTime\": \"{{$isoTimestamp}}\",\n \"provision\": {\n \"period\": {\n \"start\": \"2025-11-23\",\n \"end\": \"2030-11-23\"\n },\n \"actor\": [\n {\n \"role\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"MTH\",\n \"display\": \"Mother\"\n }\n ]\n },\n \"reference\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n }\n ]\n },\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/consent-reason\",\n \"code\": \"TBC\",\n \"display\": \"TBC\"\n }\n ]\n }\n },\n {\n \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n }\n ]\n}", "options": { "raw": { "language": "json" @@ -6224,23 +6169,22 @@ "path": [ "Consent" ] - }, - "description": "## Example scenario\n\n**Given** a proxy role already exists in NPS between a proxy and patient \n**When** I send a POST /Consent request for the same proxy and patient \n**Then** a 409 error is returned with code 'DUPLICATE_RELATIONSHIP'" + } }, "response": [ { - "name": "Duplicate role error returned", + "name": "Missing scope error returned", "originalRequest": { "method": "POST", "header": [ { "key": "X-Request-ID", - "value": "8616edc0-f04b-4d56-ac54-4c5dd8930d87", + "value": "2aa3293e-ad0e-4389-a466-d3209ebbfa4e", "type": "text" }, { "key": "X-Correlation-ID", - "value": "42cf4c55-e180-4b8f-abe3-60acd1780311", + "value": "425ca0da-e10c-4010-86b4-93ca9bf737eb", "type": "text" }, { @@ -6251,7 +6195,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"resourceType\": \"Consent\",\n \"status\": \"active\",\n \"scope\": {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\"\n }\n ]\n },\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",\n \"code\": \"INFA\",\n \"display\": \"information access\"\n }\n ]\n }\n ],\n \"patient\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"dateTime\": \"{{$isoTimestamp}}\",\n \"performer\": [\n {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n ],\n \"provision\": {\n \"period\": {\n \"start\": \"2025-12-02\",\n \"end\": \"2030-11-23\"\n },\n \"actor\": [\n {\n \"role\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\"\n }\n ]\n },\n \"reference\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n }\n ]\n },\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created\"\n }\n ]\n }\n }\n ]\n}\n", + "raw": "{\n \"resourceType\": \"Consent\",\n \"status\": \"active\",\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\",\n \"code\": \"INFA\",\n \"display\": \"information access\"\n }\n ]\n }\n ],\n \"patient\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"dateTime\": \"{{$isoTimestamp}}\",\n \"performer\": [\n {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n ],\n \"provision\": {\n \"period\": {\n \"start\": \"2025-11-23\",\n \"end\": \"2030-11-23\"\n },\n \"actor\": [\n {\n \"role\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"MTH\",\n \"display\": \"Mother\"\n }\n ]\n },\n \"reference\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n }\n ]\n },\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/consent-reason\",\n \"code\": \"TBC\",\n \"display\": \"TBC\"\n }\n ]\n }\n }\n ]\n}", "options": { "raw": { "language": "json" @@ -6268,13 +6212,13 @@ ] } }, - "status": "Conflict", - "code": 409, + "status": "Bad Request", + "code": 400, "_postman_previewlanguage": "Text", "header": [ { "key": "Date", - "value": "Fri, 28 Nov 2025 12:41:31 GMT" + "value": "Fri, 28 Nov 2025 15:18:49 GMT" }, { "key": "Content-Type", @@ -6282,7 +6226,7 @@ }, { "key": "Content-Length", - "value": "352" + "value": "353" }, { "key": "Connection", @@ -6290,23 +6234,23 @@ }, { "key": "x-amzn-RequestId", - "value": "de65a534-5cee-45c1-845e-023e9ffab375" + "value": "75bfd563-8f97-4b8a-8d50-a08643917d89" }, { "key": "x-amz-apigw-id", - "value": "UwTC8H42LPEFggg=" + "value": "UwqGBE7MLPEFySQ=" }, { "key": "X-Amzn-Trace-Id", - "value": "Root=1-69299878-54ea0e3b7bd5d7e836eaea8f" + "value": "Root=1-6929bd59-918cef993de61bcebe339d3e" }, { "key": "X-Request-ID", - "value": "dd90c863-82e3-4ef8-9568-3e68a64de1e0" + "value": "2ca06d13-2568-4f70-b06c-077af0f57137" }, { "key": "X-Correlation-ID", - "value": "b08cd6b6-96fc-410c-84a9-e52732fcbc09" + "value": "8c8ffb79-cc4c-4cb0-a62e-31dc1310a387" }, { "key": "Strict-Transport-Security", @@ -6314,12 +6258,12 @@ } ], "cookie": [], - "body": "{\n \"issue\": [\n {\n \"code\": \"invalid\",\n \"details\": {\n \"coding\": [\n {\n \"code\": \"DUPLICATE_RELATIONSHIP\",\n \"display\": \"Request must be for a new proxy role.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"Proxy role already exists.\",\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" + "body": "{\n \"issue\": [\n {\n \"code\": \"invalid\",\n \"details\": {\n \"coding\": [\n {\n \"code\": \"MISSING_SCOPE\",\n \"display\": \"Required values are missing.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"Unable to find scope\",\n \"expression\": [\n \"scope\"\n ],\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" } ] }, { - "name": "Missing scope - New proxy role", + "name": "Invalid status - New proxy role", "request": { "method": "POST", "header": [ @@ -6341,7 +6285,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"resourceType\": \"Consent\",\n \"status\": \"active\",\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\",\n \"code\": \"INFA\",\n \"display\": \"information access\"\n }\n ]\n }\n ],\n \"patient\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"dateTime\": \"{{$isoTimestamp}}\",\n \"provision\": {\n \"period\": {\n \"start\": \"2025-11-23\",\n \"end\": \"2030-11-23\"\n },\n \"actor\": [\n {\n \"role\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"MTH\",\n \"display\": \"Mother\"\n }\n ]\n },\n \"reference\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n }\n ]\n },\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/consent-reason\",\n \"code\": \"TBC\",\n \"display\": \"TBC\"\n }\n ]\n }\n },\n {\n \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n }\n ]\n}", + "raw": "{\n \"resourceType\": \"Consent\",\n \"status\": \"invalid\",\n \"scope\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\",\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\"\n }\n ]\n },\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\",\n \"code\": \"INFA\",\n \"display\": \"information access\"\n }\n ]\n }\n ],\n \"patient\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"dateTime\": \"{{$isoTimestamp}}\",\n \"provision\": {\n \"period\": {\n \"start\": \"2025-11-23\",\n \"end\": \"2030-11-23\"\n },\n \"actor\": [\n {\n \"role\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"MTH\",\n \"display\": \"Mother\"\n }\n ]\n },\n \"reference\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n }\n ]\n },\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/consent-reason\",\n \"code\": \"TBC\",\n \"display\": \"TBC\"\n }\n ]\n }\n },\n {\n \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n }\n ]\n}", "options": { "raw": { "language": "json" @@ -6360,18 +6304,18 @@ }, "response": [ { - "name": "Missing scope error returned", + "name": "Invalid status - New proxy role", "originalRequest": { "method": "POST", "header": [ { "key": "X-Request-ID", - "value": "2aa3293e-ad0e-4389-a466-d3209ebbfa4e", + "value": "1e0a0136-6025-4190-8450-5676ada97c3c", "type": "text" }, { "key": "X-Correlation-ID", - "value": "425ca0da-e10c-4010-86b4-93ca9bf737eb", + "value": "bc404ec3-52fa-465c-9401-2b70484989bc", "type": "text" }, { @@ -6382,7 +6326,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"resourceType\": \"Consent\",\n \"status\": \"active\",\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\",\n \"code\": \"INFA\",\n \"display\": \"information access\"\n }\n ]\n }\n ],\n \"patient\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"dateTime\": \"{{$isoTimestamp}}\",\n \"performer\": [\n {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n ],\n \"provision\": {\n \"period\": {\n \"start\": \"2025-11-23\",\n \"end\": \"2030-11-23\"\n },\n \"actor\": [\n {\n \"role\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"MTH\",\n \"display\": \"Mother\"\n }\n ]\n },\n \"reference\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n }\n ]\n },\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/consent-reason\",\n \"code\": \"TBC\",\n \"display\": \"TBC\"\n }\n ]\n }\n }\n ]\n}", + "raw": "{\n \"resourceType\": \"Consent\",\n \"status\": \"invalid\",\n \"scope\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\",\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\"\n }\n ]\n },\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\",\n \"code\": \"INFA\",\n \"display\": \"information access\"\n }\n ]\n }\n ],\n \"patient\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"dateTime\": \"{{$isoTimestamp}}\",\n \"performer\": [\n {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n ],\n \"provision\": {\n \"period\": {\n \"start\": \"2025-11-23\",\n \"end\": \"2030-11-23\"\n },\n \"actor\": [\n {\n \"role\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"MTH\",\n \"display\": \"Mother\"\n }\n ]\n },\n \"reference\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n }\n ]\n },\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/consent-reason\",\n \"code\": \"TBC\",\n \"display\": \"TBC\"\n }\n ]\n }\n }\n ]\n}", "options": { "raw": { "language": "json" @@ -6399,13 +6343,13 @@ ] } }, - "status": "Bad Request", - "code": 400, + "status": "Unprocessable Entity (WebDAV) (RFC 4918)", + "code": 422, "_postman_previewlanguage": "Text", "header": [ { "key": "Date", - "value": "Fri, 28 Nov 2025 15:18:49 GMT" + "value": "Fri, 28 Nov 2025 15:27:32 GMT" }, { "key": "Content-Type", @@ -6413,7 +6357,7 @@ }, { "key": "Content-Length", - "value": "353" + "value": "339" }, { "key": "Connection", @@ -6421,23 +6365,23 @@ }, { "key": "x-amzn-RequestId", - "value": "75bfd563-8f97-4b8a-8d50-a08643917d89" + "value": "47dd1183-4b49-44f1-a524-79fe459589a9" }, { "key": "x-amz-apigw-id", - "value": "UwqGBE7MLPEFySQ=" + "value": "UwrXkFOZrPEF1ZA=" }, { "key": "X-Amzn-Trace-Id", - "value": "Root=1-6929bd59-918cef993de61bcebe339d3e" + "value": "Root=1-6929bf63-31132bda7b3f654ea3534f15" }, { "key": "X-Request-ID", - "value": "2ca06d13-2568-4f70-b06c-077af0f57137" + "value": "e23fbdd1-027c-4281-b37d-094691df9fc7" }, { "key": "X-Correlation-ID", - "value": "8c8ffb79-cc4c-4cb0-a62e-31dc1310a387" + "value": "226277b1-9d7c-411a-b3fd-3a4a70a4d90e" }, { "key": "Strict-Transport-Security", @@ -6445,13 +6389,35 @@ } ], "cookie": [], - "body": "{\n \"issue\": [\n {\n \"code\": \"invalid\",\n \"details\": {\n \"coding\": [\n {\n \"code\": \"MISSING_SCOPE\",\n \"display\": \"Required values are missing.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"Unable to find scope\",\n \"expression\": [\n \"scope\"\n ],\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" + "body": "{\n \"issue\": [\n {\n \"code\": \"invalid\",\n \"details\": {\n \"coding\": [\n {\n \"code\": \"INVALID_STATUS\",\n \"display\": \"Invalid status.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"Status is invalid\",\n \"expression\": [\n \"status\"\n ],\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" } ] }, { - "name": "Invalid status - New proxy role", + "name": "Missing free text for Other", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "" + ], + "type": "text/javascript", + "packages": {} + } + } + ], "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{cis2_token}}", + "type": "string" + } + ] + }, "method": "POST", "header": [ { @@ -6472,7 +6438,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"resourceType\": \"Consent\",\n \"status\": \"invalid\",\n \"scope\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\",\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\"\n }\n ]\n },\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\",\n \"code\": \"INFA\",\n \"display\": \"information access\"\n }\n ]\n }\n ],\n \"patient\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"dateTime\": \"{{$isoTimestamp}}\",\n \"provision\": {\n \"period\": {\n \"start\": \"2025-11-23\",\n \"end\": \"2030-11-23\"\n },\n \"actor\": [\n {\n \"role\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"MTH\",\n \"display\": \"Mother\"\n }\n ]\n },\n \"reference\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n }\n ]\n },\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/consent-reason\",\n \"code\": \"TBC\",\n \"display\": \"TBC\"\n }\n ]\n }\n },\n {\n \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n }\n ]\n}", + "raw": "{\n \"resourceType\": \"Consent\",\n \"status\": \"active\",\n \"scope\": {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\"\n }\n ],\n \"text\": \"Patient Privacy Consent\"\n },\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",\n \"code\": \"INFA\",\n \"display\": \"Information Access\"\n }\n ],\n \"text\": \"Information Access Consent\"\n }\n ],\n \"patient\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"dateTime\": \"2026-01-12T15:09:49.458Z\",\n \"provision\": {\n \"period\": {\n \"start\": \"2025-12-02\",\n \"end\": \"2030-11-23\"\n },\n \"actor\": [\n {\n \"role\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\"\n }\n ]\n },\n \"reference\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n }\n ]\n },\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",\n \"code\": \"OTHER\",\n \"display\": \"Other reason\"\n }\n ]\n }\n },\n {\n \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n }\n ]\n}\n", "options": { "raw": { "language": "json" @@ -6487,22 +6453,23 @@ "path": [ "Consent" ] - } + }, + "description": "## Example scenario\n\n**Given** no proxy role exists in NPS between a proxy and patient \n**When** I send a POST /Consent request for the proxy and patient with an invalid performer id \n**Then** a 422 error response is returned with code 'INVALID_IDENTIFIER_VALUE'" }, "response": [ { - "name": "Invalid status - New proxy role", + "name": "Missing free text code error returned", "originalRequest": { "method": "POST", "header": [ { "key": "X-Request-ID", - "value": "1e0a0136-6025-4190-8450-5676ada97c3c", + "value": "{{$guid}}", "type": "text" }, { "key": "X-Correlation-ID", - "value": "bc404ec3-52fa-465c-9401-2b70484989bc", + "value": "{{$guid}}", "type": "text" }, { @@ -6513,7 +6480,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"resourceType\": \"Consent\",\n \"status\": \"invalid\",\n \"scope\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\",\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\"\n }\n ]\n },\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\",\n \"code\": \"INFA\",\n \"display\": \"information access\"\n }\n ]\n }\n ],\n \"patient\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"dateTime\": \"{{$isoTimestamp}}\",\n \"performer\": [\n {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n ],\n \"provision\": {\n \"period\": {\n \"start\": \"2025-11-23\",\n \"end\": \"2030-11-23\"\n },\n \"actor\": [\n {\n \"role\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"MTH\",\n \"display\": \"Mother\"\n }\n ]\n },\n \"reference\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n }\n ]\n },\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/consent-reason\",\n \"code\": \"TBC\",\n \"display\": \"TBC\"\n }\n ]\n }\n }\n ]\n}", + "raw": "{\n \"resourceType\": \"Consent\",\n \"status\": \"active\",\n \"scope\": {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\"\n }\n ],\n \"text\": \"Patient Privacy Consent\"\n },\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",\n \"code\": \"INFA\",\n \"display\": \"Information Access\"\n }\n ],\n \"text\": \"Information Access Consent\"\n }\n ],\n \"patient\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"dateTime\": \"2026-01-12T15:09:49.458Z\",\n \"performer\": [\n {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n ],\n \"provision\": {\n \"period\": {\n \"start\": \"2025-12-02\",\n \"end\": \"2030-11-23\"\n },\n \"actor\": [\n {\n \"role\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\"\n }\n ]\n },\n \"reference\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n }\n ]\n },\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",\n \"code\": \"OTHER\",\n \"display\": \"Other reason\"\n }\n ]\n }\n }\n ]\n}\n", "options": { "raw": { "language": "json" @@ -6536,7 +6503,7 @@ "header": [ { "key": "Date", - "value": "Fri, 28 Nov 2025 15:27:32 GMT" + "value": "Fri, 28 Nov 2025 12:46:09 GMT" }, { "key": "Content-Type", @@ -6544,7 +6511,7 @@ }, { "key": "Content-Length", - "value": "339" + "value": "402" }, { "key": "Connection", @@ -6552,23 +6519,23 @@ }, { "key": "x-amzn-RequestId", - "value": "47dd1183-4b49-44f1-a524-79fe459589a9" + "value": "369c4598-e093-44d1-8d27-015c1e1f8a40" }, { "key": "x-amz-apigw-id", - "value": "UwrXkFOZrPEF1ZA=" + "value": "UwTu1FORLPEFh3Q=" }, { "key": "X-Amzn-Trace-Id", - "value": "Root=1-6929bf63-31132bda7b3f654ea3534f15" + "value": "Root=1-69299991-27f38de5fa687e1e7d4659b3" }, { "key": "X-Request-ID", - "value": "e23fbdd1-027c-4281-b37d-094691df9fc7" + "value": "70591ef1-fbe0-442b-bd9a-545fb5713859" }, { "key": "X-Correlation-ID", - "value": "226277b1-9d7c-411a-b3fd-3a4a70a4d90e" + "value": "037cf36b-1014-4177-bcc6-c1cd647aae42" }, { "key": "Strict-Transport-Security", @@ -6576,12 +6543,12 @@ } ], "cookie": [], - "body": "{\n \"issue\": [\n {\n \"code\": \"invalid\",\n \"details\": {\n \"coding\": [\n {\n \"code\": \"INVALID_STATUS\",\n \"display\": \"Invalid status.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"Status is invalid\",\n \"expression\": [\n \"status\"\n ],\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" + "body": "{\n \"issue\": [\n {\n \"code\": \"invalid\",\n \"details\": {\n \"coding\": [\n {\n \"code\": \"MISSING_FREE_TEXT_FOR_OTHER\",\n \"display\": \"Free text must be provided for OTHER reason codes.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"Free text is required when reason code is OTHER.\",\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" } ] }, { - "name": "Missing free text for Other", + "name": "Missing grantor", "event": [ { "listen": "test", @@ -6645,7 +6612,7 @@ }, "response": [ { - "name": "Missing free text code error returned", + "name": "Missing grantor error", "originalRequest": { "method": "POST", "header": [ @@ -6667,7 +6634,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"resourceType\": \"Consent\",\n \"status\": \"active\",\n \"scope\": {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\"\n }\n ],\n \"text\": \"Patient Privacy Consent\"\n },\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",\n \"code\": \"INFA\",\n \"display\": \"Information Access\"\n }\n ],\n \"text\": \"Information Access Consent\"\n }\n ],\n \"patient\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"dateTime\": \"2026-01-12T15:09:49.458Z\",\n \"performer\": [\n {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n ],\n \"provision\": {\n \"period\": {\n \"start\": \"2025-12-02\",\n \"end\": \"2030-11-23\"\n },\n \"actor\": [\n {\n \"role\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\"\n }\n ]\n },\n \"reference\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n }\n ]\n },\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",\n \"code\": \"OTHER\",\n \"display\": \"Other reason\"\n }\n ]\n }\n }\n ]\n}\n", + "raw": "{\n \"resourceType\": \"Consent\",\n \"status\": \"active\",\n \"scope\": {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\"\n }\n ]\n },\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",\n \"code\": \"INFA\",\n \"display\": \"information access\"\n }\n ]\n }\n ],\n \"patient\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"dateTime\": \"{{$isoTimestamp}}\",\n \"provision\": {\n \"period\": {\n \"start\": \"2025-12-02\",\n \"end\": \"2030-11-23\"\n },\n \"actor\": [\n {\n \"role\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\"\n }\n ]\n },\n \"reference\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n }\n ]\n },\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created\"\n }\n ]\n }\n },\n {\n \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n }\n ]\n}\n", "options": { "raw": { "language": "json" @@ -6730,12 +6697,12 @@ } ], "cookie": [], - "body": "{\n \"issue\": [\n {\n \"code\": \"invalid\",\n \"details\": {\n \"coding\": [\n {\n \"code\": \"MISSING_FREE_TEXT_FOR_OTHER\",\n \"display\": \"Free text must be provided for OTHER reason codes.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"Free text is required when reason code is OTHER.\",\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" + "body": "{\n \"issue\": [\n {\n \"code\": \"invalid\",\n \"details\": {\n \"coding\": [\n {\n \"code\": \"MISSING_GRANTOR\",\n \"display\": \"Grantor required for active status\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"Grantor extension is required when creating/updating an active proxy role\",\n \"expression\": [\n \"extension.where(url = 'http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor')\"\n ],\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" } ] }, { - "name": "Missing grantor when active status", + "name": "Missing grantor reference", "event": [ { "listen": "test", @@ -6779,7 +6746,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"resourceType\": \"Consent\",\n \"status\": \"active\",\n \"scope\": {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\"\n }\n ],\n \"text\": \"Patient Privacy Consent\"\n },\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",\n \"code\": \"INFA\",\n \"display\": \"Information Access\"\n }\n ],\n \"text\": \"Information Access Consent\"\n }\n ],\n \"patient\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"dateTime\": \"2026-01-12T15:09:49.458Z\",\n \"provision\": {\n \"period\": {\n \"start\": \"2025-12-02\",\n \"end\": \"2030-11-23\"\n },\n \"actor\": [\n {\n \"role\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\"\n }\n ]\n },\n \"reference\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n }\n ]\n },\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",\n \"code\": \"OTHER\",\n \"display\": \"Other reason\"\n }\n ]\n }\n },\n {\n \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n }\n ]\n}\n", + "raw": "{\n \"resourceType\": \"Consent\",\n \"status\": \"active\",\n \"scope\": {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\"\n }\n ],\n \"text\": \"Patient Privacy Consent\"\n },\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",\n \"code\": \"INFA\",\n \"display\": \"Information Access\"\n }\n ],\n \"text\": \"Information Access Consent\"\n }\n ],\n \"patient\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"dateTime\": \"2026-01-12T15:09:49.458Z\",\n \"provision\": {\n \"period\": {\n \"start\": \"2025-12-02\",\n \"end\": \"2030-11-23\"\n },\n \"actor\": [\n {\n \"role\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\"\n }\n ]\n },\n \"reference\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n }\n ]\n },\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",\n \"code\": \"OTHER\",\n \"display\": \"Other reason\"\n }\n ]\n }\n },\n {\n \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\"\n \n }\n ]\n}", "options": { "raw": { "language": "json" @@ -6799,18 +6766,18 @@ }, "response": [ { - "name": "Missing grantor when active status error", + "name": "Missing grantor reference error", "originalRequest": { "method": "POST", "header": [ { "key": "X-Request-ID", - "value": "{{$guid}}", + "value": "f059df53-0d68-4551-8233-8dedb7de5ba0", "type": "text" }, { "key": "X-Correlation-ID", - "value": "{{$guid}}", + "value": "2a759f36-a989-4392-b0ed-95b2425d92f9", "type": "text" }, { @@ -6821,7 +6788,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"resourceType\": \"Consent\",\n \"status\": \"active\",\n \"scope\": {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\"\n }\n ]\n },\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",\n \"code\": \"INFA\",\n \"display\": \"information access\"\n }\n ]\n }\n ],\n \"patient\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"dateTime\": \"{{$isoTimestamp}}\",\n \"provision\": {\n \"period\": {\n \"start\": \"2025-12-02\",\n \"end\": \"2030-11-23\"\n },\n \"actor\": [\n {\n \"role\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\"\n }\n ]\n },\n \"reference\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n }\n ]\n },\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created\"\n }\n ]\n }\n },\n {\n \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n }\n ]\n}\n", + "raw": "{\n \"resourceType\": \"Consent\",\n \"status\": \"active\",\n \"scope\": {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\"\n }\n ]\n },\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",\n \"code\": \"INFA\",\n \"display\": \"information access\"\n }\n ]\n }\n ],\n \"patient\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"dateTime\": \"2026-02-09T14:00:27.220Z\",\n \"provision\": {\n \"period\": {\n \"start\": \"2025-12-02\",\n \"end\": \"2030-11-23\"\n },\n \"actor\": [\n {\n \"role\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\"\n }\n ]\n },\n \"reference\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n }\n ]\n },\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created\"\n }\n ]\n }\n },\n {\n \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\"\n }\n ]\n}", "options": { "raw": { "language": "json" @@ -6829,11 +6796,19 @@ } }, "url": { - "raw": "{{api_base_url}}/Consent", + "raw": "https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent", + "protocol": "https", "host": [ - "{{api_base_url}}" + "int", + "api", + "service", + "nhs", + "uk" ], "path": [ + "validated-relationships", + "FHIR", + "R4", "Consent" ] } @@ -6884,12 +6859,12 @@ } ], "cookie": [], - "body": "{\n \"issue\": [\n {\n \"code\": \"invalid\",\n \"details\": {\n \"coding\": [\n {\n \"code\": \"MISSING_GRANTOR\",\n \"display\": \"Grantor required for active status\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"Grantor extension is required when creating a consent with status 'active'\",\n \"expression\": [\n \"extension.where(url = 'http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor')\"\n ],\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" + "body": "{\n \"issue\": [\n {\n \"code\": \"invalid\",\n \"details\": {\n \"coding\": [\n {\n \"code\": \"MISSING_GRANTOR_REFERENCE\",\n \"display\": \"Missing grantor reference\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"Grantor extension must contain a valueReference\",\n \"expression\": [\n \"extension.where(url = 'http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor').valueReference\"\n ],\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" } ] }, { - "name": "Missing grantor reference", + "name": "Missing grantor identifier", "event": [ { "listen": "test", @@ -6933,7 +6908,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"resourceType\": \"Consent\",\n \"status\": \"active\",\n \"scope\": {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\"\n }\n ],\n \"text\": \"Patient Privacy Consent\"\n },\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",\n \"code\": \"INFA\",\n \"display\": \"Information Access\"\n }\n ],\n \"text\": \"Information Access Consent\"\n }\n ],\n \"patient\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"dateTime\": \"2026-01-12T15:09:49.458Z\",\n \"provision\": {\n \"period\": {\n \"start\": \"2025-12-02\",\n \"end\": \"2030-11-23\"\n },\n \"actor\": [\n {\n \"role\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\"\n }\n ]\n },\n \"reference\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n }\n ]\n },\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",\n \"code\": \"OTHER\",\n \"display\": \"Other reason\"\n }\n ]\n }\n },\n {\n \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n }\n ]\n}\n", + "raw": "{\n \"resourceType\": \"Consent\",\n \"status\": \"active\",\n \"scope\": {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\"\n }\n ],\n \"text\": \"Patient Privacy Consent\"\n },\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",\n \"code\": \"INFA\",\n \"display\": \"Information Access\"\n }\n ],\n \"text\": \"Information Access Consent\"\n }\n ],\n \"patient\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"dateTime\": \"2026-01-12T15:09:49.458Z\",\n \"provision\": {\n \"period\": {\n \"start\": \"2025-12-02\",\n \"end\": \"2030-11-23\"\n },\n \"actor\": [\n {\n \"role\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\"\n }\n ]\n },\n \"reference\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n }\n ]\n },\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",\n \"code\": \"OTHER\",\n \"display\": \"Other reason\"\n }\n ]\n }\n },\n {\n \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",\n \"valueReference\": {}\n }\n }\n]\n}", "options": { "raw": { "language": "json" @@ -6953,7 +6928,7 @@ }, "response": [ { - "name": "Missing grantor reference error", + "name": "Missing grantor identifier error", "originalRequest": { "method": "POST", "header": [ @@ -6975,7 +6950,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"resourceType\": \"Consent\",\n \"status\": \"active\",\n \"scope\": {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\"\n }\n ]\n },\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",\n \"code\": \"INFA\",\n \"display\": \"information access\"\n }\n ]\n }\n ],\n \"patient\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"dateTime\": \"2026-02-09T14:00:27.220Z\",\n \"provision\": {\n \"period\": {\n \"start\": \"2025-12-02\",\n \"end\": \"2030-11-23\"\n },\n \"actor\": [\n {\n \"role\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\"\n }\n ]\n },\n \"reference\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n }\n ]\n },\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created\"\n }\n ]\n }\n },\n {\n \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\"\n }\n ]\n}", + "raw": "{\n \"resourceType\": \"Consent\",\n \"status\": \"active\",\n \"scope\": {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\"\n }\n ]\n },\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",\n \"code\": \"INFA\",\n \"display\": \"information access\"\n }\n ]\n }\n ],\n \"patient\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"dateTime\": \"2026-02-09T14:00:27.220Z\",\n \"provision\": {\n \"period\": {\n \"start\": \"2025-12-02\",\n \"end\": \"2030-11-23\"\n },\n \"actor\": [\n {\n \"role\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\"\n }\n ]\n },\n \"reference\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n }\n ]\n },\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created\"\n }\n ]\n }\n },\n {\n \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",\n \"valueReference\": {}\n }\n ]\n}", "options": { "raw": { "language": "json" @@ -7046,7 +7021,7 @@ } ], "cookie": [], - "body": "{\n \"issue\": [\n {\n \"code\": \"invalid\",\n \"details\": {\n \"coding\": [\n {\n \"code\": \"MISSING_GRANTOR_REFERENCE\",\n \"display\": \"Missing grantor reference\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"Grantor extension must contain a valueReference with identifier\",\n \"expression\": [\n \"extension.where(url = 'http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor').valueReference\"\n ],\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" + "body": "{\n \"issue\": [\n {\n \"code\": \"invalid\",\n \"details\": {\n \"coding\": [\n {\n \"code\": \"MISSING_GRANTOR_IDENTIFIER\",\n \"display\": \"Missing grantor identifier\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"Grantor extension must contain a valueIdentifier\",\n \"expression\": [\n \"extension.where(url = 'http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor').valueReference.identifier\"\n ],\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" } ] }, @@ -7208,7 +7183,7 @@ } ], "cookie": [], - "body": "{\n \"issue\": [\n {\n \"code\": \"invalid\",\n \"details\": {\n \"coding\": [\n {\n \"code\": \"INVALID_GRANTOR_SYSTEM\",\n \"display\": \"Invalid grantor identifier system\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"Grantor extension is required when creating a consent with status 'active'\",\n \"expression\": [\n \"extension.where(url = 'http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor').valueReference.identifier.system\"\n ],\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" + "body": "{\n \"issue\": [\n {\n \"code\": \"invalid\",\n \"details\": {\n \"coding\": [\n {\n \"code\": \"INVALID_GRANTOR_SYSTEM\",\n \"display\": \"Invalid grantor identifier system\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"Valid grantor extension identifier system is required when creating/updating a consent with status 'active'\",\n \"expression\": [\n \"extension.where(url = 'http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor').valueReference.identifier.system\"\n ],\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" } ] }, @@ -7370,7 +7345,7 @@ } ], "cookie": [], - "body": "{\n \"issue\": [\n {\n \"code\": \"invalid\",\n \"details\": {\n \"coding\": [\n {\n \"code\": \"INVALID_GRANTOR_VALUE\",\n \"display\": \"Invalid grantor identifier value\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"Grantor extension is required when creating a consent with status 'active'\",\n \"expression\": [\n \"extension.where(url = 'http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor').valueReference.identifier.value\"\n ],\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" + "body": "{\n \"issue\": [\n {\n \"code\": \"invalid\",\n \"details\": {\n \"coding\": [\n {\n \"code\": \"INVALID_GRANTOR_VALUE\",\n \"display\": \"Invalid grantor identifier value\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"Valid grantor extension identifier value is required when creating/updating a consent with status 'active'\",\n \"expression\": [\n \"extension.where(url = 'http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor').valueReference.identifier.value\"\n ],\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" } ] }, @@ -7951,7 +7926,7 @@ }, "response": [ { - "name": "Missing grantor", + "name": "Missing grantor error", "originalRequest": { "method": "PATCH", "header": [ @@ -8051,7 +8026,663 @@ } ], "cookie": [], - "body": "{\n \"issue\": [\n {\n \"code\": \"invalid\",\n \"details\": {\n \"coding\": [\n {\n \"code\": \"MISSING_GRANTOR\",\n \"display\": \"Grantor required for active status\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"Grantor extension is required when changing status to active\",\n \"severity\": \"error\",\n \"expression\": [\n \"extension.where(url = 'http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor')\"\n ]\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" + "body": "{\n \"issue\": [\n {\n \"code\": \"invalid\",\n \"details\": {\n \"coding\": [\n {\n \"code\": \"MISSING_GRANTOR\",\n \"display\": \"Grantor required for active status\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"Grantor extension is required when creating/updating an active proxy role\",\n \"severity\": \"error\",\n \"expression\": [\n \"extension.where(url = 'http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor')\"\n ]\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" + } + ] + }, + { + "name": "Missing grantor reference", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{cis2_token}}", + "type": "string" + } + ] + }, + "method": "PATCH", + "header": [ + { + "key": "Content-Type", + "value": "application/json-patch+json", + "type": "text" + }, + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "[\n\t{\n\t\t\"op\": \"replace\",\n\t\t\"path\": \"/status\",\n\t\t\"value\": \"active\"\n\t},\n\t{\n\t\t\"op\": \"add\",\n\t\t\"path\": \"/extension/-\",\n\t\t\"value\": [\n\t\t\t{\n\t\t\t\t\"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",\n\t\t\t\t\"valueCodeableConcept\": {\n\t\t\t\t\t\"coding\": [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",\n\t\t\t\t\t\t\t\"code\": \"ROLE_CREATED\",\n\t\t\t\t\t\t\t\"display\": \"Role created\"\n\t\t\t\t\t\t}\n\t\t\t\t\t]\n\t\t\t\t}\n\t\t\t},\n\t\t\t{\n\t\t\t\t\"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\"\n\t\t\t}\n\t\t]\n\t}\n]", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{api_base_url}}/Consent/:consent_id", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent", + ":consent_id" + ], + "variable": [ + { + "key": "consent_id", + "value": "0e8d365d-2667-4426-ae66-7eb8302bc724" + } + ] + }, + "description": "## Example scenario\n\n**Given** a proxy role exists in the National Proxy Store (NPS) \n**When** I send a PATCH /Consent request to update the proxy role \n**Then** a 200 response is returned and the role is updated" + }, + "response": [ + { + "name": "Missing grantor reference error", + "originalRequest": { + "method": "PATCH", + "header": [ + { + "key": "Content-Type", + "value": "application/json-patch+json", + "type": "text" + }, + { + "key": "X-Request-ID", + "value": "91ffa031-c7d8-46c9-acd7-5c7c81c7ad3e", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "24af4521-3ca5-4123-92a7-b255daa5f561", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "[\n {\n \"op\": \"replace\",\n \"path\": \"/status\",\n \"value\": \"active\"\n },\n {\n \"op\": \"add\",\n \"path\": \"/extension/-\",\n \"value\": [\n {\n \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created\"\n }\n ]\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\"\n }\n ]\n }\n]", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/:consent_id", + "protocol": "https", + "host": [ + "int", + "api", + "service", + "nhs", + "uk" + ], + "path": [ + "validated-relationships", + "FHIR", + "R4", + "Consent", + ":consent_id" + ], + "variable": [ + { + "key": "consent_id", + "value": "0e8d365d-2667-4426-ae66-7eb8302bc724" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Date", + "value": "Mon, 09 Feb 2026 13:44:16 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "490" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "35c94f51-ceed-4544-973b-6666dce5a447" + }, + { + "key": "x-amz-apigw-id", + "value": "YhCroEoNLPEFfxg=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-6989e4b0-ed8360e8a73f108f4753cf19" + }, + { + "key": "X-Request-ID", + "value": "e210658f-9b3e-4b3f-a41a-706ef045619f" + }, + { + "key": "X-Correlation-ID", + "value": "5ad4f9a4-07bc-4e98-a3e0-552a3a990631" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"issue\": [\n {\n \"code\": \"invalid\",\n \"details\": {\n \"coding\": [\n {\n \"code\": \"MISSING_GRANTOR_REFERENCE\",\n \"display\": \"Missing grantor reference\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"Grantor extension must contain a valueReference\",\n \"expression\": [\n \"extension.where(url = 'http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor').valueReference\"\n ],\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" + } + ] + }, + { + "name": "Missing grantor identifier", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{cis2_token}}", + "type": "string" + } + ] + }, + "method": "PATCH", + "header": [ + { + "key": "Content-Type", + "value": "application/json-patch+json", + "type": "text" + }, + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "[\n {\n \"op\": \"replace\",\n \"path\": \"/status\",\n \"value\": \"active\"\n },\n {\n \"op\": \"add\",\n \"path\": \"/extension/-\",\n \"value\": [\n {\n \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created\"\n }\n ]\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",\n \"valueReference\": {}\n }\n ]\n }\n]", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{api_base_url}}/Consent/:consent_id", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent", + ":consent_id" + ], + "variable": [ + { + "key": "consent_id", + "value": "0e8d365d-2667-4426-ae66-7eb8302bc724" + } + ] + }, + "description": "## Example scenario\n\n**Given** a proxy role exists in the National Proxy Store (NPS) \n**When** I send a PATCH /Consent request to update the proxy role \n**Then** a 200 response is returned and the role is updated" + }, + "response": [ + { + "name": "Missing grantor identifier error", + "originalRequest": { + "method": "PATCH", + "header": [ + { + "key": "Content-Type", + "value": "application/json-patch+json", + "type": "text" + }, + { + "key": "X-Request-ID", + "value": "91ffa031-c7d8-46c9-acd7-5c7c81c7ad3e", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "24af4521-3ca5-4123-92a7-b255daa5f561", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "[\n {\n \"op\": \"replace\",\n \"path\": \"/status\",\n \"value\": \"active\"\n },\n {\n \"op\": \"add\",\n \"path\": \"/extension/-\",\n \"value\": [\n {\n \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created\"\n }\n ]\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",\n \"valueReference\": {}\n }\n ]\n }\n]", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/:consent_id", + "protocol": "https", + "host": [ + "int", + "api", + "service", + "nhs", + "uk" + ], + "path": [ + "validated-relationships", + "FHIR", + "R4", + "Consent", + ":consent_id" + ], + "variable": [ + { + "key": "consent_id", + "value": "0e8d365d-2667-4426-ae66-7eb8302bc724" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Date", + "value": "Mon, 09 Feb 2026 13:44:16 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "490" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "35c94f51-ceed-4544-973b-6666dce5a447" + }, + { + "key": "x-amz-apigw-id", + "value": "YhCroEoNLPEFfxg=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-6989e4b0-ed8360e8a73f108f4753cf19" + }, + { + "key": "X-Request-ID", + "value": "e210658f-9b3e-4b3f-a41a-706ef045619f" + }, + { + "key": "X-Correlation-ID", + "value": "5ad4f9a4-07bc-4e98-a3e0-552a3a990631" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"issue\": [\n {\n \"code\": \"invalid\",\n \"details\": {\n \"coding\": [\n {\n \"code\": \"MISSING_GRANTOR_IDENTIFIER\",\n \"display\": \"Missing grantor identifier\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"Grantor extension must contain a valueIdentifier\",\n \"expression\": [\n \"extension.where(url = 'http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor').valueReference.identifier\"\n ],\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" + } + ] + }, + { + "name": "Invalid grantor system", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{cis2_token}}", + "type": "string" + } + ] + }, + "method": "PATCH", + "header": [ + { + "key": "Content-Type", + "value": "application/json-patch+json", + "type": "text" + }, + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "[\n {\n \"op\": \"replace\",\n \"path\": \"/status\",\n \"value\": \"active\"\n },\n {\n \"op\": \"add\",\n \"path\": \"/extension/-\",\n \"value\": [\n {\n \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created\"\n }\n ]\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://wrong-system.com\",\n \"value\": \"G8101234\"\n }\n }\n }\n ]\n }\n]", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{api_base_url}}/Consent/:consent_id", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent", + ":consent_id" + ], + "variable": [ + { + "key": "consent_id", + "value": "0e8d365d-2667-4426-ae66-7eb8302bc724" + } + ] + }, + "description": "## Example scenario\n\n**Given** a proxy role exists in the National Proxy Store (NPS) \n**When** I send a PATCH /Consent request to update the proxy role \n**Then** a 200 response is returned and the role is updated" + }, + "response": [ + { + "name": "Invalid grantor system error", + "originalRequest": { + "method": "PATCH", + "header": [ + { + "key": "Content-Type", + "value": "application/json-patch+json", + "type": "text" + }, + { + "key": "X-Request-ID", + "value": "91ffa031-c7d8-46c9-acd7-5c7c81c7ad3e", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "24af4521-3ca5-4123-92a7-b255daa5f561", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "[\n {\n \"op\": \"replace\",\n \"path\": \"/status\",\n \"value\": \"active\"\n },\n {\n \"op\": \"add\",\n \"path\": \"/extension/-\",\n \"value\": [\n {\n \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created\"\n }\n ]\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://wrong-system.com\",\n \"value\": \"G8101234\"\n }\n }\n }\n ]\n }\n]", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/:consent_id", + "protocol": "https", + "host": [ + "int", + "api", + "service", + "nhs", + "uk" + ], + "path": [ + "validated-relationships", + "FHIR", + "R4", + "Consent", + ":consent_id" + ], + "variable": [ + { + "key": "consent_id", + "value": "0e8d365d-2667-4426-ae66-7eb8302bc724" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Date", + "value": "Mon, 09 Feb 2026 13:44:16 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "490" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "35c94f51-ceed-4544-973b-6666dce5a447" + }, + { + "key": "x-amz-apigw-id", + "value": "YhCroEoNLPEFfxg=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-6989e4b0-ed8360e8a73f108f4753cf19" + }, + { + "key": "X-Request-ID", + "value": "e210658f-9b3e-4b3f-a41a-706ef045619f" + }, + { + "key": "X-Correlation-ID", + "value": "5ad4f9a4-07bc-4e98-a3e0-552a3a990631" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"issue\": [\n {\n \"code\": \"invalid\",\n \"details\": {\n \"coding\": [\n {\n \"code\": \"INVALID_GRANTOR_SYSTEM\",\n \"display\": \"Invalid grantor identifier system\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"Valid grantor extension identifier system is required when creating/updating a consent with status 'active'\",\n \"expression\": [\n \"extension.where(url = 'http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor').valueReference.identifier.system\"\n ],\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" + } + ] + }, + { + "name": "Invalid grantor value", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{cis2_token}}", + "type": "string" + } + ] + }, + "method": "PATCH", + "header": [ + { + "key": "Content-Type", + "value": "application/json-patch+json", + "type": "text" + }, + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "[\n {\n \"op\": \"replace\",\n \"path\": \"/status\",\n \"value\": \"active\"\n },\n {\n \"op\": \"add\",\n \"path\": \"/extension/-\",\n \"value\": [\n {\n \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created\"\n }\n ]\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"BAD\"\n }\n }\n }\n ]\n }\n]", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{api_base_url}}/Consent/:consent_id", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent", + ":consent_id" + ], + "variable": [ + { + "key": "consent_id", + "value": "0e8d365d-2667-4426-ae66-7eb8302bc724" + } + ] + }, + "description": "## Example scenario\n\n**Given** a proxy role exists in the National Proxy Store (NPS) \n**When** I send a PATCH /Consent request to update the proxy role \n**Then** a 200 response is returned and the role is updated" + }, + "response": [ + { + "name": "Invalid grantor value error", + "originalRequest": { + "method": "PATCH", + "header": [ + { + "key": "Content-Type", + "value": "application/json-patch+json", + "type": "text" + }, + { + "key": "X-Request-ID", + "value": "91ffa031-c7d8-46c9-acd7-5c7c81c7ad3e", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "24af4521-3ca5-4123-92a7-b255daa5f561", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "[\n\t{\n\t\t\"op\": \"replace\",\n\t\t\"path\": \"/status\",\n\t\t\"value\": \"active\"\n\t},\n\t{\n\t\t\"op\": \"add\",\n\t\t\"path\": \"/extension/-\",\n\t\t\"value\": [\n\t\t\t{\n\t\t\t\t\"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",\n\t\t\t\t\"valueCodeableConcept\": {\n\t\t\t\t\t\"coding\": [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",\n\t\t\t\t\t\t\t\"code\": \"ROLE_CREATED\",\n\t\t\t\t\t\t\t\"display\": \"Role created\"\n\t\t\t\t\t\t}\n\t\t\t\t\t]\n\t\t\t\t}\n\t\t\t},\n\t\t\t{\n\t\t\t\t\"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",\n\t\t\t\t\"valueReference\": {\n\t\t\t\t\t\"identifier\": {\n\t\t\t\t\t\t\"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n\t\t\t\t\t\t\"value\": \"BAD\"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t]\n\t}\n]", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/:consent_id", + "protocol": "https", + "host": [ + "int", + "api", + "service", + "nhs", + "uk" + ], + "path": [ + "validated-relationships", + "FHIR", + "R4", + "Consent", + ":consent_id" + ], + "variable": [ + { + "key": "consent_id", + "value": "0e8d365d-2667-4426-ae66-7eb8302bc724" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Date", + "value": "Mon, 09 Feb 2026 13:44:16 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "490" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "35c94f51-ceed-4544-973b-6666dce5a447" + }, + { + "key": "x-amz-apigw-id", + "value": "YhCroEoNLPEFfxg=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-6989e4b0-ed8360e8a73f108f4753cf19" + }, + { + "key": "X-Request-ID", + "value": "e210658f-9b3e-4b3f-a41a-706ef045619f" + }, + { + "key": "X-Correlation-ID", + "value": "5ad4f9a4-07bc-4e98-a3e0-552a3a990631" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"issue\": [\n {\n \"code\": \"invalid\",\n \"details\": {\n \"coding\": [\n {\n \"code\": \"INVALID_GRANTOR_VALUE\",\n \"display\": \"Invalid grantor identifier value\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"Valid grantor extension identifier value is required when creating/updating a consent with status 'active'\",\n \"expression\": [\n \"extension.where(url = 'http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor').valueReference.identifier.value\"\n ],\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" } ] }, From a948f31daba2ab4a998ae3b82826d622c7f3766c Mon Sep 17 00:00:00 2001 From: ChristopherBacon <59895399+ChristopherBacon@users.noreply.github.com> Date: Thu, 12 Feb 2026 16:10:53 +0000 Subject: [PATCH 05/11] Update collection name to reflect new date --- ...ted_relationship_service.integration.postman_collection.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/postman/validated_relationship_service.integration.postman_collection.json b/postman/validated_relationship_service.integration.postman_collection.json index 130be334..66d8499d 100644 --- a/postman/validated_relationship_service.integration.postman_collection.json +++ b/postman/validated_relationship_service.integration.postman_collection.json @@ -1,7 +1,7 @@ { "info": { "_postman_id": "c1dd5e2d-9dca-4360-8671-21fd0e6ae3e2", - "name": "Validated Relationship Service - Integration - 09/02/26", + "name": "Validated Relationship Service - Integration - 12/02/26", "description": "## About the collection\n\nThe collection has been organised by API endpoint - you will find a folder for each one.\n\nWithin those endpoints are requests covering success and error response scenarios.\n\nEach request has at least 1 example against it. This shows the expected response for that request. Some requests have multiple examples showing how the response differs when different parameters are provided.\n\n### Authorization types\n\nWhen you send a request to the Validated Relationship Service, your request will first be authorised by the API Management service (APIM).\n\nThe Validated Relationship Service has 3 types of authorization:\n\n- CIS2 - For healthcare practitioners\n- App-restricted - for service-to-service authorization\n- Login - For patient/proxy access via the NHS App\n \n\nEach VRS API endpoint uses a different combination of these auth types depending on their use case.\n\nYou will need to follow the steps in the 'Getting Started' section below to set the correct authorization tokens for each of these types.\n\nPlease see the folder-level docs for each endpoint for details about what auth types are available to use.\n\n## Getting started\n\n### Environment variables\n\nYou will need to add the following environment variables to the collection.\n\n#### `cis2_token`\n\nAuthorization token value for CIS2 (healthcare practitioner access).\n\n_Only required when using endponts that require this auth method._\n\nThis value can be generated by running the `get_cis2_access_token_int.py` script . See more details in the 'How to create a valid Authorization header' section below.\n\n#### `login_token`\n\nAuthorization token value for NHS Login (patient access).\n\n_Only required when using endponts that require this auth method._\n\nThis value can be generated by running the `get_nhs_login_access_token_int.py` script . See more details in the 'How to create a valid Authorization header' section below.\n\n#### `vrs_api_private_key`\n\n**(This is not the same as the private key in the NHS Developer Account portal.)**\n\nAPI private key for the Validated Relationship Service integration application.\n\n_Only required when using endponts that use the app restricted auth method._\n\nThis value can be copied from the /main/vrs-app-credentials-{id} secret in **AWS Secrets Manager** or requested to be sent securely from a member of the VRS team.\n\n#### `nhs_developer_account_api_key`\n\nAPI app key for the Validated Relationship Service integration application.\n\n_Only required when using endponts that use the app restricted auth method._\n\nThis value can be copied from the NHS - Proxy Core Services - Integration environment resource in the NHS Developer Account portal.\n\n#### `consent_app_auth_header_value` (Generated automatically)\n\nAuthorization token value for app restricted auth.\n\n_Only required when using endponts that use the app restricted auth method._\n\n**You do not need to change this value as it is automatically set in the pre-request script.**\n\n#### `tpp_9674998535_access_token`, `tpp_9674998454_access_token`, `emis_9692113698_access_token,` and `emis_9692113612_access_token`\n\nAuthorization token value for connecting to GPIT supplier systems in NAM tests (Get proxy roles only).\n\n_Only required when running the_ `_Get proxy roles (GET/Consent) Valid request - NAM - Get proxy roles_` _requests._\n\nValues for these environment variables can be found on the [Test data page in Confluence](https://nhsd-confluence.digital.nhs.uk/spaces/NPA/pages/950553445/Test+data+and+accounts+repository+-+NPA#TestdataandaccountsrepositoryNPA-GPITtestaccountsforEXT).\n\n### How to create a valid Authorization header\n\n#### Manually through Python scripts (required for Login and CIS2)\n\n##### Pre-requisites\n\nAccess the token generation scripts from the [validated-relationships-service-api repo](https://github.com/NHSDigital/validated-relationships-service-api/tree/master/scripts):\n\n- get_app_access_token_int.py - for app restricted authorization\n- get_cis2_access_token_int.py - for CIS2 authorization\n- get_nhs_login_access_token_int.py - for Login user authorization\n \n\nSee the [README](https://github.com/NHSDigital/validated-relationships-service-api/tree/master/scripts/README.md) for information about how to run them and what environment variables are needed.\n\n##### Steps\n\n1. Generate bearer tokens for each of the above methods using the provided scripts\n2. Go to the Authorization tab for this Postman request\n3. Select 'Bearer token' from the drop-down\n4. Copy just the 'access_request' value from the script output into the Token field. You do **not** need to add the word 'bearer' before the value.\n \n\nTokens expire every 5 minutes. Once expired, you will receive an 'Unauthorised' response from the API endpoints. At this point, a new token will need to be generated by repeating the above steps.\n\n#### Automatically through pre-request script (for App-restricted)\n\nA pre-request script has been added to the endpoints where app-restricted auth can be used to obtain app-restricted tokens automatically. For this to work, you will need to add values for the following environment variables:\n\n- `private_key`\n- `api_key`\n \n\nIf those values are set and valid, then no further action is required.\n\n## Running a request\n\nOnce you have completed the above 'Getting Started' steps you will be able to send requests by either clicking the 'Send' button on each request, or the 'Try' button on each example.\n\nThe pre-prod environments are not constricted to just the requests provided in this collection. Feel free to change and create requests/examples as you require. However, only the test users provided will work in these environments.\n\n## Test data\n\nAll of the requests in the collection use test data and users that have been set up to demonstrate each specific scenario. No sensitive data is stored in this collection.\n\nSee each scenario for information about what test users are being used.", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", "_exporter_id": "46399153", From 7ee1ea2dcbeac25a6dc05131952f711e42072d8b Mon Sep 17 00:00:00 2001 From: ChristopherBacon <59895399+ChristopherBacon@users.noreply.github.com> Date: Thu, 12 Feb 2026 16:11:24 +0000 Subject: [PATCH 06/11] Update collection name in Postman JSON file --- ...lidated_relationship_service.sandbox.postman_collection.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/postman/validated_relationship_service.sandbox.postman_collection.json b/postman/validated_relationship_service.sandbox.postman_collection.json index 704f281f..d4fad329 100644 --- a/postman/validated_relationship_service.sandbox.postman_collection.json +++ b/postman/validated_relationship_service.sandbox.postman_collection.json @@ -1,7 +1,7 @@ { "info": { "_postman_id": "42b78898-1d68-430e-b112-1b90e5002695", - "name": "Validated Relationship Service Sandbox 06/02/26", + "name": "Validated Relationship Service Sandbox 12/02/26", "description": "This Postman collection includes example scenarios for each of the Validated Relationship Service (VRS) API endpoints, covering both valid and invalid request scenarios.\n\nThe collection is pointed towards the VRS sandbox environment, which will return a specific example response based on the request sent. All data shown in the requests or responses is test data.\n\nOur sandbox environment only covers the scenarios listed in the Postman collection and is open access. It does not allow you to test authorisation or any scenarios beyond the ones documented.\n\nFull specification is available at [https://digital.nhs.uk/developer/api-catalogue/validated-relationship-service](https://digital.nhs.uk/developer/api-catalogue/validated-relationship-service)", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", "_exporter_id": "46399153", From a103822139d2bef71e2a52c482af666644b842e2 Mon Sep 17 00:00:00 2001 From: ChristopherBacon Date: Fri, 13 Feb 2026 10:27:52 +0000 Subject: [PATCH 07/11] NPA-6153: Postman test fails updated examples --- ...onships-status-active-include-details.yaml | 12 +++++ ...iltered-relationships-status-inactive.yaml | 22 +++++----- ...-relationships-status-proposed-active.yaml | 44 ++++++++++--------- ...ultiple-relationships-include-patient.yaml | 33 +++++++------- ...lationships-include-performer-patient.yaml | 33 +++++++------- ...tiple-relationships-include-performer.yaml | 33 +++++++------- ...gle-patient-include-performer-patient.yaml | 33 +++++++------- ...hips-single-patient-include-performer.yaml | 33 +++++++------- ...multiple-relationships-single-patient.yaml | 33 +++++++------- .../GET_Consent/multiple-relationships.yaml | 33 +++++++------- 10 files changed, 174 insertions(+), 135 deletions(-) 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..3f81af36 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 @@ -111,6 +111,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: @@ -215,6 +221,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: 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..32be61af 100644 --- a/specification/examples/responses/GET_Consent/filtered-relationships-status-inactive.yaml +++ b/specification/examples/responses/GET_Consent/filtered-relationships-status-inactive.yaml @@ -40,11 +40,6 @@ 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' @@ -55,6 +50,12 @@ ConsentMultipleRelationshipsStatusInactiveBundle: - 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: @@ -92,11 +93,6 @@ 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' @@ -108,6 +104,12 @@ ConsentMultipleRelationshipsStatusInactiveBundle: 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: 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..9bfeb07f 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-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: From b0c8132469a3e20337df429ab1fe8357ccb18076 Mon Sep 17 00:00:00 2001 From: ChristopherBacon <59895399+ChristopherBacon@users.noreply.github.com> Date: Fri, 13 Feb 2026 13:15:45 +0000 Subject: [PATCH 08/11] NPA-6154: Change the spec and Postman (#299) https://nhsd-jira.digital.nhs.uk/browse/NPA-6154 --- - Update Postman - Update Spec - --- - - - --- - [ ] - [ ] - [ ] --- - [x] PR title follows the format: `NPA-XXXX: ` - [x] Branch name follows the convention: `/NPA-XXXX/` - [x] Commit messages follow the template: `NPA-XXXX: ` - [ ] 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 --- - [ ] 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) --- 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. --------- Co-authored-by: Leo Howard <38526889+LeoKHoward@users.noreply.github.com> --- sandbox/api/post_consent.py | 3 +- sandbox/api/tests/test_post_consent.py | 9 +- .../PATCH_Consent/replace_legal_basis.yaml | 17 ---- .../replace_regulatory_basis.yaml | 13 +++ .../adult_to_adult_proxy_creation.yaml | 25 +++--- .../parent_child_proxy_creation.yaml | 26 +++--- ...onships-status-active-include-details.yaml | 54 +++++------- ...iltered-relationships-status-inactive.yaml | 88 +++++++++++-------- ...tiple-relationships-include-performer.yaml | 21 +++-- ...nships-single-patient-include-patient.yaml | 33 +++---- ...ng-adult-relationship-include-patient.yaml | 11 +-- ...elationship-include-performer-patient.yaml | 11 +-- ...-adult-relationship-include-performer.yaml | 11 +-- .../single-consenting-adult-relationship.yaml | 11 +-- ...er-child-relationship-include-patient.yaml | 11 +-- ...elationship-include-performer-patient.yaml | 11 +-- ...-child-relationship-include-performer.yaml | 11 +-- ...hild-relationship-unknown-legal-basis.yaml | 11 +-- .../single-mother-child-relationship.yaml | 15 ++-- .../validated-relationships-service-api.yaml | 19 +++- 20 files changed, 221 insertions(+), 190 deletions(-) delete mode 100644 specification/examples/requests/PATCH_Consent/replace_legal_basis.yaml create mode 100644 specification/examples/requests/PATCH_Consent/replace_regulatory_basis.yaml diff --git a/sandbox/api/post_consent.py b/sandbox/api/post_consent.py index a194ed80..8b1a3b32 100644 --- a/sandbox/api/post_consent.py +++ b/sandbox/api/post_consent.py @@ -31,7 +31,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 9bb76917..db0a9666 100644 --- a/sandbox/api/tests/test_post_consent.py +++ b/sandbox/api/tests/test_post_consent.py @@ -106,7 +106,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 3f81af36..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" @@ -206,36 +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: "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" + - 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 32be61af..ae0925b1 100644 --- a/specification/examples/responses/GET_Consent/filtered-relationships-status-inactive.yaml +++ b/specification/examples/responses/GET_Consent/filtered-relationships-status-inactive.yaml @@ -44,23 +44,28 @@ ConsentMultipleRelationshipsStatusInactiveBundle: 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: "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: 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' + - 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 - fullUrl: https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/ABCD12B3 @@ -89,31 +94,36 @@ ConsentMultipleRelationshipsStatusInactiveBundle: provision: type: permit actor: - - reference: - identifier: - system: https://fhir.nhs.uk/Id/nhs-number - value: '9000000017' + - 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: "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: 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' + - 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/multiple-relationships-include-performer.yaml b/specification/examples/responses/GET_Consent/multiple-relationships-include-performer.yaml index 9bfeb07f..d477c677 100644 --- a/specification/examples/responses/GET_Consent/multiple-relationships-include-performer.yaml +++ b/specification/examples/responses/GET_Consent/multiple-relationships-include-performer.yaml @@ -79,8 +79,8 @@ ConsentMultipleRelationshipsIncludePerformerBundle: valueCodeableConcept: coding: - system: "https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis" - code: "parental-responsibility" - display: "Parental responsibility" + code: parental-responsibility + display: Parental responsibility - url: https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee valueReference: identifier: @@ -154,12 +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" + - 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" + - 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: @@ -233,12 +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" + - 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" + - 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: @@ -251,4 +251,3 @@ ConsentMultipleRelationshipsIncludePerformerBundle: value: "G8101234" search: mode: match - 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/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 19db6c8a..c7ad71f5 100644 --- a/specification/validated-relationships-service-api.yaml +++ b/specification/validated-relationships-service-api.yaml @@ -1046,8 +1046,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 @@ -2346,6 +2346,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." @@ -2395,7 +2396,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 @@ -2408,6 +2410,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: From fd2e040570d6936c72da92362ec5605dce6d7894 Mon Sep 17 00:00:00 2001 From: LeoKHoward <38526889+LeoKHoward@users.noreply.github.com> Date: Fri, 13 Feb 2026 16:05:45 +0000 Subject: [PATCH 09/11] NPA-6153: Update postman sandbox file --- ...ip_service.sandbox.postman_collection.json | 66 +++++++++---------- 1 file changed, 31 insertions(+), 35 deletions(-) diff --git a/postman/validated_relationship_service.sandbox.postman_collection.json b/postman/validated_relationship_service.sandbox.postman_collection.json index d4fad329..a097f271 100644 --- a/postman/validated_relationship_service.sandbox.postman_collection.json +++ b/postman/validated_relationship_service.sandbox.postman_collection.json @@ -1,11 +1,11 @@ { "info": { - "_postman_id": "42b78898-1d68-430e-b112-1b90e5002695", - "name": "Validated Relationship Service Sandbox 12/02/26", + "_postman_id": "0d8c2f36-9e84-45bc-9f27-861703559c66", + "name": "Validated Relationship Service Sandbox 13/02/26", "description": "This Postman collection includes example scenarios for each of the Validated Relationship Service (VRS) API endpoints, covering both valid and invalid request scenarios.\n\nThe collection is pointed towards the VRS sandbox environment, which will return a specific example response based on the request sent. All data shown in the requests or responses is test data.\n\nOur sandbox environment only covers the scenarios listed in the Postman collection and is open access. It does not allow you to test authorisation or any scenarios beyond the ones documented.\n\nFull specification is available at [https://digital.nhs.uk/developer/api-catalogue/validated-relationship-service](https://digital.nhs.uk/developer/api-catalogue/validated-relationship-service)", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", "_exporter_id": "46399153", - "_collection_link": "https://www.postman.com/leohoward/workspace/vrsa-10-02-2026/collection/46399153-42b78898-1d68-430e-b112-1b90e5002695?action=share&source=collection_link&creator=46399153" + "_collection_link": "https://www.postman.com/leohoward/workspace/vrsa-13-02-2026/collection/46399153-0d8c2f36-9e84-45bc-9f27-861703559c66?action=share&source=collection_link&creator=46399153" }, "item": [ { @@ -2196,15 +2196,6 @@ " \"type\": \"permit\",", " \"actor\": [", " {", - " \"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\",", @@ -2393,15 +2384,6 @@ " \"type\": \"permit\",", " \"actor\": [", " {", - " \"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\",", @@ -2477,8 +2459,7 @@ "});" ], "type": "text/javascript", - "packages": {}, - "requests": {} + "packages": {} } }, { @@ -2488,8 +2469,7 @@ "" ], "type": "text/javascript", - "packages": {}, - "requests": {} + "packages": {} } } ], @@ -2646,6 +2626,15 @@ " \"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\"", + " }", + " }", " }", " ]", " },", @@ -2743,6 +2732,15 @@ " \"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\"", + " }", + " }", " }", " ]", " },", @@ -2763,8 +2761,7 @@ "});" ], "type": "text/javascript", - "packages": {}, - "requests": {} + "packages": {} } }, { @@ -2774,8 +2771,7 @@ "" ], "type": "text/javascript", - "packages": {}, - "requests": {} + "packages": {} } } ], @@ -8806,7 +8802,7 @@ "header": [], "body": { "mode": "raw", - "raw": "{\n\t\"resourceType\": \"Consent\",\n\t\"status\": \"active\",\n\t\"scope\": {\n\t\t\"coding\": [\n\t\t\t{\n\t\t\t\t\"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\",\n\t\t\t\t\"code\": \"patient-privacy\",\n\t\t\t\t\"display\": \"Privacy Consent\"\n\t\t\t}\n\t\t]\n\t},\n\t\"category\": [\n\t\t{\n\t\t\t\"coding\": [\n\t\t\t\t{\n\t\t\t\t\t\"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\",\n\t\t\t\t\t\"code\": \"INFA\",\n\t\t\t\t\t\"display\": \"information access\"\n\t\t\t\t}\n\t\t\t]\n\t\t}\n\t],\n\t\"patient\": {\n\t\t\"type\": \"Patient\",\n\t\t\"identifier\": {\n\t\t\t\"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n\t\t\t\"value\": \"9000000054\"\n\t\t}\n\t},\n\t\"dateTime\": \"2025-02-11T14:30:00Z\",\n\t\"performer\": [\n\t\t{\n\t\t\t\"type\": \"RelatedPerson\",\n\t\t\t\"identifier\": {\n\t\t\t\t\"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n\t\t\t\t\"value\": \"9000000054\"\n\t\t\t}\n\t\t}\n\t],\n\t\"provision\": {\n\t\t\"type\": \"permit\",\n\t\t\"period\": {\n\t\t\t\"start\": \"2025-02-11\",\n\t\t\t\"end\": \"2026-02-11\"\n\t\t},\n\t\t\"actor\": [\n\t\t\t{\n\t\t\t\t\"role\": {\n\t\t\t\t\t\"coding\": [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n\t\t\t\t\t\t\t\"code\": \"PRN\",\n\t\t\t\t\t\t\t\"display\": \"Parent\"\n\t\t\t\t\t\t}\n\t\t\t\t\t]\n\t\t\t\t},\n\t\t\t\t\"reference\": {\n\t\t\t\t\t\"type\": \"RelatedPerson\",\n\t\t\t\t\t\"identifier\": {\n\t\t\t\t\t\t\"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n\t\t\t\t\t\t\"value\": \"9000000054\"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t]\n\t},\n\t\"extension\": [\n\t\t{\n\t\t\t\"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n\t\t\t\"valueCodeableConcept\": {\n\t\t\t\t\"coding\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"system\": \"http://terminology.hl7.org/CodeSystem/consent-reason\",\n\t\t\t\t\t\t\"code\": \"TBC\",\n\t\t\t\t\t\t\"display\": \"TBC\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n\t\t\t\"valueReference\": {\n\t\t\t\t\"identifier\": {\n\t\t\t\t\t\"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n\t\t\t\t\t\"value\": \"9736898148\"\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t]\n}", + "raw": "{\n\t\"resourceType\": \"Consent\",\n\t\"status\": \"active\",\n\t\"scope\": {\n\t\t\"coding\": [\n\t\t\t{\n\t\t\t\t\"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\",\n\t\t\t\t\"code\": \"patient-privacy\",\n\t\t\t\t\"display\": \"Privacy Consent\"\n\t\t\t}\n\t\t]\n\t},\n\t\"category\": [\n\t\t{\n\t\t\t\"coding\": [\n\t\t\t\t{\n\t\t\t\t\t\"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\",\n\t\t\t\t\t\"code\": \"INFA\",\n\t\t\t\t\t\"display\": \"information access\"\n\t\t\t\t}\n\t\t\t]\n\t\t}\n\t],\n\t\"patient\": {\n\t\t\"type\": \"Patient\",\n\t\t\"identifier\": {\n\t\t\t\"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n\t\t\t\"value\": \"9000000054\"\n\t\t}\n\t},\n\t\"dateTime\": \"2025-02-11T14:30:00Z\",\n\t\"provision\": {\n\t\t\"type\": \"permit\",\n\t\t\"period\": {\n\t\t\t\"start\": \"2025-02-11\",\n\t\t\t\"end\": \"2026-02-11\"\n\t\t},\n\t\t\"actor\": [\n\t\t\t{\n\t\t\t\t\"role\": {\n\t\t\t\t\t\"coding\": [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n\t\t\t\t\t\t\t\"code\": \"PRN\",\n\t\t\t\t\t\t\t\"display\": \"Parent\"\n\t\t\t\t\t\t}\n\t\t\t\t\t]\n\t\t\t\t},\n\t\t\t\t\"reference\": {\n\t\t\t\t\t\"type\": \"RelatedPerson\",\n\t\t\t\t\t\"identifier\": {\n\t\t\t\t\t\t\"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n\t\t\t\t\t\t\"value\": \"9000000054\"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t]\n\t},\n\t\"extension\": [\n\t\t{\n\t\t\t\"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n\t\t\t\"valueCodeableConcept\": {\n\t\t\t\t\"coding\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"system\": \"http://terminology.hl7.org/CodeSystem/consent-reason\",\n\t\t\t\t\t\t\"code\": \"TBC\",\n\t\t\t\t\t\t\"display\": \"TBC\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n\t\t\t\"valueReference\": {\n\t\t\t\t\"identifier\": {\n\t\t\t\t\t\"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n\t\t\t\t\t\"value\": \"9000000054\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.regulatoryBasis\",\n\t\t\t\"valueCodeableConcept\": {\n\t\t\t\t\"coding\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",\n\t\t\t\t\t\t\"code\": \"parental-responsibility\",\n\t\t\t\t\t\t\"display\": \"Parental responsibility\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t}\n\t\t}\n\t]\n}", "options": { "raw": { "language": "json" @@ -8875,7 +8871,7 @@ "header": [], "body": { "mode": "raw", - "raw": "{\n \"resourceType\": \"Consent\",\n \"status\": \"active\",\n \"scope\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\",\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\"\n }\n ]\n },\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\",\n \"code\": \"INFA\",\n \"display\": \"information access\"\n }\n ]\n }\n ],\n \"patient\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000058\"\n }\n },\n \"dateTime\": \"2025-02-11T14:30:00Z\",\n \"performer\": [\n {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000058\"\n }\n }\n ],\n \"provision\": {\n \"type\": \"permit\",\n \"period\": {\n \"start\": \"2025-02-11\",\n \"end\": \"2026-02-11\"\n },\n \"actor\": [\n {\n \"role\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n ]\n },\n \"reference\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000058\"\n }\n }\n }\n ]\n },\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/consent-reason\",\n \"code\": \"TBC\",\n \"display\": \"TBC\"\n }\n ]\n }\n },\n {\n \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",\n \"valueReference\": {\n \"identifier\": {}\n }\n }\n ]\n}", + "raw": "{\n \"resourceType\": \"Consent\",\n \"status\": \"active\",\n \"scope\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\",\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\"\n }\n ]\n },\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\",\n \"code\": \"INFA\",\n \"display\": \"information access\"\n }\n ]\n }\n ],\n \"patient\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000058\"\n }\n },\n \"dateTime\": \"2025-02-11T14:30:00Z\",\n \"provision\": {\n \"type\": \"permit\",\n \"period\": {\n \"start\": \"2025-02-11\",\n \"end\": \"2026-02-11\"\n },\n \"actor\": [\n {\n \"role\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n ]\n },\n \"reference\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000058\"\n }\n }\n }\n ]\n },\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/consent-reason\",\n \"code\": \"TBC\",\n \"display\": \"TBC\"\n }\n ]\n }\n },\n {\n \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000058\"\n }\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.regulatoryBasis\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\"\n }\n ]\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",\n \"valueReference\": {\n \"identifier\": {}\n }\n }\n ]\n}", "options": { "raw": { "language": "json" @@ -8944,7 +8940,7 @@ "header": [], "body": { "mode": "raw", - "raw": "{\n \"resourceType\": \"Consent\",\n \"status\": \"active\",\n \"scope\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\",\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\"\n }\n ]\n },\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\",\n \"code\": \"INFA\",\n \"display\": \"information access\"\n }\n ]\n }\n ],\n \"patient\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000056\"\n }\n },\n \"dateTime\": \"2025-02-11T14:30:00Z\",\n \"performer\": [\n {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000056\"\n }\n }\n ],\n \"provision\": {\n \"type\": \"permit\",\n \"period\": {\n \"start\": \"2025-02-11\",\n \"end\": \"2026-02-11\"\n },\n \"actor\": [\n {\n \"role\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n ]\n },\n \"reference\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000056\"\n }\n }\n }\n ]\n },\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/consent-reason\",\n \"code\": \"TBC\",\n \"display\": \"TBC\"\n }\n ]\n }\n },\n {\n \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"BAD\",\n \"value\": \"G8101234\"\n }\n }\n }\n ]\n}", + "raw": "{\n \"resourceType\": \"Consent\",\n \"status\": \"active\",\n \"scope\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\",\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\"\n }\n ]\n },\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\",\n \"code\": \"INFA\",\n \"display\": \"information access\"\n }\n ]\n }\n ],\n \"patient\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000056\"\n }\n },\n \"dateTime\": \"2025-02-11T14:30:00Z\",\n \"provision\": {\n \"type\": \"permit\",\n \"period\": {\n \"start\": \"2025-02-11\",\n \"end\": \"2026-02-11\"\n },\n \"actor\": [\n {\n \"role\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n ]\n },\n \"reference\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000056\"\n }\n }\n }\n ]\n },\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/consent-reason\",\n \"code\": \"TBC\",\n \"display\": \"TBC\"\n }\n ]\n }\n },\n {\n \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000056\"\n }\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.regulatoryBasis\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\"\n }\n ]\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"BAD\",\n \"value\": \"G8101234\"\n }\n }\n }\n ]\n}", "options": { "raw": { "language": "json" @@ -9013,7 +9009,7 @@ "header": [], "body": { "mode": "raw", - "raw": "{\n \"resourceType\": \"Consent\",\n \"status\": \"active\",\n \"scope\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\",\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\"\n }\n ]\n },\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\",\n \"code\": \"INFA\",\n \"display\": \"information access\"\n }\n ]\n }\n ],\n \"patient\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000055\"\n }\n },\n \"dateTime\": \"2025-02-11T14:30:00Z\",\n \"performer\": [\n {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000055\"\n }\n }\n ],\n \"provision\": {\n \"type\": \"permit\",\n \"period\": {\n \"start\": \"2025-02-11\",\n \"end\": \"2026-02-11\"\n },\n \"actor\": [\n {\n \"role\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n ]\n },\n \"reference\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000055\"\n }\n }\n }\n ]\n },\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/consent-reason\",\n \"code\": \"TBC\",\n \"display\": \"TBC\"\n }\n ]\n }\n },\n {\n \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"BAD\"\n }\n }\n }\n ]\n}", + "raw": "{\n \"resourceType\": \"Consent\",\n \"status\": \"active\",\n \"scope\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\",\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\"\n }\n ]\n },\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\",\n \"code\": \"INFA\",\n \"display\": \"information access\"\n }\n ]\n }\n ],\n \"patient\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000055\"\n }\n },\n \"dateTime\": \"2025-02-11T14:30:00Z\",\n \"provision\": {\n \"type\": \"permit\",\n \"period\": {\n \"start\": \"2025-02-11\",\n \"end\": \"2026-02-11\"\n },\n \"actor\": [\n {\n \"role\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n ]\n },\n \"reference\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000055\"\n }\n }\n }\n ]\n },\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/consent-reason\",\n \"code\": \"TBC\",\n \"display\": \"TBC\"\n }\n ]\n }\n },\n {\n \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000055\"\n }\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.regulatoryBasis\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\"\n }\n ]\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"BAD\"\n }\n }\n }\n ]\n}", "options": { "raw": { "language": "json" @@ -9082,7 +9078,7 @@ "header": [], "body": { "mode": "raw", - "raw": "{\n \"resourceType\": \"Consent\",\n \"status\": \"active\",\n \"scope\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\",\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\"\n }\n ]\n },\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\",\n \"code\": \"INFA\",\n \"display\": \"information access\"\n }\n ]\n }\n ],\n \"patient\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000057\"\n }\n },\n \"dateTime\": \"2025-02-11T14:30:00Z\",\n \"performer\": [\n {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000057\"\n }\n }\n ],\n \"provision\": {\n \"type\": \"permit\",\n \"period\": {\n \"start\": \"2025-02-11\",\n \"end\": \"2026-02-11\"\n },\n \"actor\": [\n {\n \"role\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n ]\n },\n \"reference\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000057\"\n }\n }\n }\n ]\n },\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/consent-reason\",\n \"code\": \"TBC\",\n \"display\": \"TBC\"\n }\n ]\n }\n },\n {\n \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",\n \"valueReference\": {}\n }\n ]\n}", + "raw": "{\n \"resourceType\": \"Consent\",\n \"status\": \"active\",\n \"scope\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\",\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\"\n }\n ]\n },\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\",\n \"code\": \"INFA\",\n \"display\": \"information access\"\n }\n ]\n }\n ],\n \"patient\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000057\"\n }\n },\n \"dateTime\": \"2025-02-11T14:30:00Z\",\n \"provision\": {\n \"type\": \"permit\",\n \"period\": {\n \"start\": \"2025-02-11\",\n \"end\": \"2026-02-11\"\n },\n \"actor\": [\n {\n \"role\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n ]\n },\n \"reference\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000057\"\n }\n }\n }\n ]\n },\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/consent-reason\",\n \"code\": \"TBC\",\n \"display\": \"TBC\"\n }\n ]\n }\n },\n {\n \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000057\"\n }\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.regulatoryBasis\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\"\n }\n ]\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",\n \"valueReference\": {}\n }\n ]\n}", "options": { "raw": { "language": "json" @@ -12183,4 +12179,4 @@ "value": "https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4" } ] -} +} \ No newline at end of file From 3ada899ec5da7948d75ced670925f0c4fd93dcb4 Mon Sep 17 00:00:00 2001 From: LeoKHoward <38526889+LeoKHoward@users.noreply.github.com> Date: Mon, 16 Feb 2026 07:32:18 +0000 Subject: [PATCH 10/11] NPA-6153: Update sandbox date --- ...lidated_relationship_service.sandbox.postman_collection.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/postman/validated_relationship_service.sandbox.postman_collection.json b/postman/validated_relationship_service.sandbox.postman_collection.json index a097f271..6ef38394 100644 --- a/postman/validated_relationship_service.sandbox.postman_collection.json +++ b/postman/validated_relationship_service.sandbox.postman_collection.json @@ -1,7 +1,7 @@ { "info": { "_postman_id": "0d8c2f36-9e84-45bc-9f27-861703559c66", - "name": "Validated Relationship Service Sandbox 13/02/26", + "name": "Validated Relationship Service Sandbox 16/02/26", "description": "This Postman collection includes example scenarios for each of the Validated Relationship Service (VRS) API endpoints, covering both valid and invalid request scenarios.\n\nThe collection is pointed towards the VRS sandbox environment, which will return a specific example response based on the request sent. All data shown in the requests or responses is test data.\n\nOur sandbox environment only covers the scenarios listed in the Postman collection and is open access. It does not allow you to test authorisation or any scenarios beyond the ones documented.\n\nFull specification is available at [https://digital.nhs.uk/developer/api-catalogue/validated-relationship-service](https://digital.nhs.uk/developer/api-catalogue/validated-relationship-service)", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", "_exporter_id": "46399153", From 96a94547d799165408e7ac39bb43e386a7062ca0 Mon Sep 17 00:00:00 2001 From: LeoKHoward <38526889+LeoKHoward@users.noreply.github.com> Date: Mon, 16 Feb 2026 14:21:30 +0000 Subject: [PATCH 11/11] NPA-6153: Update postman integration file --- ...ervice.integration.postman_collection.json | 275 ++++++++++++------ 1 file changed, 193 insertions(+), 82 deletions(-) diff --git a/postman/validated_relationship_service.integration.postman_collection.json b/postman/validated_relationship_service.integration.postman_collection.json index 66d8499d..7cdc9e2c 100644 --- a/postman/validated_relationship_service.integration.postman_collection.json +++ b/postman/validated_relationship_service.integration.postman_collection.json @@ -1,11 +1,11 @@ { "info": { - "_postman_id": "c1dd5e2d-9dca-4360-8671-21fd0e6ae3e2", - "name": "Validated Relationship Service - Integration - 12/02/26", + "_postman_id": "f6def898-7acd-41cf-b8c8-8c0b1dd6b7de", + "name": "Validated Relationship Service - Integration - 16/02/26", "description": "## About the collection\n\nThe collection has been organised by API endpoint - you will find a folder for each one.\n\nWithin those endpoints are requests covering success and error response scenarios.\n\nEach request has at least 1 example against it. This shows the expected response for that request. Some requests have multiple examples showing how the response differs when different parameters are provided.\n\n### Authorization types\n\nWhen you send a request to the Validated Relationship Service, your request will first be authorised by the API Management service (APIM).\n\nThe Validated Relationship Service has 3 types of authorization:\n\n- CIS2 - For healthcare practitioners\n- App-restricted - for service-to-service authorization\n- Login - For patient/proxy access via the NHS App\n \n\nEach VRS API endpoint uses a different combination of these auth types depending on their use case.\n\nYou will need to follow the steps in the 'Getting Started' section below to set the correct authorization tokens for each of these types.\n\nPlease see the folder-level docs for each endpoint for details about what auth types are available to use.\n\n## Getting started\n\n### Environment variables\n\nYou will need to add the following environment variables to the collection.\n\n#### `cis2_token`\n\nAuthorization token value for CIS2 (healthcare practitioner access).\n\n_Only required when using endponts that require this auth method._\n\nThis value can be generated by running the `get_cis2_access_token_int.py` script . See more details in the 'How to create a valid Authorization header' section below.\n\n#### `login_token`\n\nAuthorization token value for NHS Login (patient access).\n\n_Only required when using endponts that require this auth method._\n\nThis value can be generated by running the `get_nhs_login_access_token_int.py` script . See more details in the 'How to create a valid Authorization header' section below.\n\n#### `vrs_api_private_key`\n\n**(This is not the same as the private key in the NHS Developer Account portal.)**\n\nAPI private key for the Validated Relationship Service integration application.\n\n_Only required when using endponts that use the app restricted auth method._\n\nThis value can be copied from the /main/vrs-app-credentials-{id} secret in **AWS Secrets Manager** or requested to be sent securely from a member of the VRS team.\n\n#### `nhs_developer_account_api_key`\n\nAPI app key for the Validated Relationship Service integration application.\n\n_Only required when using endponts that use the app restricted auth method._\n\nThis value can be copied from the NHS - Proxy Core Services - Integration environment resource in the NHS Developer Account portal.\n\n#### `consent_app_auth_header_value` (Generated automatically)\n\nAuthorization token value for app restricted auth.\n\n_Only required when using endponts that use the app restricted auth method._\n\n**You do not need to change this value as it is automatically set in the pre-request script.**\n\n#### `tpp_9674998535_access_token`, `tpp_9674998454_access_token`, `emis_9692113698_access_token,` and `emis_9692113612_access_token`\n\nAuthorization token value for connecting to GPIT supplier systems in NAM tests (Get proxy roles only).\n\n_Only required when running the_ `_Get proxy roles (GET/Consent) Valid request - NAM - Get proxy roles_` _requests._\n\nValues for these environment variables can be found on the [Test data page in Confluence](https://nhsd-confluence.digital.nhs.uk/spaces/NPA/pages/950553445/Test+data+and+accounts+repository+-+NPA#TestdataandaccountsrepositoryNPA-GPITtestaccountsforEXT).\n\n### How to create a valid Authorization header\n\n#### Manually through Python scripts (required for Login and CIS2)\n\n##### Pre-requisites\n\nAccess the token generation scripts from the [validated-relationships-service-api repo](https://github.com/NHSDigital/validated-relationships-service-api/tree/master/scripts):\n\n- get_app_access_token_int.py - for app restricted authorization\n- get_cis2_access_token_int.py - for CIS2 authorization\n- get_nhs_login_access_token_int.py - for Login user authorization\n \n\nSee the [README](https://github.com/NHSDigital/validated-relationships-service-api/tree/master/scripts/README.md) for information about how to run them and what environment variables are needed.\n\n##### Steps\n\n1. Generate bearer tokens for each of the above methods using the provided scripts\n2. Go to the Authorization tab for this Postman request\n3. Select 'Bearer token' from the drop-down\n4. Copy just the 'access_request' value from the script output into the Token field. You do **not** need to add the word 'bearer' before the value.\n \n\nTokens expire every 5 minutes. Once expired, you will receive an 'Unauthorised' response from the API endpoints. At this point, a new token will need to be generated by repeating the above steps.\n\n#### Automatically through pre-request script (for App-restricted)\n\nA pre-request script has been added to the endpoints where app-restricted auth can be used to obtain app-restricted tokens automatically. For this to work, you will need to add values for the following environment variables:\n\n- `private_key`\n- `api_key`\n \n\nIf those values are set and valid, then no further action is required.\n\n## Running a request\n\nOnce you have completed the above 'Getting Started' steps you will be able to send requests by either clicking the 'Send' button on each request, or the 'Try' button on each example.\n\nThe pre-prod environments are not constricted to just the requests provided in this collection. Feel free to change and create requests/examples as you require. However, only the test users provided will work in these environments.\n\n## Test data\n\nAll of the requests in the collection use test data and users that have been set up to demonstrate each specific scenario. No sensitive data is stored in this collection.\n\nSee each scenario for information about what test users are being used.", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", "_exporter_id": "46399153", - "_collection_link": "https://www.postman.com/leohoward/workspace/vrsa-10-02-2026/collection/46399153-c1dd5e2d-9dca-4360-8671-21fd0e6ae3e2?action=share&source=collection_link&creator=46399153" + "_collection_link": "https://www.postman.com/leohoward/workspace/vrsa-13-02-2026/collection/46399153-f6def898-7acd-41cf-b8c8-8c0b1dd6b7de?action=share&source=collection_link&creator=46399153" }, "item": [ { @@ -2857,11 +2857,19 @@ } ], "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9736898148&_include=Consent:test", + "raw": "https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9736898148&_include=Consent:test", + "protocol": "https", "host": [ - "{{api_base_url}}" + "int", + "api", + "service", + "nhs", + "uk" ], "path": [ + "validated-relationships", + "FHIR", + "R4", "Consent" ], "query": [ @@ -4703,11 +4711,19 @@ } }, "url": { - "raw": "{{api_base_url}}/QuestionnaireResponse", + "raw": "https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/QuestionnaireResponse", + "protocol": "https", "host": [ - "{{api_base_url}}" + "int", + "api", + "service", + "nhs", + "uk" ], "path": [ + "validated-relationships", + "FHIR", + "R4", "QuestionnaireResponse" ] } @@ -5425,11 +5441,19 @@ } ], "url": { - "raw": "{{api_base_url}}/QuestionnaireResponse/:access_request_id", + "raw": "https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/QuestionnaireResponse/:access_request_id", + "protocol": "https", "host": [ - "{{api_base_url}}" + "int", + "api", + "service", + "nhs", + "uk" ], "path": [ + "validated-relationships", + "FHIR", + "R4", "QuestionnaireResponse", ":access_request_id" ], @@ -5776,7 +5800,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"resourceType\": \"Consent\",\n \"status\": \"active\",\n \"scope\": {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\"\n }\n ]\n },\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",\n \"code\": \"INFA\",\n \"display\": \"information access\"\n }\n ]\n }\n ],\n \"patient\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"dateTime\": \"2026-02-09T13:50:10.090Z\",\n \"provision\": {\n \"period\": {\n \"start\": \"2025-12-02\",\n \"end\": \"2030-11-23\"\n },\n \"actor\": [\n {\n \"role\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\"\n }\n ]\n },\n \"reference\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n }\n ]\n },\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created\"\n }\n ]\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.regulatoryBasis\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\"\n }\n ]\n }\n },\n {\n \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"G8101234\"\n }\n }\n }\n ]\n}", + "raw": "{\n\t\"resourceType\": \"Consent\",\n\t\"status\": \"active\",\n\t\"scope\": {\n\t\t\"coding\": [\n\t\t\t{\n\t\t\t\t\"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",\n\t\t\t\t\"code\": \"patient-privacy\",\n\t\t\t\t\"display\": \"Privacy Consent\"\n\t\t\t}\n\t\t]\n\t},\n\t\"category\": [\n\t\t{\n\t\t\t\"coding\": [\n\t\t\t\t{\n\t\t\t\t\t\"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",\n\t\t\t\t\t\"code\": \"INFA\",\n\t\t\t\t\t\"display\": \"information access\"\n\t\t\t\t}\n\t\t\t]\n\t\t}\n\t],\n\t\"patient\": {\n\t\t\"type\": \"Patient\",\n\t\t\"identifier\": {\n\t\t\t\"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n\t\t\t\"value\": \"9736898717\"\n\t\t}\n\t},\n\t\"dateTime\": \"2026-02-09T13:50:10.090Z\",\n\t\"provision\": {\n\t\t\"period\": {\n\t\t\t\"start\": \"2025-12-02\",\n\t\t\t\"end\": \"2030-11-23\"\n\t\t},\n\t\t\"actor\": [\n\t\t\t{\n\t\t\t\t\"role\": {\n\t\t\t\t\t\"coding\": [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",\n\t\t\t\t\t\t\t\"code\": \"parental-responsibility\",\n\t\t\t\t\t\t\t\"display\": \"Parental responsibility\"\n\t\t\t\t\t\t}\n\t\t\t\t\t]\n\t\t\t\t},\n\t\t\t\t\"reference\": {\n\t\t\t\t\t\"type\": \"RelatedPerson\",\n\t\t\t\t\t\"identifier\": {\n\t\t\t\t\t\t\"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n\t\t\t\t\t\t\"value\": \"9736898148\"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t]\n\t},\n\t\"extension\": [\n\t\t{\n\t\t\t\"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",\n\t\t\t\"valueCodeableConcept\": {\n\t\t\t\t\"coding\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",\n\t\t\t\t\t\t\"code\": \"ROLE_CREATED\",\n\t\t\t\t\t\t\"display\": \"Role created\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n\t\t\t\"valueReference\": {\n\t\t\t\t\"identifier\": {\n\t\t\t\t\t\"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n\t\t\t\t\t\"value\": \"9736898148\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",\n\t\t\t\"valueReference\": {\n\t\t\t\t\"identifier\": {\n\t\t\t\t\t\"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n\t\t\t\t\t\"value\": \"G8101234\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.regulatoryBasis\",\n\t\t\t\"valueCodeableConcept\": {\n\t\t\t\t\"coding\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",\n\t\t\t\t\t\t\"code\": \"parental-responsibility\",\n\t\t\t\t\t\t\"display\": \"Parental responsibility\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t}\n\t\t}\n\t]\n}", "options": { "raw": { "language": "json" @@ -5818,7 +5842,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"resourceType\": \"Consent\",\n \"status\": \"active\",\n \"scope\": {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\"\n }\n ]\n },\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",\n \"code\": \"INFA\",\n \"display\": \"information access\"\n }\n ]\n }\n ],\n \"patient\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"dateTime\": \"2026-02-09T13:50:10.090Z\",\n \"provision\": {\n \"period\": {\n \"start\": \"2025-12-02\",\n \"end\": \"2030-11-23\"\n },\n \"actor\": [\n {\n \"role\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\"\n }\n ]\n },\n \"reference\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n }\n ]\n },\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created\"\n }\n ]\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.regulatoryBasis\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\"\n }\n ]\n }\n },\n {\n \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"G8101234\"\n }\n }\n }\n ]\n}", + "raw": "{\n\t\"resourceType\": \"Consent\",\n\t\"status\": \"active\",\n\t\"scope\": {\n\t\t\"coding\": [\n\t\t\t{\n\t\t\t\t\"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",\n\t\t\t\t\"code\": \"patient-privacy\",\n\t\t\t\t\"display\": \"Privacy Consent\"\n\t\t\t}\n\t\t]\n\t},\n\t\"category\": [\n\t\t{\n\t\t\t\"coding\": [\n\t\t\t\t{\n\t\t\t\t\t\"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",\n\t\t\t\t\t\"code\": \"INFA\",\n\t\t\t\t\t\"display\": \"information access\"\n\t\t\t\t}\n\t\t\t]\n\t\t}\n\t],\n\t\"patient\": {\n\t\t\"type\": \"Patient\",\n\t\t\"identifier\": {\n\t\t\t\"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n\t\t\t\"value\": \"9736898717\"\n\t\t}\n\t},\n\t\"dateTime\": \"2026-02-09T13:50:10.090Z\",\n\t\"provision\": {\n\t\t\"period\": {\n\t\t\t\"start\": \"2025-12-02\",\n\t\t\t\"end\": \"2030-11-23\"\n\t\t},\n\t\t\"actor\": [\n\t\t\t{\n\t\t\t\t\"role\": {\n\t\t\t\t\t\"coding\": [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",\n\t\t\t\t\t\t\t\"code\": \"parental-responsibility\",\n\t\t\t\t\t\t\t\"display\": \"Parental responsibility\"\n\t\t\t\t\t\t}\n\t\t\t\t\t]\n\t\t\t\t},\n\t\t\t\t\"reference\": {\n\t\t\t\t\t\"type\": \"RelatedPerson\",\n\t\t\t\t\t\"identifier\": {\n\t\t\t\t\t\t\"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n\t\t\t\t\t\t\"value\": \"9736898148\"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t]\n\t},\n\t\"extension\": [\n\t\t{\n\t\t\t\"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",\n\t\t\t\"valueCodeableConcept\": {\n\t\t\t\t\"coding\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",\n\t\t\t\t\t\t\"code\": \"ROLE_CREATED\",\n\t\t\t\t\t\t\"display\": \"Role created\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n\t\t\t\"valueReference\": {\n\t\t\t\t\"identifier\": {\n\t\t\t\t\t\"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n\t\t\t\t\t\"value\": \"9736898148\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",\n\t\t\t\"valueReference\": {\n\t\t\t\t\"identifier\": {\n\t\t\t\t\t\"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n\t\t\t\t\t\"value\": \"G8101234\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",\n\t\t\t\"valueCodeableConcept\": {\n\t\t\t\t\"coding\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",\n\t\t\t\t\t\t\"code\": \"ROLE_CREATED\",\n\t\t\t\t\t\t\"display\": \"Role created\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t}\n\t\t}\n\t]\n}", "options": { "raw": { "language": "json" @@ -5918,7 +5942,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"resourceType\": \"Consent\",\n \"status\": \"active\",\n \"scope\": {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\"\n }\n ]\n },\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",\n \"code\": \"INFA\",\n \"display\": \"information access\"\n }\n ]\n }\n ],\n \"patient\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898202\"\n }\n },\n \"dateTime\": \"{{$isoTimestamp}}\",\n \"provision\": {\n \"period\": {\n \"start\": \"2025-12-02\",\n \"end\": \"2030-11-23\"\n },\n \"actor\": [\n {\n \"role\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\"\n }\n ]\n },\n \"reference\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898164\"\n }\n }\n }\n ]\n },\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created\"\n }\n ]\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.regulatoryBasis\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\"\n }\n ]\n }\n },\n {\n \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898164\"\n }\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"G8101234\"\n }\n }\n }\n ]\n}", + "raw": "{\n\t\"resourceType\": \"Consent\",\n\t\"status\": \"active\",\n\t\"scope\": {\n\t\t\"coding\": [\n\t\t\t{\n\t\t\t\t\"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",\n\t\t\t\t\"code\": \"patient-privacy\",\n\t\t\t\t\"display\": \"Privacy Consent\"\n\t\t\t}\n\t\t]\n\t},\n\t\"category\": [\n\t\t{\n\t\t\t\"coding\": [\n\t\t\t\t{\n\t\t\t\t\t\"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",\n\t\t\t\t\t\"code\": \"INFA\",\n\t\t\t\t\t\"display\": \"information access\"\n\t\t\t\t}\n\t\t\t]\n\t\t}\n\t],\n\t\"patient\": {\n\t\t\"type\": \"Patient\",\n\t\t\"identifier\": {\n\t\t\t\"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n\t\t\t\"value\": \"9736898202\"\n\t\t}\n\t},\n\t\"dateTime\": \"{{$isoTimestamp}}\",\n\t\"provision\": {\n\t\t\"period\": {\n\t\t\t\"start\": \"2025-12-02\",\n\t\t\t\"end\": \"2030-11-23\"\n\t\t},\n\t\t\"actor\": [\n\t\t\t{\n\t\t\t\t\"role\": {\n\t\t\t\t\t\"coding\": [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",\n\t\t\t\t\t\t\t\"code\": \"parental-responsibility\",\n\t\t\t\t\t\t\t\"display\": \"Parental responsibility\"\n\t\t\t\t\t\t}\n\t\t\t\t\t]\n\t\t\t\t},\n\t\t\t\t\"reference\": {\n\t\t\t\t\t\"type\": \"RelatedPerson\",\n\t\t\t\t\t\"identifier\": {\n\t\t\t\t\t\t\"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n\t\t\t\t\t\t\"value\": \"9736898164\"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t]\n\t},\n\t\"extension\": [\n\t\t{\n\t\t\t\"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",\n\t\t\t\"valueCodeableConcept\": {\n\t\t\t\t\"coding\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",\n\t\t\t\t\t\t\"code\": \"ROLE_CREATED\",\n\t\t\t\t\t\t\"display\": \"Role created\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.regulatoryBasis\",\n\t\t\t\"valueCodeableConcept\": {\n\t\t\t\t\"coding\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"system\": \"https://terminology.hl7.org/CodeSystem/v3-NullFlavor\",\n\t\t\t\t\t\t\"code\": \"UNK\",\n\t\t\t\t\t\t\"display\": \"Unknown\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n\t\t\t\"valueReference\": {\n\t\t\t\t\"identifier\": {\n\t\t\t\t\t\"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n\t\t\t\t\t\"value\": \"9736898164\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",\n\t\t\t\"valueReference\": {\n\t\t\t\t\"identifier\": {\n\t\t\t\t\t\"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n\t\t\t\t\t\"value\": \"G8101234\"\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t]\n}", "options": { "raw": { "language": "json" @@ -6022,7 +6046,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"resourceType\": \"Consent\",\n \"status\": \"active\",\n \"scope\": {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\"\n }\n ]\n },\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",\n \"code\": \"INFA\",\n \"display\": \"information access\"\n }\n ]\n }\n ],\n \"patient\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"dateTime\": \"{{$isoTimestamp}}\",\n \"provision\": {\n \"period\": {\n \"start\": \"2025-12-02\",\n \"end\": \"2030-11-23\"\n },\n \"actor\": [\n {\n \"role\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\"\n }\n ]\n },\n \"reference\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n }\n ]\n },\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created\"\n }\n ]\n }\n }\n ]\n}\n", + "raw": "{\n \"resourceType\": \"Consent\",\n \"status\": \"active\",\n \"scope\": {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\"\n }\n ]\n },\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",\n \"code\": \"INFA\",\n \"display\": \"information access\"\n }\n ]\n }\n ],\n \"patient\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"dateTime\": \"{{$isoTimestamp}}\",\n \"provision\": {\n \"period\": {\n \"start\": \"2025-12-02\",\n \"end\": \"2030-11-23\"\n },\n \"actor\": [\n {\n \"role\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\"\n }\n ]\n },\n \"reference\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n }\n ]\n },\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created\"\n }\n ]\n }\n },\n\t\t{\n \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n },\n\t\t{\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"G8101234\"\n }\n }\n },\n {\n \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.regulatoryBasis\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-NullFlavor\",\n \"code\": \"UNK\",\n \"display\": \"Unknown\"\n }\n ]\n }\n }\n ]\n}\n", "options": { "raw": { "language": "json" @@ -6064,7 +6088,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"resourceType\": \"Consent\",\n \"status\": \"active\",\n \"scope\": {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\"\n }\n ]\n },\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",\n \"code\": \"INFA\",\n \"display\": \"information access\"\n }\n ]\n }\n ],\n \"patient\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"dateTime\": \"{{$isoTimestamp}}\",\n \"provision\": {\n \"period\": {\n \"start\": \"2025-12-02\",\n \"end\": \"2030-11-23\"\n },\n \"actor\": [\n {\n \"reference\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n }\n ]\n },\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created\"\n }\n ]\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.regulatoryBasis\",\n \"valueCodeableConcept\": {\n \"coding\":[\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\"\n\n }\n ]\n }\n }\n ]\n}\n", + "raw": "{\n \"resourceType\": \"Consent\",\n \"status\": \"active\",\n \"scope\": {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\"\n }\n ]\n },\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",\n \"code\": \"INFA\",\n \"display\": \"information access\"\n }\n ]\n }\n ],\n \"patient\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"dateTime\": \"{{$isoTimestamp}}\",\n \"provision\": {\n \"period\": {\n \"start\": \"2025-12-02\",\n \"end\": \"2030-11-23\"\n },\n \"actor\": [\n {\n \"role\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\"\n }\n ]\n },\n \"reference\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n }\n ]\n },\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created\"\n }\n ]\n }\n },\n\t\t{\n \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n },\n\t\t{\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"G8101234\"\n }\n }\n },\n {\n \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.regulatoryBasis\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-NullFlavor\",\n \"code\": \"UNK\",\n \"display\": \"Unknown\"\n }\n ]\n }\n }\n ]\n}\n", "options": { "raw": { "language": "json" @@ -6072,11 +6096,19 @@ } }, "url": { - "raw": "{{api_base_url}}/Consent", + "raw": "https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent", + "protocol": "https", "host": [ - "{{api_base_url}}" + "int", + "api", + "service", + "nhs", + "uk" ], "path": [ + "validated-relationships", + "FHIR", + "R4", "Consent" ] } @@ -6195,7 +6227,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"resourceType\": \"Consent\",\n \"status\": \"active\",\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\",\n \"code\": \"INFA\",\n \"display\": \"information access\"\n }\n ]\n }\n ],\n \"patient\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"dateTime\": \"{{$isoTimestamp}}\",\n \"provision\": {\n \"period\": {\n \"start\": \"2025-11-23\",\n \"end\": \"2030-11-23\"\n },\n \"actor\": [\n {\n \"role\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"MTH\",\n \"display\": \"Mother\"\n }\n ]\n },\n \"reference\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n }\n ]\n },\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/consent-reason\",\n \"code\": \"TBC\",\n \"display\": \"TBC\"\n }\n ]\n }\n }\n ]\n}", + "raw": "{\n \"resourceType\": \"Consent\",\n \"status\": \"active\",\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\",\n \"code\": \"INFA\",\n \"display\": \"information access\"\n }\n ]\n }\n ],\n \"patient\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"dateTime\": \"2026-02-16T08:13:06.480Z\",\n \"provision\": {\n \"period\": {\n \"start\": \"2025-11-23\",\n \"end\": \"2030-11-23\"\n },\n \"actor\": [\n {\n \"role\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"MTH\",\n \"display\": \"Mother\"\n }\n ]\n },\n \"reference\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n }\n ]\n },\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/consent-reason\",\n \"code\": \"TBC\",\n \"display\": \"TBC\"\n }\n ]\n }\n }\n ]\n}", "options": { "raw": { "language": "json" @@ -6203,11 +6235,19 @@ } }, "url": { - "raw": "{{api_base_url}}/Consent", + "raw": "https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent", + "protocol": "https", "host": [ - "{{api_base_url}}" + "int", + "api", + "service", + "nhs", + "uk" ], "path": [ + "validated-relationships", + "FHIR", + "R4", "Consent" ] } @@ -6285,7 +6325,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"resourceType\": \"Consent\",\n \"status\": \"invalid\",\n \"scope\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\",\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\"\n }\n ]\n },\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\",\n \"code\": \"INFA\",\n \"display\": \"information access\"\n }\n ]\n }\n ],\n \"patient\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"dateTime\": \"{{$isoTimestamp}}\",\n \"provision\": {\n \"period\": {\n \"start\": \"2025-11-23\",\n \"end\": \"2030-11-23\"\n },\n \"actor\": [\n {\n \"role\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"MTH\",\n \"display\": \"Mother\"\n }\n ]\n },\n \"reference\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n }\n ]\n },\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/consent-reason\",\n \"code\": \"TBC\",\n \"display\": \"TBC\"\n }\n ]\n }\n }\n ]\n}", + "raw": "{\n\t\"resourceType\": \"Consent\",\n\t\"status\": \"invalid\",\n\t\"scope\": {\n\t\t\"coding\": [\n\t\t\t{\n\t\t\t\t\"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\",\n\t\t\t\t\"code\": \"patient-privacy\",\n\t\t\t\t\"display\": \"Privacy Consent\"\n\t\t\t}\n\t\t]\n\t},\n\t\"category\": [\n\t\t{\n\t\t\t\"coding\": [\n\t\t\t\t{\n\t\t\t\t\t\"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\",\n\t\t\t\t\t\"code\": \"INFA\",\n\t\t\t\t\t\"display\": \"information access\"\n\t\t\t\t}\n\t\t\t]\n\t\t}\n\t],\n\t\"patient\": {\n\t\t\"type\": \"Patient\",\n\t\t\"identifier\": {\n\t\t\t\"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n\t\t\t\"value\": \"9736898717\"\n\t\t}\n\t},\n\t\"dateTime\": \"{{$isoTimestamp}}\",\n\t\"provision\": {\n\t\t\"period\": {\n\t\t\t\"start\": \"2025-11-23\",\n\t\t\t\"end\": \"2030-11-23\"\n\t\t},\n\t\t\"actor\": [\n\t\t\t{\n\t\t\t\t\"role\": {\n\t\t\t\t\t\"coding\": [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n\t\t\t\t\t\t\t\"code\": \"MTH\",\n\t\t\t\t\t\t\t\"display\": \"Mother\"\n\t\t\t\t\t\t}\n\t\t\t\t\t]\n\t\t\t\t},\n\t\t\t\t\"reference\": {\n\t\t\t\t\t\"type\": \"RelatedPerson\",\n\t\t\t\t\t\"identifier\": {\n\t\t\t\t\t\t\"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n\t\t\t\t\t\t\"value\": \"9736898148\"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t]\n\t},\n\t\"extension\": [\n\t\t{\n\t\t\t\"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n\t\t\t\"valueCodeableConcept\": {\n\t\t\t\t\"coding\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"system\": \"http://terminology.hl7.org/CodeSystem/consent-reason\",\n\t\t\t\t\t\t\"code\": \"TBC\",\n\t\t\t\t\t\t\"display\": \"TBC\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n\t\t\t\"valueReference\": {\n\t\t\t\t\"identifier\": {\n\t\t\t\t\t\"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n\t\t\t\t\t\"value\": \"9736898148\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.regulatoryBasis\",\n\t\t\t\"valueCodeableConcept\": {\n\t\t\t\t\"coding\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",\n\t\t\t\t\t\t\"code\": \"parental-responsibility\",\n\t\t\t\t\t\t\"display\": \"Parental responsibility\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",\n\t\t\t\"valueReference\": {\n\t\t\t\t\"identifier\": {\n\t\t\t\t\t\"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n\t\t\t\t\t\"value\": \"G8101234\"\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t]\n}", "options": { "raw": { "language": "json" @@ -6326,7 +6366,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"resourceType\": \"Consent\",\n \"status\": \"invalid\",\n \"scope\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\",\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\"\n }\n ]\n },\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\",\n \"code\": \"INFA\",\n \"display\": \"information access\"\n }\n ]\n }\n ],\n \"patient\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"dateTime\": \"{{$isoTimestamp}}\",\n \"provision\": {\n \"period\": {\n \"start\": \"2025-11-23\",\n \"end\": \"2030-11-23\"\n },\n \"actor\": [\n {\n \"role\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"MTH\",\n \"display\": \"Mother\"\n }\n ]\n },\n \"reference\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n }\n ]\n },\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/consent-reason\",\n \"code\": \"TBC\",\n \"display\": \"TBC\"\n }\n ]\n }\n }\n ]\n}", + "raw": "{\n \"resourceType\": \"Consent\",\n \"status\": \"invalid\",\n \"scope\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\",\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\"\n }\n ]\n },\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\",\n \"code\": \"INFA\",\n \"display\": \"information access\"\n }\n ]\n }\n ],\n \"patient\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"dateTime\": \"{{$isoTimestamp}}\",\n \"provision\": {\n \"period\": {\n \"start\": \"2025-11-23\",\n \"end\": \"2030-11-23\"\n },\n \"actor\": [\n {\n \"role\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"MTH\",\n \"display\": \"Mother\"\n }\n ]\n },\n \"reference\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n }\n ]\n },\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/consent-reason\",\n \"code\": \"TBC\",\n \"display\": \"TBC\"\n }\n ]\n }\n },\n {\n \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.regulatoryBasis\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\"\n }\n ]\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"G8101234\"\n }\n }\n }\n ]\n}", "options": { "raw": { "language": "json" @@ -6334,11 +6374,19 @@ } }, "url": { - "raw": "{{api_base_url}}/Consent", + "raw": "https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent", + "protocol": "https", "host": [ - "{{api_base_url}}" + "int", + "api", + "service", + "nhs", + "uk" ], "path": [ + "validated-relationships", + "FHIR", + "R4", "Consent" ] } @@ -6403,8 +6451,7 @@ "" ], "type": "text/javascript", - "packages": {}, - "requests": {} + "packages": {} } } ], @@ -6439,7 +6486,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"resourceType\": \"Consent\",\n \"status\": \"active\",\n \"scope\": {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\"\n }\n ],\n \"text\": \"Patient Privacy Consent\"\n },\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",\n \"code\": \"INFA\",\n \"display\": \"Information Access\"\n }\n ],\n \"text\": \"Information Access Consent\"\n }\n ],\n \"patient\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"dateTime\": \"2026-01-12T15:09:49.458Z\",\n \"provision\": {\n \"period\": {\n \"start\": \"2025-12-02\",\n \"end\": \"2030-11-23\"\n },\n \"actor\": [\n {\n \"role\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\"\n }\n ]\n },\n \"reference\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n }\n ]\n },\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",\n \"code\": \"OTHER\",\n \"display\": \"Other reason\"\n }\n ]\n }\n }\n ]\n}\n", + "raw": "{\n\t\"resourceType\": \"Consent\",\n\t\"status\": \"active\",\n\t\"scope\": {\n\t\t\"coding\": [\n\t\t\t{\n\t\t\t\t\"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",\n\t\t\t\t\"code\": \"patient-privacy\",\n\t\t\t\t\"display\": \"Privacy Consent\"\n\t\t\t}\n\t\t],\n\t\t\"text\": \"Patient Privacy Consent\"\n\t},\n\t\"category\": [\n\t\t{\n\t\t\t\"coding\": [\n\t\t\t\t{\n\t\t\t\t\t\"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",\n\t\t\t\t\t\"code\": \"INFA\",\n\t\t\t\t\t\"display\": \"Information Access\"\n\t\t\t\t}\n\t\t\t],\n\t\t\t\"text\": \"Information Access Consent\"\n\t\t}\n\t],\n\t\"patient\": {\n\t\t\"type\": \"Patient\",\n\t\t\"identifier\": {\n\t\t\t\"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n\t\t\t\"value\": \"9736898717\"\n\t\t}\n\t},\n\t\"dateTime\": \"2026-01-12T15:09:49.458Z\",\n\t\"provision\": {\n\t\t\"period\": {\n\t\t\t\"start\": \"2025-12-02\",\n\t\t\t\"end\": \"2030-11-23\"\n\t\t},\n\t\t\"actor\": [\n\t\t\t{\n\t\t\t\t\"role\": {\n\t\t\t\t\t\"coding\": [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",\n\t\t\t\t\t\t\t\"code\": \"parental-responsibility\",\n\t\t\t\t\t\t\t\"display\": \"Parental responsibility\"\n\t\t\t\t\t\t}\n\t\t\t\t\t]\n\t\t\t\t},\n\t\t\t\t\"reference\": {\n\t\t\t\t\t\"type\": \"RelatedPerson\",\n\t\t\t\t\t\"identifier\": {\n\t\t\t\t\t\t\"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n\t\t\t\t\t\t\"value\": \"9736898148\"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t]\n\t},\n\t\"extension\": [\n\t\t{\n\t\t\t\"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",\n\t\t\t\"valueCodeableConcept\": {\n\t\t\t\t\"coding\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",\n\t\t\t\t\t\t\"code\": \"OTHER\",\n\t\t\t\t\t\t\"display\": \"Other reason\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n\t\t\t\"valueReference\": {\n\t\t\t\t\"identifier\": {\n\t\t\t\t\t\"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n\t\t\t\t\t\"value\": \"9736898148\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.regulatoryBasis\",\n\t\t\t\"valueCodeableConcept\": {\n\t\t\t\t\"coding\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",\n\t\t\t\t\t\t\"code\": \"parental-responsibility\",\n\t\t\t\t\t\t\"display\": \"Parental responsibility\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",\n\t\t\t\"valueReference\": {\n\t\t\t\t\"identifier\": {\n\t\t\t\t\t\"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n\t\t\t\t\t\"value\": \"G8101234\"\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t]\n}", "options": { "raw": { "language": "json" @@ -6465,12 +6512,12 @@ "header": [ { "key": "X-Request-ID", - "value": "{{$guid}}", + "value": "22f85b02-35ff-475f-808f-e0fb2bc93393", "type": "text" }, { "key": "X-Correlation-ID", - "value": "{{$guid}}", + "value": "860406c9-ef53-4fed-939c-b6efbe8106f7", "type": "text" }, { @@ -6481,7 +6528,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"resourceType\": \"Consent\",\n \"status\": \"active\",\n \"scope\": {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\"\n }\n ],\n \"text\": \"Patient Privacy Consent\"\n },\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",\n \"code\": \"INFA\",\n \"display\": \"Information Access\"\n }\n ],\n \"text\": \"Information Access Consent\"\n }\n ],\n \"patient\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"dateTime\": \"2026-01-12T15:09:49.458Z\",\n \"provision\": {\n \"period\": {\n \"start\": \"2025-12-02\",\n \"end\": \"2030-11-23\"\n },\n \"actor\": [\n {\n \"reference\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n }\n ]\n },\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",\n \"code\": \"OTHER\",\n \"display\": \"Other reason\"\n }\n ]\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.regulatoryBasis\",\n \"valueCodeableConcept\": {\n \"coding\":[\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\"\n\n }\n ]\n }\n }\n ]\n}\n", + "raw": "{\n \"resourceType\": \"Consent\",\n \"status\": \"active\",\n \"scope\": {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\"\n }\n ],\n \"text\": \"Patient Privacy Consent\"\n },\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",\n \"code\": \"INFA\",\n \"display\": \"Information Access\"\n }\n ],\n \"text\": \"Information Access Consent\"\n }\n ],\n \"patient\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"dateTime\": \"2026-01-12T15:09:49.458Z\",\n \"provision\": {\n \"period\": {\n \"start\": \"2025-12-02\",\n \"end\": \"2030-11-23\"\n },\n \"actor\": [\n {\n \"role\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\"\n }\n ]\n },\n \"reference\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n }\n ]\n },\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",\n \"code\": \"OTHER\",\n \"display\": \"Other reason\"\n }\n ]\n }\n },\n {\n \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.regulatoryBasis\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\"\n }\n ]\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"G8101234\"\n }\n }\n }\n ]\n}", "options": { "raw": { "language": "json" @@ -6489,11 +6536,19 @@ } }, "url": { - "raw": "{{api_base_url}}/Consent", + "raw": "https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent", + "protocol": "https", "host": [ - "{{api_base_url}}" + "int", + "api", + "service", + "nhs", + "uk" ], "path": [ + "validated-relationships", + "FHIR", + "R4", "Consent" ] } @@ -6593,7 +6648,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"resourceType\": \"Consent\",\n \"status\": \"active\",\n \"scope\": {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\"\n }\n ],\n \"text\": \"Patient Privacy Consent\"\n },\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",\n \"code\": \"INFA\",\n \"display\": \"Information Access\"\n }\n ],\n \"text\": \"Information Access Consent\"\n }\n ],\n \"patient\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"dateTime\": \"2026-01-12T15:09:49.458Z\",\n \"provision\": {\n \"period\": {\n \"start\": \"2025-12-02\",\n \"end\": \"2030-11-23\"\n },\n \"actor\": [\n {\n \"role\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\"\n }\n ]\n },\n \"reference\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n }\n ]\n },\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",\n \"code\": \"OTHER\",\n \"display\": \"Other reason\"\n }\n ]\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.regulatoryBasis\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\"\n }\n ]\n }\n },\n {\n \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n }\n ]\n}", + "raw": "{\n\t\"resourceType\": \"Consent\",\n\t\"status\": \"active\",\n\t\"scope\": {\n\t\t\"coding\": [\n\t\t\t{\n\t\t\t\t\"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",\n\t\t\t\t\"code\": \"patient-privacy\",\n\t\t\t\t\"display\": \"Privacy Consent\"\n\t\t\t}\n\t\t]\n\t},\n\t\"category\": [\n\t\t{\n\t\t\t\"coding\": [\n\t\t\t\t{\n\t\t\t\t\t\"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",\n\t\t\t\t\t\"code\": \"INFA\",\n\t\t\t\t\t\"display\": \"information access\"\n\t\t\t\t}\n\t\t\t]\n\t\t}\n\t],\n\t\"patient\": {\n\t\t\"type\": \"Patient\",\n\t\t\"identifier\": {\n\t\t\t\"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n\t\t\t\"value\": \"9736898717\"\n\t\t}\n\t},\n\t\"dateTime\": \"2026-02-09T13:50:10.090Z\",\n\t\"provision\": {\n\t\t\"period\": {\n\t\t\t\"start\": \"2025-12-02\",\n\t\t\t\"end\": \"2030-11-23\"\n\t\t},\n\t\t\"actor\": [\n\t\t\t{\n\t\t\t\t\"role\": {\n\t\t\t\t\t\"coding\": [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",\n\t\t\t\t\t\t\t\"code\": \"parental-responsibility\",\n\t\t\t\t\t\t\t\"display\": \"Parental responsibility\"\n\t\t\t\t\t\t}\n\t\t\t\t\t]\n\t\t\t\t},\n\t\t\t\t\"reference\": {\n\t\t\t\t\t\"type\": \"RelatedPerson\",\n\t\t\t\t\t\"identifier\": {\n\t\t\t\t\t\t\"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n\t\t\t\t\t\t\"value\": \"9736898148\"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t]\n\t},\n\t\"extension\": [\n\t\t{\n\t\t\t\"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",\n\t\t\t\"valueCodeableConcept\": {\n\t\t\t\t\"coding\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",\n\t\t\t\t\t\t\"code\": \"ROLE_CREATED\",\n\t\t\t\t\t\t\"display\": \"Role created\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n\t\t\t\"valueReference\": {\n\t\t\t\t\"identifier\": {\n\t\t\t\t\t\"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n\t\t\t\t\t\"value\": \"9736898148\"\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t]\n}", "options": { "raw": { "language": "json" @@ -6635,7 +6690,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"resourceType\": \"Consent\",\n \"status\": \"active\",\n \"scope\": {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\"\n }\n ]\n },\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",\n \"code\": \"INFA\",\n \"display\": \"information access\"\n }\n ]\n }\n ],\n \"patient\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"dateTime\": \"{{$isoTimestamp}}\",\n \"provision\": {\n \"period\": {\n \"start\": \"2025-12-02\",\n \"end\": \"2030-11-23\"\n },\n \"actor\": [\n {\n \"role\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\"\n }\n ]\n },\n \"reference\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n }\n ]\n },\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created\"\n }\n ]\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.regulatoryBasis\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\"\n }\n ]\n }\n },\n {\n \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n }\n ]\n}", + "raw": "{\n\t\"resourceType\": \"Consent\",\n\t\"status\": \"active\",\n\t\"scope\": {\n\t\t\"coding\": [\n\t\t\t{\n\t\t\t\t\"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",\n\t\t\t\t\"code\": \"patient-privacy\",\n\t\t\t\t\"display\": \"Privacy Consent\"\n\t\t\t}\n\t\t]\n\t},\n\t\"category\": [\n\t\t{\n\t\t\t\"coding\": [\n\t\t\t\t{\n\t\t\t\t\t\"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",\n\t\t\t\t\t\"code\": \"INFA\",\n\t\t\t\t\t\"display\": \"information access\"\n\t\t\t\t}\n\t\t\t]\n\t\t}\n\t],\n\t\"patient\": {\n\t\t\"type\": \"Patient\",\n\t\t\"identifier\": {\n\t\t\t\"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n\t\t\t\"value\": \"9736898717\"\n\t\t}\n\t},\n\t\"dateTime\": \"2026-02-09T13:50:10.090Z\",\n\t\"provision\": {\n\t\t\"period\": {\n\t\t\t\"start\": \"2025-12-02\",\n\t\t\t\"end\": \"2030-11-23\"\n\t\t},\n\t\t\"actor\": [\n\t\t\t{\n\t\t\t\t\"role\": {\n\t\t\t\t\t\"coding\": [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",\n\t\t\t\t\t\t\t\"code\": \"parental-responsibility\",\n\t\t\t\t\t\t\t\"display\": \"Parental responsibility\"\n\t\t\t\t\t\t}\n\t\t\t\t\t]\n\t\t\t\t},\n\t\t\t\t\"reference\": {\n\t\t\t\t\t\"type\": \"RelatedPerson\",\n\t\t\t\t\t\"identifier\": {\n\t\t\t\t\t\t\"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n\t\t\t\t\t\t\"value\": \"9736898148\"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t]\n\t},\n\t\"extension\": [\n\t\t{\n\t\t\t\"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",\n\t\t\t\"valueCodeableConcept\": {\n\t\t\t\t\"coding\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",\n\t\t\t\t\t\t\"code\": \"ROLE_CREATED\",\n\t\t\t\t\t\t\"display\": \"Role created\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n\t\t\t\"valueReference\": {\n\t\t\t\t\"identifier\": {\n\t\t\t\t\t\"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n\t\t\t\t\t\"value\": \"9736898148\"\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t]\n}", "options": { "raw": { "language": "json" @@ -6747,7 +6802,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"resourceType\": \"Consent\",\n \"status\": \"active\",\n \"scope\": {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\"\n }\n ],\n \"text\": \"Patient Privacy Consent\"\n },\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",\n \"code\": \"INFA\",\n \"display\": \"Information Access\"\n }\n ],\n \"text\": \"Information Access Consent\"\n }\n ],\n \"patient\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"dateTime\": \"2026-01-12T15:09:49.458Z\",\n \"provision\": {\n \"period\": {\n \"start\": \"2025-12-02\",\n \"end\": \"2030-11-23\"\n },\n \"actor\": [\n {\n \"role\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\"\n }\n ]\n },\n \"reference\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n }\n ]\n },\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",\n \"code\": \"OTHER\",\n \"display\": \"Other reason\"\n }\n ]\n }\n },\n {\n \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\"\n \n }\n ]\n}", + "raw": "{\n\t\"resourceType\": \"Consent\",\n\t\"status\": \"active\",\n\t\"scope\": {\n\t\t\"coding\": [\n\t\t\t{\n\t\t\t\t\"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",\n\t\t\t\t\"code\": \"patient-privacy\",\n\t\t\t\t\"display\": \"Privacy Consent\"\n\t\t\t}\n\t\t]\n\t},\n\t\"category\": [\n\t\t{\n\t\t\t\"coding\": [\n\t\t\t\t{\n\t\t\t\t\t\"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",\n\t\t\t\t\t\"code\": \"INFA\",\n\t\t\t\t\t\"display\": \"information access\"\n\t\t\t\t}\n\t\t\t]\n\t\t}\n\t],\n\t\"patient\": {\n\t\t\"type\": \"Patient\",\n\t\t\"identifier\": {\n\t\t\t\"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n\t\t\t\"value\": \"9736898717\"\n\t\t}\n\t},\n\t\"dateTime\": \"2026-02-09T13:50:10.090Z\",\n\t\"provision\": {\n\t\t\"period\": {\n\t\t\t\"start\": \"2025-12-02\",\n\t\t\t\"end\": \"2030-11-23\"\n\t\t},\n\t\t\"actor\": [\n\t\t\t{\n\t\t\t\t\"role\": {\n\t\t\t\t\t\"coding\": [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",\n\t\t\t\t\t\t\t\"code\": \"parental-responsibility\",\n\t\t\t\t\t\t\t\"display\": \"Parental responsibility\"\n\t\t\t\t\t\t}\n\t\t\t\t\t]\n\t\t\t\t},\n\t\t\t\t\"reference\": {\n\t\t\t\t\t\"type\": \"RelatedPerson\",\n\t\t\t\t\t\"identifier\": {\n\t\t\t\t\t\t\"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n\t\t\t\t\t\t\"value\": \"9736898148\"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t]\n\t},\n\t\"extension\": [\n\t\t{\n\t\t\t\"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",\n\t\t\t\"valueCodeableConcept\": {\n\t\t\t\t\"coding\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",\n\t\t\t\t\t\t\"code\": \"ROLE_CREATED\",\n\t\t\t\t\t\t\"display\": \"Role created\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n\t\t\t\"valueReference\": {\n\t\t\t\t\"identifier\": {\n\t\t\t\t\t\"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n\t\t\t\t\t\"value\": \"9736898148\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\"\n\t\t},\n\t\t{\n\t\t\t\"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.regulatoryBasis\",\n\t\t\t\"valueCodeableConcept\": {\n\t\t\t\t\"coding\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",\n\t\t\t\t\t\t\"code\": \"parental-responsibility\",\n\t\t\t\t\t\t\"display\": \"Parental responsibility\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t}\n\t\t}\n\t]\n}", "options": { "raw": { "language": "json" @@ -6789,7 +6844,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"resourceType\": \"Consent\",\n \"status\": \"active\",\n \"scope\": {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\"\n }\n ]\n },\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",\n \"code\": \"INFA\",\n \"display\": \"information access\"\n }\n ]\n }\n ],\n \"patient\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"dateTime\": \"2026-02-09T14:00:27.220Z\",\n \"provision\": {\n \"period\": {\n \"start\": \"2025-12-02\",\n \"end\": \"2030-11-23\"\n },\n \"actor\": [\n {\n \"role\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\"\n }\n ]\n },\n \"reference\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n }\n ]\n },\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created\"\n }\n ]\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.regulatoryBasis\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\"\n }\n ]\n }\n },\n {\n \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\"\n }\n ]\n}", + "raw": "{\n\t\"resourceType\": \"Consent\",\n\t\"status\": \"active\",\n\t\"scope\": {\n\t\t\"coding\": [\n\t\t\t{\n\t\t\t\t\"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",\n\t\t\t\t\"code\": \"patient-privacy\",\n\t\t\t\t\"display\": \"Privacy Consent\"\n\t\t\t}\n\t\t]\n\t},\n\t\"category\": [\n\t\t{\n\t\t\t\"coding\": [\n\t\t\t\t{\n\t\t\t\t\t\"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",\n\t\t\t\t\t\"code\": \"INFA\",\n\t\t\t\t\t\"display\": \"information access\"\n\t\t\t\t}\n\t\t\t]\n\t\t}\n\t],\n\t\"patient\": {\n\t\t\"type\": \"Patient\",\n\t\t\"identifier\": {\n\t\t\t\"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n\t\t\t\"value\": \"9736898717\"\n\t\t}\n\t},\n\t\"dateTime\": \"2026-02-09T13:50:10.090Z\",\n\t\"provision\": {\n\t\t\"period\": {\n\t\t\t\"start\": \"2025-12-02\",\n\t\t\t\"end\": \"2030-11-23\"\n\t\t},\n\t\t\"actor\": [\n\t\t\t{\n\t\t\t\t\"role\": {\n\t\t\t\t\t\"coding\": [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",\n\t\t\t\t\t\t\t\"code\": \"parental-responsibility\",\n\t\t\t\t\t\t\t\"display\": \"Parental responsibility\"\n\t\t\t\t\t\t}\n\t\t\t\t\t]\n\t\t\t\t},\n\t\t\t\t\"reference\": {\n\t\t\t\t\t\"type\": \"RelatedPerson\",\n\t\t\t\t\t\"identifier\": {\n\t\t\t\t\t\t\"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n\t\t\t\t\t\t\"value\": \"9736898148\"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t]\n\t},\n\t\"extension\": [\n\t\t{\n\t\t\t\"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",\n\t\t\t\"valueCodeableConcept\": {\n\t\t\t\t\"coding\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",\n\t\t\t\t\t\t\"code\": \"ROLE_CREATED\",\n\t\t\t\t\t\t\"display\": \"Role created\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n\t\t\t\"valueReference\": {\n\t\t\t\t\"identifier\": {\n\t\t\t\t\t\"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n\t\t\t\t\t\"value\": \"9736898148\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\"\n\t\t},\n\t\t{\n\t\t\t\"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.regulatoryBasis\",\n\t\t\t\"valueCodeableConcept\": {\n\t\t\t\t\"coding\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",\n\t\t\t\t\t\t\"code\": \"parental-responsibility\",\n\t\t\t\t\t\t\"display\": \"Parental responsibility\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t}\n\t\t}\n\t]\n}", "options": { "raw": { "language": "json" @@ -6909,7 +6964,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"resourceType\": \"Consent\",\n \"status\": \"active\",\n \"scope\": {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\"\n }\n ],\n \"text\": \"Patient Privacy Consent\"\n },\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",\n \"code\": \"INFA\",\n \"display\": \"Information Access\"\n }\n ],\n \"text\": \"Information Access Consent\"\n }\n ],\n \"patient\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"dateTime\": \"2026-01-12T15:09:49.458Z\",\n \"provision\": {\n \"period\": {\n \"start\": \"2025-12-02\",\n \"end\": \"2030-11-23\"\n },\n \"actor\": [\n {\n \"role\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\"\n }\n ]\n },\n \"reference\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n }\n ]\n },\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",\n \"code\": \"OTHER\",\n \"display\": \"Other reason\"\n }\n ]\n }\n },\n {\n \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",\n \"valueReference\": {}\n }\n }\n]\n}", + "raw": "{\n\t\"resourceType\": \"Consent\",\n\t\"status\": \"active\",\n\t\"scope\": {\n\t\t\"coding\": [\n\t\t\t{\n\t\t\t\t\"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",\n\t\t\t\t\"code\": \"patient-privacy\",\n\t\t\t\t\"display\": \"Privacy Consent\"\n\t\t\t}\n\t\t]\n\t},\n\t\"category\": [\n\t\t{\n\t\t\t\"coding\": [\n\t\t\t\t{\n\t\t\t\t\t\"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",\n\t\t\t\t\t\"code\": \"INFA\",\n\t\t\t\t\t\"display\": \"information access\"\n\t\t\t\t}\n\t\t\t]\n\t\t}\n\t],\n\t\"patient\": {\n\t\t\"type\": \"Patient\",\n\t\t\"identifier\": {\n\t\t\t\"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n\t\t\t\"value\": \"9736898717\"\n\t\t}\n\t},\n\t\"dateTime\": \"2026-02-09T13:50:10.090Z\",\n\t\"provision\": {\n\t\t\"period\": {\n\t\t\t\"start\": \"2025-12-02\",\n\t\t\t\"end\": \"2030-11-23\"\n\t\t},\n\t\t\"actor\": [\n\t\t\t{\n\t\t\t\t\"role\": {\n\t\t\t\t\t\"coding\": [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",\n\t\t\t\t\t\t\t\"code\": \"parental-responsibility\",\n\t\t\t\t\t\t\t\"display\": \"Parental responsibility\"\n\t\t\t\t\t\t}\n\t\t\t\t\t]\n\t\t\t\t},\n\t\t\t\t\"reference\": {\n\t\t\t\t\t\"type\": \"RelatedPerson\",\n\t\t\t\t\t\"identifier\": {\n\t\t\t\t\t\t\"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n\t\t\t\t\t\t\"value\": \"9736898148\"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t]\n\t},\n\t\"extension\": [\n\t\t{\n\t\t\t\"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",\n\t\t\t\"valueCodeableConcept\": {\n\t\t\t\t\"coding\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",\n\t\t\t\t\t\t\"code\": \"ROLE_CREATED\",\n\t\t\t\t\t\t\"display\": \"Role created\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n\t\t\t\"valueReference\": {\n\t\t\t\t\"identifier\": {\n\t\t\t\t\t\"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n\t\t\t\t\t\"value\": \"9736898148\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",\n\t\t\t\"valueReference\": {}\n\t\t},\n\t\t{\n\t\t\t\"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.regulatoryBasis\",\n\t\t\t\"valueCodeableConcept\": {\n\t\t\t\t\"coding\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",\n\t\t\t\t\t\t\"code\": \"parental-responsibility\",\n\t\t\t\t\t\t\"display\": \"Parental responsibility\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t}\n\t\t}\n\t]\n}", "options": { "raw": { "language": "json" @@ -6951,7 +7006,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"resourceType\": \"Consent\",\n \"status\": \"active\",\n \"scope\": {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\"\n }\n ]\n },\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",\n \"code\": \"INFA\",\n \"display\": \"information access\"\n }\n ]\n }\n ],\n \"patient\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"dateTime\": \"2026-02-09T14:00:27.220Z\",\n \"provision\": {\n \"period\": {\n \"start\": \"2025-12-02\",\n \"end\": \"2030-11-23\"\n },\n \"actor\": [\n {\n \"role\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\"\n }\n ]\n },\n \"reference\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n }\n ]\n },\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created\"\n }\n ]\n }\n },\n {\n \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",\n \"valueReference\": {}\n }\n ]\n}", + "raw": "{\n\t\"resourceType\": \"Consent\",\n\t\"status\": \"active\",\n\t\"scope\": {\n\t\t\"coding\": [\n\t\t\t{\n\t\t\t\t\"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",\n\t\t\t\t\"code\": \"patient-privacy\",\n\t\t\t\t\"display\": \"Privacy Consent\"\n\t\t\t}\n\t\t]\n\t},\n\t\"category\": [\n\t\t{\n\t\t\t\"coding\": [\n\t\t\t\t{\n\t\t\t\t\t\"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",\n\t\t\t\t\t\"code\": \"INFA\",\n\t\t\t\t\t\"display\": \"information access\"\n\t\t\t\t}\n\t\t\t]\n\t\t}\n\t],\n\t\"patient\": {\n\t\t\"type\": \"Patient\",\n\t\t\"identifier\": {\n\t\t\t\"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n\t\t\t\"value\": \"9736898717\"\n\t\t}\n\t},\n\t\"dateTime\": \"2026-02-09T13:50:10.090Z\",\n\t\"provision\": {\n\t\t\"period\": {\n\t\t\t\"start\": \"2025-12-02\",\n\t\t\t\"end\": \"2030-11-23\"\n\t\t},\n\t\t\"actor\": [\n\t\t\t{\n\t\t\t\t\"role\": {\n\t\t\t\t\t\"coding\": [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",\n\t\t\t\t\t\t\t\"code\": \"parental-responsibility\",\n\t\t\t\t\t\t\t\"display\": \"Parental responsibility\"\n\t\t\t\t\t\t}\n\t\t\t\t\t]\n\t\t\t\t},\n\t\t\t\t\"reference\": {\n\t\t\t\t\t\"type\": \"RelatedPerson\",\n\t\t\t\t\t\"identifier\": {\n\t\t\t\t\t\t\"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n\t\t\t\t\t\t\"value\": \"9736898148\"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t]\n\t},\n\t\"extension\": [\n\t\t{\n\t\t\t\"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",\n\t\t\t\"valueCodeableConcept\": {\n\t\t\t\t\"coding\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",\n\t\t\t\t\t\t\"code\": \"ROLE_CREATED\",\n\t\t\t\t\t\t\"display\": \"Role created\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n\t\t\t\"valueReference\": {\n\t\t\t\t\"identifier\": {\n\t\t\t\t\t\"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n\t\t\t\t\t\"value\": \"9736898148\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",\n\t\t\t\"valueReference\": {}\n\t\t},\n\t\t{\n\t\t\t\"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.regulatoryBasis\",\n\t\t\t\"valueCodeableConcept\": {\n\t\t\t\t\"coding\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",\n\t\t\t\t\t\t\"code\": \"parental-responsibility\",\n\t\t\t\t\t\t\"display\": \"Parental responsibility\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t}\n\t\t}\n\t]\n}", "options": { "raw": { "language": "json" @@ -7071,7 +7126,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"resourceType\": \"Consent\",\n \"status\": \"active\",\n \"scope\": {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\"\n }\n ]\n },\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",\n \"code\": \"INFA\",\n \"display\": \"information access\"\n }\n ]\n }\n ],\n \"patient\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"dateTime\": \"2026-02-09T13:50:10.090Z\",\n \"provision\": {\n \"period\": {\n \"start\": \"2025-12-02\",\n \"end\": \"2030-11-23\"\n },\n \"actor\": [\n {\n \"role\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\"\n }\n ]\n },\n \"reference\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n }\n ]\n },\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created\"\n }\n ]\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.regulatoryBasis\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\"\n }\n ]\n }\n },\n {\n \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"BAD\",\n \"value\": \"G8101234\"\n }\n }\n }\n ]\n}", + "raw": "{\n\t\"resourceType\": \"Consent\",\n\t\"status\": \"active\",\n\t\"scope\": {\n\t\t\"coding\": [\n\t\t\t{\n\t\t\t\t\"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",\n\t\t\t\t\"code\": \"patient-privacy\",\n\t\t\t\t\"display\": \"Privacy Consent\"\n\t\t\t}\n\t\t]\n\t},\n\t\"category\": [\n\t\t{\n\t\t\t\"coding\": [\n\t\t\t\t{\n\t\t\t\t\t\"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",\n\t\t\t\t\t\"code\": \"INFA\",\n\t\t\t\t\t\"display\": \"information access\"\n\t\t\t\t}\n\t\t\t]\n\t\t}\n\t],\n\t\"patient\": {\n\t\t\"type\": \"Patient\",\n\t\t\"identifier\": {\n\t\t\t\"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n\t\t\t\"value\": \"9736898717\"\n\t\t}\n\t},\n\t\"dateTime\": \"2026-02-09T13:50:10.090Z\",\n\t\"provision\": {\n\t\t\"period\": {\n\t\t\t\"start\": \"2025-12-02\",\n\t\t\t\"end\": \"2030-11-23\"\n\t\t},\n\t\t\"actor\": [\n\t\t\t{\n\t\t\t\t\"role\": {\n\t\t\t\t\t\"coding\": [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",\n\t\t\t\t\t\t\t\"code\": \"parental-responsibility\",\n\t\t\t\t\t\t\t\"display\": \"Parental responsibility\"\n\t\t\t\t\t\t}\n\t\t\t\t\t]\n\t\t\t\t},\n\t\t\t\t\"reference\": {\n\t\t\t\t\t\"type\": \"RelatedPerson\",\n\t\t\t\t\t\"identifier\": {\n\t\t\t\t\t\t\"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n\t\t\t\t\t\t\"value\": \"9736898148\"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t]\n\t},\n\t\"extension\": [\n\t\t{\n\t\t\t\"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",\n\t\t\t\"valueCodeableConcept\": {\n\t\t\t\t\"coding\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",\n\t\t\t\t\t\t\"code\": \"ROLE_CREATED\",\n\t\t\t\t\t\t\"display\": \"Role created\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n\t\t\t\"valueReference\": {\n\t\t\t\t\"identifier\": {\n\t\t\t\t\t\"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n\t\t\t\t\t\"value\": \"9736898148\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",\n\t\t\t\"valueReference\": {\n\t\t\t\t\"identifier\": {\n\t\t\t\t\t\"system\": \"BAD\",\n\t\t\t\t\t\"value\": \"G8101234\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.regulatoryBasis\",\n\t\t\t\"valueCodeableConcept\": {\n\t\t\t\t\"coding\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",\n\t\t\t\t\t\t\"code\": \"parental-responsibility\",\n\t\t\t\t\t\t\"display\": \"Parental responsibility\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t}\n\t\t}\n\t]\n}", "options": { "raw": { "language": "json" @@ -7113,7 +7168,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"resourceType\": \"Consent\",\n \"status\": \"active\",\n \"scope\": {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\"\n }\n ]\n },\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",\n \"code\": \"INFA\",\n \"display\": \"information access\"\n }\n ]\n }\n ],\n \"patient\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"dateTime\": \"2026-02-09T13:50:10.090Z\",\n \"provision\": {\n \"period\": {\n \"start\": \"2025-12-02\",\n \"end\": \"2030-11-23\"\n },\n \"actor\": [\n {\n \"role\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\"\n }\n ]\n },\n \"reference\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n }\n ]\n },\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created\"\n }\n ]\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.regulatoryBasis\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\"\n }\n ]\n }\n },\n {\n \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"BAD\",\n \"value\": \"G8101234\"\n }\n }\n }\n ]\n}", + "raw": "{\n\t\"resourceType\": \"Consent\",\n\t\"status\": \"active\",\n\t\"scope\": {\n\t\t\"coding\": [\n\t\t\t{\n\t\t\t\t\"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",\n\t\t\t\t\"code\": \"patient-privacy\",\n\t\t\t\t\"display\": \"Privacy Consent\"\n\t\t\t}\n\t\t]\n\t},\n\t\"category\": [\n\t\t{\n\t\t\t\"coding\": [\n\t\t\t\t{\n\t\t\t\t\t\"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",\n\t\t\t\t\t\"code\": \"INFA\",\n\t\t\t\t\t\"display\": \"information access\"\n\t\t\t\t}\n\t\t\t]\n\t\t}\n\t],\n\t\"patient\": {\n\t\t\"type\": \"Patient\",\n\t\t\"identifier\": {\n\t\t\t\"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n\t\t\t\"value\": \"9736898717\"\n\t\t}\n\t},\n\t\"dateTime\": \"2026-02-09T13:50:10.090Z\",\n\t\"provision\": {\n\t\t\"period\": {\n\t\t\t\"start\": \"2025-12-02\",\n\t\t\t\"end\": \"2030-11-23\"\n\t\t},\n\t\t\"actor\": [\n\t\t\t{\n\t\t\t\t\"role\": {\n\t\t\t\t\t\"coding\": [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",\n\t\t\t\t\t\t\t\"code\": \"parental-responsibility\",\n\t\t\t\t\t\t\t\"display\": \"Parental responsibility\"\n\t\t\t\t\t\t}\n\t\t\t\t\t]\n\t\t\t\t},\n\t\t\t\t\"reference\": {\n\t\t\t\t\t\"type\": \"RelatedPerson\",\n\t\t\t\t\t\"identifier\": {\n\t\t\t\t\t\t\"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n\t\t\t\t\t\t\"value\": \"9736898148\"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t]\n\t},\n\t\"extension\": [\n\t\t{\n\t\t\t\"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",\n\t\t\t\"valueCodeableConcept\": {\n\t\t\t\t\"coding\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",\n\t\t\t\t\t\t\"code\": \"ROLE_CREATED\",\n\t\t\t\t\t\t\"display\": \"Role created\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n\t\t\t\"valueReference\": {\n\t\t\t\t\"identifier\": {\n\t\t\t\t\t\"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n\t\t\t\t\t\"value\": \"9736898148\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",\n\t\t\t\"valueReference\": {\n\t\t\t\t\"identifier\": {\n\t\t\t\t\t\"system\": \"BAD\",\n\t\t\t\t\t\"value\": \"G8101234\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.regulatoryBasis\",\n\t\t\t\"valueCodeableConcept\": {\n\t\t\t\t\"coding\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",\n\t\t\t\t\t\t\"code\": \"parental-responsibility\",\n\t\t\t\t\t\t\"display\": \"Parental responsibility\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t}\n\t\t}\n\t]\n}", "options": { "raw": { "language": "json" @@ -7233,7 +7288,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"resourceType\": \"Consent\",\n \"status\": \"active\",\n \"scope\": {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\"\n }\n ]\n },\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",\n \"code\": \"INFA\",\n \"display\": \"information access\"\n }\n ]\n }\n ],\n \"patient\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"dateTime\": \"2026-02-09T13:50:10.090Z\",\n \"provision\": {\n \"period\": {\n \"start\": \"2025-12-02\",\n \"end\": \"2030-11-23\"\n },\n \"actor\": [\n {\n \"role\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\"\n }\n ]\n },\n \"reference\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n }\n ]\n },\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created\"\n }\n ]\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.regulatoryBasis\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\"\n }\n ]\n }\n },\n {\n \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"BAD\"\n }\n }\n }\n ]\n}", + "raw": "{\n\t\"resourceType\": \"Consent\",\n\t\"status\": \"active\",\n\t\"scope\": {\n\t\t\"coding\": [\n\t\t\t{\n\t\t\t\t\"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",\n\t\t\t\t\"code\": \"patient-privacy\",\n\t\t\t\t\"display\": \"Privacy Consent\"\n\t\t\t}\n\t\t]\n\t},\n\t\"category\": [\n\t\t{\n\t\t\t\"coding\": [\n\t\t\t\t{\n\t\t\t\t\t\"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",\n\t\t\t\t\t\"code\": \"INFA\",\n\t\t\t\t\t\"display\": \"information access\"\n\t\t\t\t}\n\t\t\t]\n\t\t}\n\t],\n\t\"patient\": {\n\t\t\"type\": \"Patient\",\n\t\t\"identifier\": {\n\t\t\t\"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n\t\t\t\"value\": \"9736898717\"\n\t\t}\n\t},\n\t\"dateTime\": \"2026-02-09T13:50:10.090Z\",\n\t\"provision\": {\n\t\t\"period\": {\n\t\t\t\"start\": \"2025-12-02\",\n\t\t\t\"end\": \"2030-11-23\"\n\t\t},\n\t\t\"actor\": [\n\t\t\t{\n\t\t\t\t\"role\": {\n\t\t\t\t\t\"coding\": [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",\n\t\t\t\t\t\t\t\"code\": \"parental-responsibility\",\n\t\t\t\t\t\t\t\"display\": \"Parental responsibility\"\n\t\t\t\t\t\t}\n\t\t\t\t\t]\n\t\t\t\t},\n\t\t\t\t\"reference\": {\n\t\t\t\t\t\"type\": \"RelatedPerson\",\n\t\t\t\t\t\"identifier\": {\n\t\t\t\t\t\t\"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n\t\t\t\t\t\t\"value\": \"9736898148\"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t]\n\t},\n\t\"extension\": [\n\t\t{\n\t\t\t\"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",\n\t\t\t\"valueCodeableConcept\": {\n\t\t\t\t\"coding\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",\n\t\t\t\t\t\t\"code\": \"ROLE_CREATED\",\n\t\t\t\t\t\t\"display\": \"Role created\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n\t\t\t\"valueReference\": {\n\t\t\t\t\"identifier\": {\n\t\t\t\t\t\"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n\t\t\t\t\t\"value\": \"9736898148\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",\n\t\t\t\"valueReference\": {\n\t\t\t\t\"identifier\": {\n\t\t\t\t\t\"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n\t\t\t\t\t\"value\": \"\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.regulatoryBasis\",\n\t\t\t\"valueCodeableConcept\": {\n\t\t\t\t\"coding\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",\n\t\t\t\t\t\t\"code\": \"parental-responsibility\",\n\t\t\t\t\t\t\"display\": \"Parental responsibility\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t}\n\t\t}\n\t]\n}", "options": { "raw": { "language": "json" @@ -7275,7 +7330,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"resourceType\": \"Consent\",\n \"status\": \"active\",\n \"scope\": {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\"\n }\n ]\n },\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",\n \"code\": \"INFA\",\n \"display\": \"information access\"\n }\n ]\n }\n ],\n \"patient\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"dateTime\": \"2026-02-09T14:01:57.543Z\",\n \"provision\": {\n \"period\": {\n \"start\": \"2025-12-02\",\n \"end\": \"2030-11-23\"\n },\n \"actor\": [\n {\n \"role\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\"\n }\n ]\n },\n \"reference\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n }\n ]\n },\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created\"\n }\n ]\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.regulatoryBasis\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\"\n }\n ]\n }\n },\n {\n \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"BAD\"\n }\n }\n }\n ]\n}", + "raw": "{\n\t\"resourceType\": \"Consent\",\n\t\"status\": \"active\",\n\t\"scope\": {\n\t\t\"coding\": [\n\t\t\t{\n\t\t\t\t\"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",\n\t\t\t\t\"code\": \"patient-privacy\",\n\t\t\t\t\"display\": \"Privacy Consent\"\n\t\t\t}\n\t\t]\n\t},\n\t\"category\": [\n\t\t{\n\t\t\t\"coding\": [\n\t\t\t\t{\n\t\t\t\t\t\"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",\n\t\t\t\t\t\"code\": \"INFA\",\n\t\t\t\t\t\"display\": \"information access\"\n\t\t\t\t}\n\t\t\t]\n\t\t}\n\t],\n\t\"patient\": {\n\t\t\"type\": \"Patient\",\n\t\t\"identifier\": {\n\t\t\t\"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n\t\t\t\"value\": \"9736898717\"\n\t\t}\n\t},\n\t\"dateTime\": \"2026-02-09T13:50:10.090Z\",\n\t\"provision\": {\n\t\t\"period\": {\n\t\t\t\"start\": \"2025-12-02\",\n\t\t\t\"end\": \"2030-11-23\"\n\t\t},\n\t\t\"actor\": [\n\t\t\t{\n\t\t\t\t\"role\": {\n\t\t\t\t\t\"coding\": [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",\n\t\t\t\t\t\t\t\"code\": \"parental-responsibility\",\n\t\t\t\t\t\t\t\"display\": \"Parental responsibility\"\n\t\t\t\t\t\t}\n\t\t\t\t\t]\n\t\t\t\t},\n\t\t\t\t\"reference\": {\n\t\t\t\t\t\"type\": \"RelatedPerson\",\n\t\t\t\t\t\"identifier\": {\n\t\t\t\t\t\t\"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n\t\t\t\t\t\t\"value\": \"9736898148\"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t]\n\t},\n\t\"extension\": [\n\t\t{\n\t\t\t\"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",\n\t\t\t\"valueCodeableConcept\": {\n\t\t\t\t\"coding\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",\n\t\t\t\t\t\t\"code\": \"ROLE_CREATED\",\n\t\t\t\t\t\t\"display\": \"Role created\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n\t\t\t\"valueReference\": {\n\t\t\t\t\"identifier\": {\n\t\t\t\t\t\"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n\t\t\t\t\t\"value\": \"9736898148\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",\n\t\t\t\"valueReference\": {\n\t\t\t\t\"identifier\": {\n\t\t\t\t\t\"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n\t\t\t\t\t\"value\": \"\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.regulatoryBasis\",\n\t\t\t\"valueCodeableConcept\": {\n\t\t\t\t\"coding\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",\n\t\t\t\t\t\t\"code\": \"parental-responsibility\",\n\t\t\t\t\t\t\"display\": \"Parental responsibility\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t}\n\t\t}\n\t]\n}", "options": { "raw": { "language": "json" @@ -7373,7 +7428,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"resourceType\": \"Consent\",\n \"status\": \"active\",\n \"scope\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\",\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\"\n }\n ]\n },\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\",\n \"code\": \"INFA\",\n \"display\": \"information access\"\n }\n ]\n }\n ],\n \"patient\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number/invalid\",\n \"value\": \"9736898717\"\n }\n },\n \"dateTime\": \"{{$isoTimestamp}}\",\n \"provision\": {\n \"period\": {\n \"start\": \"2025-11-23\",\n \"end\": \"2030-11-23\"\n },\n \"actor\": [\n {\n \"role\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"MTH\",\n \"display\": \"Mother\"\n }\n ]\n },\n \"reference\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n }\n ]\n },\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/consent-reason\",\n \"code\": \"TBC\",\n \"display\": \"TBC\"\n }\n ]\n }\n }\n ]\n}", + "raw": "{\n \"resourceType\": \"Consent\",\n \"status\": \"active\",\n \"scope\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\",\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\"\n }\n ]\n },\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\",\n \"code\": \"INFA\",\n \"display\": \"information access\"\n }\n ]\n }\n ],\n \"patient\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number/invalid\",\n \"value\": \"9736898717\"\n }\n },\n \"dateTime\": \"{{$isoTimestamp}}\",\n \"provision\": {\n \"period\": {\n \"start\": \"2025-11-23\",\n \"end\": \"2030-11-23\"\n },\n \"actor\": [\n {\n \"role\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"MTH\",\n \"display\": \"Mother\"\n }\n ]\n },\n \"reference\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n }\n ]\n },\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/consent-reason\",\n \"code\": \"TBC\",\n \"display\": \"TBC\"\n }\n ]\n }\n },\n {\n \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.regulatoryBasis\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\"\n }\n ]\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"G8101234\"\n }\n }\n }\n ]\n}", "options": { "raw": { "language": "json" @@ -7414,7 +7469,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"resourceType\": \"Consent\",\n \"status\": \"active\",\n \"scope\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\",\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\"\n }\n ]\n },\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\",\n \"code\": \"INFA\",\n \"display\": \"information access\"\n }\n ]\n }\n ],\n \"patient\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number/invalid\",\n \"value\": \"9736898717\"\n }\n },\n \"dateTime\": \"{{$isoTimestamp}}\",\n \"provision\": {\n \"period\": {\n \"start\": \"2025-11-23\",\n \"end\": \"2030-11-23\"\n },\n \"actor\": [\n {\n \"role\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"MTH\",\n \"display\": \"Mother\"\n }\n ]\n },\n \"reference\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n }\n ]\n },\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/consent-reason\",\n \"code\": \"TBC\",\n \"display\": \"TBC\"\n }\n ]\n }\n }\n ]\n}", + "raw": "{\n \"resourceType\": \"Consent\",\n \"status\": \"active\",\n \"scope\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\",\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\"\n }\n ]\n },\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\",\n \"code\": \"INFA\",\n \"display\": \"information access\"\n }\n ]\n }\n ],\n \"patient\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number/invalid\",\n \"value\": \"9736898717\"\n }\n },\n \"dateTime\": \"2026-02-16T08:22:13.462Z\",\n \"provision\": {\n \"period\": {\n \"start\": \"2025-11-23\",\n \"end\": \"2030-11-23\"\n },\n \"actor\": [\n {\n \"role\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"MTH\",\n \"display\": \"Mother\"\n }\n ]\n },\n \"reference\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n }\n ]\n },\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/consent-reason\",\n \"code\": \"TBC\",\n \"display\": \"TBC\"\n }\n ]\n }\n },\n {\n \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.regulatoryBasis\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\"\n }\n ]\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"G8101234\"\n }\n }\n }\n ]\n}", "options": { "raw": { "language": "json" @@ -7422,11 +7477,19 @@ } }, "url": { - "raw": "{{api_base_url}}/Consent", + "raw": "https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent", + "protocol": "https", "host": [ - "{{api_base_url}}" + "int", + "api", + "service", + "nhs", + "uk" ], "path": [ + "validated-relationships", + "FHIR", + "R4", "Consent" ] } @@ -7592,12 +7655,12 @@ }, { "key": "X-Request-ID", - "value": "{{$guid}}", + "value": "37a39814-060e-4100-b2ea-7057679112ec", "type": "text" }, { "key": "X-Correlation-ID", - "value": "{{$guid}}", + "value": "bc983fc5-8066-4373-a87b-30d8cc0f905a", "type": "text" } ], @@ -7611,11 +7674,19 @@ } }, "url": { - "raw": "{{api_base_url}}/Consent/:consent_id", + "raw": "https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/:consent_id", + "protocol": "https", "host": [ - "{{api_base_url}}" + "int", + "api", + "service", + "nhs", + "uk" ], "path": [ + "validated-relationships", + "FHIR", + "R4", "Consent", ":consent_id" ], @@ -7793,7 +7864,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"op\": \"add\",\n \"path\": \"/extension/-\",\n \"value\": [\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.regulatoryBasis\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\"\n }\n ]\n }\n }\n ]\n}\n", + "raw": "[\n {\n \"op\": \"add\",\n \"path\": \"/extension/-\",\n \"value\": [\n {\n \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.regulatoryBasis\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\"\n }\n ]\n }\n }\n ]\n }\n]\n", "options": { "raw": { "language": "json" @@ -8228,7 +8299,7 @@ ], "body": { "mode": "raw", - "raw": "[\n {\n \"op\": \"replace\",\n \"path\": \"/status\",\n \"value\": \"active\"\n },\n {\n \"op\": \"add\",\n \"path\": \"/extension/-\",\n \"value\": [\n {\n \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created\"\n }\n ]\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",\n \"valueReference\": {}\n }\n ]\n }\n]", + "raw": "[\n {\n \"op\": \"replace\",\n \"path\": \"/status\",\n \"value\": \"active\"\n },\n {\n \"op\": \"add\",\n \"path\": \"/extension/-\",\n \"value\": [\n {\n \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created\"\n }\n ]\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",\n \"valueReference\": {\n \"identifier\": {\n \"value\": \"G8101234\"\n }\n }\n }\n ]\n }\n]", "options": { "raw": { "language": "json" @@ -8277,7 +8348,7 @@ ], "body": { "mode": "raw", - "raw": "[\n {\n \"op\": \"replace\",\n \"path\": \"/status\",\n \"value\": \"active\"\n },\n {\n \"op\": \"add\",\n \"path\": \"/extension/-\",\n \"value\": [\n {\n \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created\"\n }\n ]\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",\n \"valueReference\": {}\n }\n ]\n }\n]", + "raw": "[\n {\n \"op\": \"replace\",\n \"path\": \"/status\",\n \"value\": \"active\"\n },\n {\n \"op\": \"add\",\n \"path\": \"/extension/-\",\n \"value\": [\n {\n \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created\"\n }\n ]\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",\n \"valueReference\": {\n \"identifier\": {\n \"value\": \"G8101234\"\n }\n }\n }\n ]\n }\n]", "options": { "raw": { "language": "json" @@ -8556,7 +8627,7 @@ ], "body": { "mode": "raw", - "raw": "[\n {\n \"op\": \"replace\",\n \"path\": \"/status\",\n \"value\": \"active\"\n },\n {\n \"op\": \"add\",\n \"path\": \"/extension/-\",\n \"value\": [\n {\n \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created\"\n }\n ]\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"BAD\"\n }\n }\n }\n ]\n }\n]", + "raw": "[\n\t{\n\t\t\"op\": \"replace\",\n\t\t\"path\": \"/status\",\n\t\t\"value\": \"active\"\n\t},\n\t{\n\t\t\"op\": \"add\",\n\t\t\"path\": \"/extension/-\",\n\t\t\"value\": [\n\t\t\t{\n\t\t\t\t\"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",\n\t\t\t\t\"valueCodeableConcept\": {\n\t\t\t\t\t\"coding\": [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",\n\t\t\t\t\t\t\t\"code\": \"ROLE_ACTIVATED\",\n\t\t\t\t\t\t\t\"display\": \"Role activated\"\n\t\t\t\t\t\t}\n\t\t\t\t\t]\n\t\t\t\t}\n\t\t\t},\n\t\t\t{\n\t\t\t\t\"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",\n\t\t\t\t\"valueReference\": {\n\t\t\t\t\t\"identifier\": {\n\t\t\t\t\t\t\"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n\t\t\t\t\t\t\"value\": \"\"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t]\n\t}\n]", "options": { "raw": { "language": "json" @@ -8605,7 +8676,7 @@ ], "body": { "mode": "raw", - "raw": "[\n\t{\n\t\t\"op\": \"replace\",\n\t\t\"path\": \"/status\",\n\t\t\"value\": \"active\"\n\t},\n\t{\n\t\t\"op\": \"add\",\n\t\t\"path\": \"/extension/-\",\n\t\t\"value\": [\n\t\t\t{\n\t\t\t\t\"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",\n\t\t\t\t\"valueCodeableConcept\": {\n\t\t\t\t\t\"coding\": [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",\n\t\t\t\t\t\t\t\"code\": \"ROLE_CREATED\",\n\t\t\t\t\t\t\t\"display\": \"Role created\"\n\t\t\t\t\t\t}\n\t\t\t\t\t]\n\t\t\t\t}\n\t\t\t},\n\t\t\t{\n\t\t\t\t\"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",\n\t\t\t\t\"valueReference\": {\n\t\t\t\t\t\"identifier\": {\n\t\t\t\t\t\t\"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n\t\t\t\t\t\t\"value\": \"BAD\"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t]\n\t}\n]", + "raw": "[\n\t{\n\t\t\"op\": \"replace\",\n\t\t\"path\": \"/status\",\n\t\t\"value\": \"active\"\n\t},\n\t{\n\t\t\"op\": \"add\",\n\t\t\"path\": \"/extension/-\",\n\t\t\"value\": [\n\t\t\t{\n\t\t\t\t\"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",\n\t\t\t\t\"valueCodeableConcept\": {\n\t\t\t\t\t\"coding\": [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",\n\t\t\t\t\t\t\t\"code\": \"ROLE_ACTIVATED\",\n\t\t\t\t\t\t\t\"display\": \"Role activated\"\n\t\t\t\t\t\t}\n\t\t\t\t\t]\n\t\t\t\t}\n\t\t\t},\n\t\t\t{\n\t\t\t\t\"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",\n\t\t\t\t\"valueReference\": {\n\t\t\t\t\t\"identifier\": {\n\t\t\t\t\t\t\"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n\t\t\t\t\t\t\"value\": \"\"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t]\n\t}\n]", "options": { "raw": { "language": "json" @@ -8758,12 +8829,12 @@ }, { "key": "X-Request-ID", - "value": "{{$guid}}", + "value": "30e9b272-a646-4868-a2ce-6950f65bd736", "type": "text" }, { "key": "X-Correlation-ID", - "value": "{{$guid}}", + "value": "7b9ded57-0c7a-497e-85c8-f2f00a6e0104", "type": "text" } ], @@ -8777,11 +8848,19 @@ } }, "url": { - "raw": "{{api_base_url}}/Consent/:consent_id", + "raw": "https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/:consent_id", + "protocol": "https", "host": [ - "{{api_base_url}}" + "int", + "api", + "service", + "nhs", + "uk" ], "path": [ + "validated-relationships", + "FHIR", + "R4", "Consent", ":consent_id" ], @@ -8876,7 +8955,7 @@ ], "body": { "mode": "raw", - "raw": "[\n {\"op\": \"replace\", \"path\": \"/status\", \"value\": \"inactive\"},\n {\n \"op\": \"add\",\n \"path\": \"/extension/-\",\n \"value\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",\n \"code\": \"ROLE_DEACTIVATED_PATIENT_REQUEST\",\n \"display\": \"At patient request\"\n }\n ]\n }\n }\n ]\n }\n]\n", + "raw": "[\n {\n \"op\": \"replace\",\n \"path\": \"/status\",\n \"value\": \"inactive\"\n },\n {\n \"op\": \"add\",\n \"path\": \"/extension/-\",\n \"value\": [\n {\n \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",\n \"code\": \"ROLE_DEACTIVATED_PATIENT_REQUEST\",\n \"display\": \"At patient request\"\n }\n ]\n }\n }\n ]\n }\n]", "options": { "raw": { "language": "json" @@ -8914,18 +8993,18 @@ }, { "key": "X-Request-ID", - "value": "{{$guid}}", + "value": "eb4bff55-95ce-4943-bd54-4b69266c2bb3", "type": "text" }, { "key": "X-Correlation-ID", - "value": "{{$guid}}", + "value": "5e38ba2b-57db-42b5-b20b-00ae83957239", "type": "text" } ], "body": { "mode": "raw", - "raw": "[\n {\"op\": \"replace\", \"path\": \"/status\", \"value\": \"inactive\"},\n {\n \"op\": \"add\",\n \"path\": \"/extension/-\",\n \"value\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",\n \"code\": \"ROLE_DEACTIVATED_PATIENT_REQUEST\",\n \"display\": \"At patient request\"\n }\n ]\n }\n }\n ]\n }\n]\n", + "raw": "[\n {\n \"op\": \"replace\",\n \"path\": \"/status\",\n \"value\": \"inactive\"\n },\n {\n \"op\": \"add\",\n \"path\": \"/extension/-\",\n \"value\": [\n {\n \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",\n \"code\": \"ROLE_DEACTIVATED_PATIENT_REQUEST\",\n \"display\": \"At patient request\"\n }\n ]\n }\n }\n ]\n }\n]", "options": { "raw": { "language": "json" @@ -8933,18 +9012,26 @@ } }, "url": { - "raw": "{{api_base_url}}/Consent/:consent_id", + "raw": "https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/:consent_id", + "protocol": "https", "host": [ - "{{api_base_url}}" + "int", + "api", + "service", + "nhs", + "uk" ], "path": [ + "validated-relationships", + "FHIR", + "R4", "Consent", ":consent_id" ], "variable": [ { "key": "consent_id", - "value": "{{$randomUUID}}" + "value": "127149ab-d560-4f76-a72a-0207a1d09a7f" } ] } @@ -9070,12 +9157,12 @@ }, { "key": "X-Request-ID", - "value": "{{$guid}}", + "value": "45daf0e4-81b4-49a2-94ec-6893977a394c", "type": "text" }, { "key": "X-Correlation-ID", - "value": "{{$guid}}", + "value": "ac7cb80e-309a-4e40-b3dc-44ed631e1943", "type": "text" } ], @@ -9089,11 +9176,19 @@ } }, "url": { - "raw": "{{api_base_url}}/Consent/:consent_id", + "raw": "https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/:consent_id", + "protocol": "https", "host": [ - "{{api_base_url}}" + "int", + "api", + "service", + "nhs", + "uk" ], "path": [ + "validated-relationships", + "FHIR", + "R4", "Consent", ":consent_id" ], @@ -9188,7 +9283,7 @@ ], "body": { "mode": "raw", - "raw": "[\n {\"op\": \"replace\", \"path\": \"/status\", \"value\": \"proposed\"},\n {\n \"op\": \"add\",\n \"path\": \"/extension/-\",\n \"value\": [\n {\n \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",\n \"code\": \"APPLICATION_RESUBMITTED\",\n \"display\": \"Application re-submitted\"\n }\n ]\n }\n }\n ]\n }\n]", + "raw": "[\n\t{\n\t\t\"op\": \"replace\",\n\t\t\"path\": \"/status\",\n\t\t\"value\": \"proposed\"\n\t},\n\t{\n\t\t\"op\": \"add\",\n\t\t\"path\": \"/extension/-\",\n\t\t\"value\": [\n\t\t\t{\n\t\t\t\t\"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",\n\t\t\t\t\"valueCodeableConcept\": {\n\t\t\t\t\t\"coding\": [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",\n\t\t\t\t\t\t\t\"code\": \"APPLICATION_RESUBMITTED\",\n\t\t\t\t\t\t\t\"display\": \"Application re-submitted\"\n\t\t\t\t\t\t}\n\t\t\t\t\t]\n\t\t\t\t}\n\t\t\t}\n\t\t]\n\t}\n]", "options": { "raw": { "language": "json" @@ -9215,7 +9310,7 @@ }, "response": [ { - "name": "Invalid status code error returned", + "name": "Invalid state transition error returned", "originalRequest": { "method": "PATCH", "header": [ @@ -9237,7 +9332,7 @@ ], "body": { "mode": "raw", - "raw": "[\n {\n \"op\": \"replace\",\n \"path\": \"/status\",\n \"value\": \"someinvalidcode\"\n }\n]", + "raw": "[\n\t{\n\t\t\"op\": \"replace\",\n\t\t\"path\": \"/status\",\n\t\t\"value\": \"proposed\"\n\t},\n\t{\n\t\t\"op\": \"add\",\n\t\t\"path\": \"/extension/-\",\n\t\t\"value\": [\n\t\t\t{\n\t\t\t\t\"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",\n\t\t\t\t\"valueCodeableConcept\": {\n\t\t\t\t\t\"coding\": [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",\n\t\t\t\t\t\t\t\"code\": \"APPLICATION_RESUBMITTED\",\n\t\t\t\t\t\t\t\"display\": \"Application re-submitted\"\n\t\t\t\t\t\t}\n\t\t\t\t\t]\n\t\t\t\t}\n\t\t\t}\n\t\t]\n\t}\n]", "options": { "raw": { "language": "json" @@ -9256,7 +9351,7 @@ "variable": [ { "key": "consent_id", - "value": "aa58f9b7-2a02-45a2-9cb4-0d6fefe07a02" + "value": "0e8d365d-2667-4426-ae66-7eb8302bc724" } ] } @@ -9382,12 +9477,12 @@ }, { "key": "X-Request-ID", - "value": "{{$guid}}", + "value": "75fdd97a-89c6-49b8-84ad-aa9a770cecf0", "type": "text" }, { "key": "X-Correlation-ID", - "value": "{{$guid}}", + "value": "95b73d30-9701-4e35-a93f-09677cae5b34", "type": "text" } ], @@ -9401,11 +9496,19 @@ } }, "url": { - "raw": "{{api_base_url}}/Consent/:consent_id", + "raw": "https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/:consent_id", + "protocol": "https", "host": [ - "{{api_base_url}}" + "int", + "api", + "service", + "nhs", + "uk" ], "path": [ + "validated-relationships", + "FHIR", + "R4", "Consent", ":consent_id" ], @@ -9551,12 +9654,12 @@ }, { "key": "X-Request-ID", - "value": "{{$guid}}", + "value": "c8809963-1a8e-4df1-965e-64b2c3dfed0f", "type": "text" }, { "key": "X-Correlation-ID", - "value": "{{$guid}}", + "value": "3070bc8d-baf4-4a66-a7ba-c6c4d092f805", "type": "text" } ], @@ -9570,11 +9673,19 @@ } }, "url": { - "raw": "{{api_base_url}}/Consent/:consent_id", + "raw": "https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/:consent_id", + "protocol": "https", "host": [ - "{{api_base_url}}" + "int", + "api", + "service", + "nhs", + "uk" ], "path": [ + "validated-relationships", + "FHIR", + "R4", "Consent", ":consent_id" ], @@ -10680,4 +10791,4 @@ "value": "" } ] -} +} \ No newline at end of file