From 418d8fef4c9b037a17bdbb98993569db1986aafc Mon Sep 17 00:00:00 2001 From: Ellie Bound <175816742+ellie-bound1-NHSD@users.noreply.github.com> Date: Wed, 21 Jan 2026 14:42:32 +0000 Subject: [PATCH 01/10] NPA-6165: Update OAS to deprecate the performer property and instead use the grantee extension --- .../validated-relationships-service-api.yaml | 28 +++++++++++++++---- 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/specification/validated-relationships-service-api.yaml b/specification/validated-relationships-service-api.yaml index 49814e48..f588f38f 100644 --- a/specification/validated-relationships-service-api.yaml +++ b/specification/validated-relationships-service-api.yaml @@ -2249,7 +2249,6 @@ components: - category - patient - dateTime - - performer description: The details of the consent including who the patient and care "performer" are, status of the relationship and whether consent was given by a patient with capacity. properties: resourceType: @@ -2291,7 +2290,8 @@ components: maxItems: 1 items: $ref: "#/components/schemas/Reference" - description: "Individuals or organizations that agreed to the consent." + description: "Deprecated. Instead use the Grantee Extension." + deprecated: true policy: type: array items: @@ -2301,8 +2301,10 @@ components: extension: type: array items: - $ref: "#/components/schemas/Extension" - description: "Reasons for the status of the consent" + anyOf: + - $ref: "#/components/schemas/StatusReasonExtension" + - $ref: "#/components/schemas/GranteeExtension" + description: "Additioanl content" Policy: type: object @@ -2350,14 +2352,28 @@ components: role: $ref: "#/components/schemas/CodeableConcept" description: "Classification of the role of consent, bound to http://terminology.hl7.org/CodeSystem/v3-RoleCode" - Extension: + + StatusReasonExtension: type: object properties: url: type: string + enum: + - "https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason" + valueCodeableConcept: + $ref: "#/components/schemas/CodeableConcept" + description: Classification of the status. + + GranteeExtension: + type: object + properties: + url: + type: string + enum: + - "https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee" valueCodeableConcept: $ref: "#/components/schemas/CodeableConcept" - description: Classification of the status of consent, bound to http://terminology.hl7.org/CodeSystem/consent-reason. + description: Details for a proxy. OperationOutcome: type: object From 9f1fd4a563873a4d34bd1560ec133679fd19fa33 Mon Sep 17 00:00:00 2001 From: Ellie Bound <175816742+ellie-bound1-NHSD@users.noreply.github.com> Date: Wed, 21 Jan 2026 15:20:38 +0000 Subject: [PATCH 02/10] NPA-6165: Update POST Consent request examples and GET Consent response examples --- .../adult_to_adult_proxy_creation.yaml | 10 +++--- .../parent_child_proxy_creation.yaml | 10 +++--- ...onships-status-active-include-details.yaml | 18 +++++----- ...iltered-relationships-status-inactive.yaml | 18 +++++----- ...-relationships-status-proposed-active.yaml | 36 ++++++++++--------- ...ultiple-relationships-include-patient.yaml | 27 +++++++------- ...lationships-include-performer-patient.yaml | 27 +++++++------- ...tiple-relationships-include-performer.yaml | 27 +++++++------- ...nships-single-patient-include-patient.yaml | 27 +++++++------- ...gle-patient-include-performer-patient.yaml | 27 +++++++------- ...hips-single-patient-include-performer.yaml | 27 +++++++------- ...multiple-relationships-single-patient.yaml | 27 +++++++------- .../GET_Consent/multiple-relationships.yaml | 27 +++++++------- ...ng-adult-relationship-include-patient.yaml | 9 ++--- ...elationship-include-performer-patient.yaml | 9 ++--- ...-adult-relationship-include-performer.yaml | 9 ++--- .../single-consenting-adult-relationship.yaml | 9 ++--- ...er-child-relationship-include-patient.yaml | 9 ++--- ...elationship-include-performer-patient.yaml | 9 ++--- ...-child-relationship-include-performer.yaml | 9 ++--- ...hild-relationship-unknown-legal-basis.yaml | 9 ++--- .../single-mother-child-relationship.yaml | 9 ++--- .../validated-relationships-service-api.yaml | 4 +-- 23 files changed, 217 insertions(+), 176 deletions(-) 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 bc8038e1..312f3b48 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 @@ -19,11 +19,6 @@ ConsentAdultToAdultGuardianRequest: system: https://fhir.nhs.uk/Id/nhs-number value: "9000000012" dateTime: "2025-02-11T14:30:00Z" - performer: - - type: RelatedPerson - identifier: - system: https://fhir.nhs.uk/Id/nhs-number - value: "9000000017" provision: type: permit period: @@ -46,3 +41,8 @@ ConsentAdultToAdultGuardianRequest: - 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.grantee + valueReference: + identifier: + system: https://fhir.nhs.uk/Id/nhs-number + value: '9000000017' 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 e1c9c871..2d1eea54 100644 --- a/specification/examples/requests/POST_Consent/parent_child_proxy_creation.yaml +++ b/specification/examples/requests/POST_Consent/parent_child_proxy_creation.yaml @@ -19,11 +19,6 @@ ConsentParentChildProxyCreationRequest: system: https://fhir.nhs.uk/Id/nhs-number value: "9000000012" dateTime: "2025-02-11T14:30:00Z" - performer: - - type: RelatedPerson - identifier: - system: https://fhir.nhs.uk/Id/nhs-number - value: "9000000009" provision: type: permit period: @@ -47,3 +42,8 @@ ConsentParentChildProxyCreationRequest: - 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.grantee + valueReference: + identifier: + system: https://fhir.nhs.uk/Id/nhs-number + value: '9000000009' 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 47af4ad8..7f848e73 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 @@ -86,10 +86,6 @@ ConsentMultipleRelationshipsStatusActiveIncludeDetailsBundle: system: "https://fhir.nhs.uk/Id/nhs-number" value: "9000000009" dateTime: "2024-07-21T17:32:28Z" - performer: - - identifier: - system: "https://fhir.nhs.uk/Id/nhs-number" - value: "9000000017" policy: - authority: "https://www.england.nhs.uk" uri: "REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD" @@ -115,6 +111,11 @@ 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.grantee + valueReference: + identifier: + system: https://fhir.nhs.uk/Id/nhs-number + value: '9000000017' search: mode: match - fullUrl: "https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/RP974720" @@ -184,10 +185,6 @@ ConsentMultipleRelationshipsStatusActiveIncludeDetailsBundle: system: "https://fhir.nhs.uk/Id/nhs-number" value: "9000000005" dateTime: "2024-07-21T17:32:28Z" - performer: - - identifier: - system: "https://fhir.nhs.uk/Id/nhs-number" - value: "9000000017" policy: - authority: "https://www.england.nhs.uk" uri: "REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD" @@ -213,5 +210,10 @@ 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.grantee + valueReference: + identifier: + system: https://fhir.nhs.uk/Id/nhs-number + value: '9000000017' search: mode: match diff --git a/specification/examples/responses/GET_Consent/filtered-relationships-status-inactive.yaml b/specification/examples/responses/GET_Consent/filtered-relationships-status-inactive.yaml index 31ccf229..dac68b97 100644 --- a/specification/examples/responses/GET_Consent/filtered-relationships-status-inactive.yaml +++ b/specification/examples/responses/GET_Consent/filtered-relationships-status-inactive.yaml @@ -30,10 +30,6 @@ ConsentMultipleRelationshipsStatusInactiveBundle: system: 'https://fhir.nhs.uk/Id/nhs-number' value: '9000000006' dateTime: '2024-07-21T17:32:28Z' - performer: - - identifier: - system: 'https://fhir.nhs.uk/Id/nhs-number' - value: '9000000017' policy: - authority: https://www.england.nhs.uk uri: REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD @@ -59,6 +55,11 @@ 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.grantee + valueReference: + identifier: + system: https://fhir.nhs.uk/Id/nhs-number + value: '9000000017' search: mode: match - fullUrl: https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/ABCD12B3 @@ -81,10 +82,6 @@ ConsentMultipleRelationshipsStatusInactiveBundle: system: 'https://fhir.nhs.uk/Id/nhs-number' value: '9000000007' dateTime: '2024-07-21T17:32:28Z' - performer: - - identifier: - system: 'https://fhir.nhs.uk/Id/nhs-number' - value: '9000000017' policy: - authority: https://www.england.nhs.uk uri: REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD @@ -111,5 +108,10 @@ ConsentMultipleRelationshipsStatusInactiveBundle: code: OTHER display: Other reason text: Patient would not respond to phone calls + - url: http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee + valueReference: + identifier: + system: https://fhir.nhs.uk/Id/nhs-number + value: '9000000017' search: mode: match diff --git a/specification/examples/responses/GET_Consent/filtered-relationships-status-proposed-active.yaml b/specification/examples/responses/GET_Consent/filtered-relationships-status-proposed-active.yaml index 0814667c..b2cd14da 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 @@ -30,10 +30,6 @@ ConsentMultipleRelationshipsStatusProposedActiveBundle: system: 'https://fhir.nhs.uk/Id/nhs-number' value: '9000000009' dateTime: '2024-07-21T17:32:28Z' - performer: - - identifier: - system: 'https://fhir.nhs.uk/Id/nhs-number' - value: '9000000017' policy: - authority: https://www.england.nhs.uk uri: REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD @@ -59,6 +55,11 @@ 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.grantee + valueReference: + identifier: + system: https://fhir.nhs.uk/Id/nhs-number + value: '9000000017' search: mode: match @@ -82,10 +83,6 @@ ConsentMultipleRelationshipsStatusProposedActiveBundle: system: 'https://fhir.nhs.uk/Id/nhs-number' value: '9000000005' dateTime: '2024-07-21T17:32:28Z' - performer: - - identifier: - system: 'https://fhir.nhs.uk/Id/nhs-number' - value: '9000000017' policy: - authority: https://www.england.nhs.uk uri: REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD @@ -111,6 +108,11 @@ 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.grantee + valueReference: + identifier: + system: https://fhir.nhs.uk/Id/nhs-number + value: '9000000017' search: mode: match @@ -134,10 +136,6 @@ ConsentMultipleRelationshipsStatusProposedActiveBundle: system: 'https://fhir.nhs.uk/Id/nhs-number' value: '9000000020' dateTime: '2024-07-21T17:32:28Z' - performer: - - identifier: - system: 'https://fhir.nhs.uk/Id/nhs-number' - value: '9000000017' policy: - authority: https://www.england.nhs.uk uri: REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD @@ -163,6 +161,11 @@ 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.grantee + valueReference: + identifier: + system: https://fhir.nhs.uk/Id/nhs-number + value: '9000000017' search: mode: match @@ -186,10 +189,6 @@ ConsentMultipleRelationshipsStatusProposedActiveBundle: system: 'https://fhir.nhs.uk/Id/nhs-number' value: '9000000021' dateTime: '2024-07-21T17:32:28Z' - performer: - - identifier: - system: 'https://fhir.nhs.uk/Id/nhs-number' - value: '9000000017' policy: - authority: https://www.england.nhs.uk uri: REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD @@ -215,5 +214,10 @@ 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.grantee + valueReference: + identifier: + system: https://fhir.nhs.uk/Id/nhs-number + value: '9000000017' search: mode: match 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 9bb9ba66..bac8e74c 100644 --- a/specification/examples/responses/GET_Consent/multiple-relationships-include-patient.yaml +++ b/specification/examples/responses/GET_Consent/multiple-relationships-include-patient.yaml @@ -62,10 +62,6 @@ ConsentMultipleRelationshipsIncludePatientBundle: system: "https://fhir.nhs.uk/Id/nhs-number" value: "9000000009" dateTime: "2024-07-21T17:32:28Z" - performer: - - identifier: - system: "https://fhir.nhs.uk/Id/nhs-number" - value: "9000000022" policy: - authority: https://www.england.nhs.uk uri: REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD @@ -91,6 +87,11 @@ 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.grantee + valueReference: + identifier: + system: https://fhir.nhs.uk/Id/nhs-number + value: '9000000022' search: mode: match - fullUrl: https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/DFCC67F5 @@ -142,10 +143,6 @@ ConsentMultipleRelationshipsIncludePatientBundle: system: "https://fhir.nhs.uk/Id/nhs-number" value: "9000000005" dateTime: "2024-07-21T17:32:28Z" - performer: - - identifier: - system: "https://fhir.nhs.uk/Id/nhs-number" - value: "9000000022" policy: - authority: https://www.england.nhs.uk uri: REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD @@ -171,6 +168,11 @@ 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.grantee + valueReference: + identifier: + system: https://fhir.nhs.uk/Id/nhs-number + value: '9000000022' search: mode: match - fullUrl: https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/ZPTT32T3 @@ -222,10 +224,6 @@ ConsentMultipleRelationshipsIncludePatientBundle: system: "https://fhir.nhs.uk/Id/nhs-number" value: "9000000006" dateTime: "2024-07-21T17:32:28Z" - performer: - - identifier: - system: "https://fhir.nhs.uk/Id/nhs-number" - value: "9000000022" policy: - authority: https://www.england.nhs.uk uri: REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD @@ -251,5 +249,10 @@ 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.grantee + valueReference: + identifier: + system: https://fhir.nhs.uk/Id/nhs-number + value: '9000000022' search: mode: match 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 de3f8c93..244eb73c 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 @@ -86,10 +86,6 @@ ConsentMultipleRelationshipsIncludePerformerPatientBundle: system: "https://fhir.nhs.uk/Id/nhs-number" value: "9000000009" dateTime: "2024-07-21T17:32:28Z" - performer: - - identifier: - system: "https://fhir.nhs.uk/Id/nhs-number" - value: "9000000022" policy: - authority: https://www.england.nhs.uk uri: REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD @@ -115,6 +111,11 @@ 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.grantee + valueReference: + identifier: + system: https://fhir.nhs.uk/Id/nhs-number + value: '9000000022' search: mode: match - fullUrl: https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/RP974720 @@ -185,10 +186,6 @@ ConsentMultipleRelationshipsIncludePerformerPatientBundle: system: "https://fhir.nhs.uk/Id/nhs-number" value: "9000000005" dateTime: "2024-07-21T17:32:28Z" - performer: - - identifier: - system: "https://fhir.nhs.uk/Id/nhs-number" - value: "9000000022" policy: - authority: https://www.england.nhs.uk uri: REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD @@ -214,6 +211,11 @@ 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.grantee + valueReference: + identifier: + system: https://fhir.nhs.uk/Id/nhs-number + value: '9000000022' search: mode: match - fullUrl: https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/AATD11A1 @@ -284,10 +286,6 @@ ConsentMultipleRelationshipsIncludePerformerPatientBundle: system: "https://fhir.nhs.uk/Id/nhs-number" value: "9000000006" dateTime: "2024-07-21T17:32:28Z" - performer: - - identifier: - system: "https://fhir.nhs.uk/Id/nhs-number" - value: "9000000022" policy: - authority: https://www.england.nhs.uk uri: REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD @@ -313,5 +311,10 @@ 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.grantee + valueReference: + identifier: + system: https://fhir.nhs.uk/Id/nhs-number + value: '9000000022' 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 de4d2478..fcfae9cb 100644 --- a/specification/examples/responses/GET_Consent/multiple-relationships-include-performer.yaml +++ b/specification/examples/responses/GET_Consent/multiple-relationships-include-performer.yaml @@ -55,10 +55,6 @@ ConsentMultipleRelationshipsIncludePerformerBundle: system: 'https://fhir.nhs.uk/Id/nhs-number' value: '9000000009' dateTime: '2024-07-21T17:32:28Z' - performer: - - identifier: - system: 'https://fhir.nhs.uk/Id/nhs-number' - value: '9000000022' policy: - authority: https://www.england.nhs.uk uri: REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD @@ -84,6 +80,11 @@ 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.grantee + valueReference: + identifier: + system: https://fhir.nhs.uk/Id/nhs-number + value: '9000000022' search: mode: match - fullUrl: >- @@ -127,10 +128,6 @@ ConsentMultipleRelationshipsIncludePerformerBundle: system: 'https://fhir.nhs.uk/Id/nhs-number' value: '9000000005' dateTime: '2024-07-21T17:32:28Z' - performer: - - identifier: - system: 'https://fhir.nhs.uk/Id/nhs-number' - value: '9000000022' policy: - authority: https://www.england.nhs.uk uri: REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD @@ -156,6 +153,11 @@ 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.grantee + valueReference: + identifier: + system: https://fhir.nhs.uk/Id/nhs-number + value: '9000000022' search: mode: match - fullUrl: >- @@ -199,10 +201,6 @@ ConsentMultipleRelationshipsIncludePerformerBundle: system: 'https://fhir.nhs.uk/Id/nhs-number' value: '9000000006' dateTime: '2024-07-21T17:32:28Z' - performer: - - identifier: - system: 'https://fhir.nhs.uk/Id/nhs-number' - value: '9000000022' policy: - authority: https://www.england.nhs.uk uri: REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD @@ -228,6 +226,11 @@ 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.grantee + valueReference: + identifier: + system: https://fhir.nhs.uk/Id/nhs-number + value: '9000000022' 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 252443b2..d46ff1d5 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 @@ -59,10 +59,6 @@ ConsentMultipleRelationshipsSinglePatientIncludePatientBundle: system: "https://fhir.nhs.uk/Id/nhs-number" value: "9000000100" dateTime: "2024-07-21T17:32:28Z" - performer: - - identifier: - system: "https://fhir.nhs.uk/Id/nhs-number" - value: "9000000020" policy: - authority: https://www.england.nhs.uk uri: REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD @@ -88,6 +84,11 @@ 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.grantee + valueReference: + identifier: + system: https://fhir.nhs.uk/Id/nhs-number + value: '9000000020' search: mode: match - fullUrl: https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/WWCC67T1 @@ -110,10 +111,6 @@ ConsentMultipleRelationshipsSinglePatientIncludePatientBundle: system: "https://fhir.nhs.uk/Id/nhs-number" value: "9000000100" dateTime: "2024-07-21T17:32:28Z" - performer: - - identifier: - system: "https://fhir.nhs.uk/Id/nhs-number" - value: "9000000021" policy: - authority: https://www.england.nhs.uk uri: REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD @@ -139,6 +136,11 @@ 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.grantee + valueReference: + identifier: + system: https://fhir.nhs.uk/Id/nhs-number + value: '9000000021' search: mode: match - fullUrl: https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/AATD11A1 @@ -161,10 +163,6 @@ ConsentMultipleRelationshipsSinglePatientIncludePatientBundle: system: "https://fhir.nhs.uk/Id/nhs-number" value: "9000000100" dateTime: "2024-07-21T17:32:28Z" - performer: - - identifier: - system: "https://fhir.nhs.uk/Id/nhs-number" - value: "9000000022" policy: - authority: https://www.england.nhs.uk uri: REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD @@ -190,5 +188,10 @@ 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.grantee + valueReference: + identifier: + system: https://fhir.nhs.uk/Id/nhs-number + value: '9000000022' search: mode: match 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 614a5cef..5fb586bd 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 @@ -81,10 +81,6 @@ ConsentMultipleRelationshipsSinglePatientIncludePerformerPatientBundle: system: "https://fhir.nhs.uk/Id/nhs-number" value: "9000000100" dateTime: "2024-07-21T17:32:28Z" - performer: - - identifier: - system: "https://fhir.nhs.uk/Id/nhs-number" - value: "9000000020" policy: - authority: https://www.england.nhs.uk uri: REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD @@ -110,6 +106,11 @@ 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.grantee + valueReference: + identifier: + system: https://fhir.nhs.uk/Id/nhs-number + value: '9000000020' search: mode: match - fullUrl: https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/BE974742 @@ -150,10 +151,6 @@ ConsentMultipleRelationshipsSinglePatientIncludePerformerPatientBundle: system: "https://fhir.nhs.uk/Id/nhs-number" value: "9000000100" dateTime: "2024-07-21T17:32:28Z" - performer: - - identifier: - system: "https://fhir.nhs.uk/Id/nhs-number" - value: "9000000021" policy: - authority: https://www.england.nhs.uk uri: REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD @@ -179,6 +176,11 @@ 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.grantee + valueReference: + identifier: + system: https://fhir.nhs.uk/Id/nhs-number + value: '9000000021' search: mode: match - fullUrl: https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/BE974742 @@ -219,10 +221,6 @@ ConsentMultipleRelationshipsSinglePatientIncludePerformerPatientBundle: system: "https://fhir.nhs.uk/Id/nhs-number" value: "9000000100" dateTime: "2024-07-21T17:32:28Z" - performer: - - identifier: - system: "https://fhir.nhs.uk/Id/nhs-number" - value: "9000000022" policy: - authority: https://www.england.nhs.uk uri: REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD @@ -248,5 +246,10 @@ 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.grantee + valueReference: + identifier: + system: https://fhir.nhs.uk/Id/nhs-number + value: '9000000022' search: mode: match 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 fd14c306..075ade50 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 @@ -52,10 +52,6 @@ ConsentMultipleRelationshipsSinglePatientIncludePerformerPatientBundle: system: 'https://fhir.nhs.uk/Id/nhs-number' value: '9000000100' dateTime: '2024-07-21T17:32:28Z' - performer: - - identifier: - system: 'https://fhir.nhs.uk/Id/nhs-number' - value: '9000000020' policy: - authority: https://www.england.nhs.uk uri: REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD @@ -81,6 +77,11 @@ 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.grantee + valueReference: + identifier: + system: https://fhir.nhs.uk/Id/nhs-number + value: '9000000020' search: mode: match - fullUrl: https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/BE974742 @@ -121,10 +122,6 @@ ConsentMultipleRelationshipsSinglePatientIncludePerformerPatientBundle: system: 'https://fhir.nhs.uk/Id/nhs-number' value: '9000000100' dateTime: '2024-07-21T17:32:28Z' - performer: - - identifier: - system: 'https://fhir.nhs.uk/Id/nhs-number' - value: '9000000021' policy: - authority: https://www.england.nhs.uk uri: REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD @@ -150,6 +147,11 @@ 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.grantee + valueReference: + identifier: + system: https://fhir.nhs.uk/Id/nhs-number + value: '9000000021' search: mode: match - fullUrl: https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/BE974742 @@ -190,10 +192,6 @@ ConsentMultipleRelationshipsSinglePatientIncludePerformerPatientBundle: system: 'https://fhir.nhs.uk/Id/nhs-number' value: '9000000100' dateTime: '2024-07-21T17:32:28Z' - performer: - - identifier: - system: 'https://fhir.nhs.uk/Id/nhs-number' - value: '9000000022' policy: - authority: https://www.england.nhs.uk uri: REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD @@ -219,5 +217,10 @@ 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.grantee + valueReference: + identifier: + system: https://fhir.nhs.uk/Id/nhs-number + value: '9000000022' search: mode: match 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 2d440056..a83b1fae 100644 --- a/specification/examples/responses/GET_Consent/multiple-relationships-single-patient.yaml +++ b/specification/examples/responses/GET_Consent/multiple-relationships-single-patient.yaml @@ -30,10 +30,6 @@ ConsentMultipleRelationshipsSinglePatientBundle: system: 'https://fhir.nhs.uk/Id/nhs-number' value: '9000000100' dateTime: '2024-07-21T17:32:28Z' - performer: - - identifier: - system: 'https://fhir.nhs.uk/Id/nhs-number' - value: '9000000020' policy: - authority: https://www.england.nhs.uk uri: REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD @@ -59,6 +55,11 @@ 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.grantee + valueReference: + identifier: + system: https://fhir.nhs.uk/Id/nhs-number + value: '9000000020' search: mode: match - fullUrl: https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/WWCC67T1 @@ -81,10 +82,6 @@ ConsentMultipleRelationshipsSinglePatientBundle: system: 'https://fhir.nhs.uk/Id/nhs-number' value: '9000000100' dateTime: '2024-07-21T17:32:28Z' - performer: - - identifier: - system: 'https://fhir.nhs.uk/Id/nhs-number' - value: '9000000021' policy: - authority: https://www.england.nhs.uk uri: REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD @@ -110,6 +107,11 @@ 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.grantee + valueReference: + identifier: + system: https://fhir.nhs.uk/Id/nhs-number + value: '9000000021' search: mode: match - fullUrl: https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/AATD11A1 @@ -132,10 +134,6 @@ ConsentMultipleRelationshipsSinglePatientBundle: system: 'https://fhir.nhs.uk/Id/nhs-number' value: '9000000100' dateTime: '2024-07-21T17:32:28Z' - performer: - - identifier: - system: 'https://fhir.nhs.uk/Id/nhs-number' - value: '9000000022' policy: - authority: https://www.england.nhs.uk uri: REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD @@ -161,5 +159,10 @@ 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.grantee + valueReference: + identifier: + system: https://fhir.nhs.uk/Id/nhs-number + value: '9000000022' search: mode: match diff --git a/specification/examples/responses/GET_Consent/multiple-relationships.yaml b/specification/examples/responses/GET_Consent/multiple-relationships.yaml index f2192826..588d747e 100644 --- a/specification/examples/responses/GET_Consent/multiple-relationships.yaml +++ b/specification/examples/responses/GET_Consent/multiple-relationships.yaml @@ -30,10 +30,6 @@ ConsentMultipleRelationshipsBundle: system: 'https://fhir.nhs.uk/Id/nhs-number' value: '9000000009' dateTime: '2024-07-21T17:32:28Z' - performer: - - identifier: - system: 'https://fhir.nhs.uk/Id/nhs-number' - value: '9000000022' policy: - authority: https://www.england.nhs.uk uri: REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD @@ -59,6 +55,11 @@ 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.grantee + valueReference: + identifier: + system: https://fhir.nhs.uk/Id/nhs-number + value: '9000000022' search: mode: match - fullUrl: https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/WWCC67T1 @@ -81,10 +82,6 @@ ConsentMultipleRelationshipsBundle: system: 'https://fhir.nhs.uk/Id/nhs-number' value: '9000000005' dateTime: '2024-07-21T17:32:28Z' - performer: - - identifier: - system: 'https://fhir.nhs.uk/Id/nhs-number' - value: '9000000022' policy: - authority: https://www.england.nhs.uk uri: REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD @@ -110,6 +107,11 @@ 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.grantee + valueReference: + identifier: + system: https://fhir.nhs.uk/Id/nhs-number + value: '9000000022' search: mode: match - fullUrl: https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/AATD11A1 @@ -132,10 +134,6 @@ ConsentMultipleRelationshipsBundle: system: 'https://fhir.nhs.uk/Id/nhs-number' value: '9000000006' dateTime: '2024-07-21T17:32:28Z' - performer: - - identifier: - system: 'https://fhir.nhs.uk/Id/nhs-number' - value: '9000000022' policy: - authority: https://www.england.nhs.uk uri: REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD @@ -161,5 +159,10 @@ 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.grantee + valueReference: + identifier: + system: https://fhir.nhs.uk/Id/nhs-number + value: '9000000022' search: mode: match 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 0ba0128a..d5a2ada5 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 @@ -59,10 +59,6 @@ ConsentSingleConsentingAdultRelationshipIncludePatientBundle: system: "https://fhir.nhs.uk/Id/nhs-number" value: "9000000005" dateTime: "2024-07-21T17:32:28Z" - performer: - - identifier: - system: "https://fhir.nhs.uk/Id/nhs-number" - value: "9000000010" policy: - authority: https://www.england.nhs.uk uri: REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD @@ -88,5 +84,10 @@ 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.grantee + valueReference: + identifier: + system: https://fhir.nhs.uk/Id/nhs-number + value: '9000000010' search: mode: match 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 a4e344ea..2803b290 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 @@ -80,10 +80,6 @@ ConsentSingleConsentingAdultRelationshipIncludePerformerPatientBundle: system: "https://fhir.nhs.uk/Id/nhs-number" value: "9000000005" dateTime: "2024-07-21T17:32:28Z" - performer: - - identifier: - system: "https://fhir.nhs.uk/Id/nhs-number" - value: "9000000010" policy: - authority: https://www.england.nhs.uk uri: REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD @@ -109,5 +105,10 @@ 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.grantee + valueReference: + identifier: + system: https://fhir.nhs.uk/Id/nhs-number + value: '9000000010' search: mode: match 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 cd2fbfa9..183eb6b3 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 @@ -50,10 +50,6 @@ ConsentSingleConsentingAdultRelationshipIncludePerformerBundle: system: 'https://fhir.nhs.uk/Id/nhs-number' value: '9000000005' dateTime: '2024-07-21T17:32:28Z' - performer: - - identifier: - system: 'https://fhir.nhs.uk/Id/nhs-number' - value: '9000000010' policy: - authority: https://www.england.nhs.uk uri: REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD @@ -79,5 +75,10 @@ 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.grantee + valueReference: + identifier: + system: https://fhir.nhs.uk/Id/nhs-number + value: '9000000010' search: mode: match 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 e536e9a9..beb1a5c7 100644 --- a/specification/examples/responses/GET_Consent/single-consenting-adult-relationship.yaml +++ b/specification/examples/responses/GET_Consent/single-consenting-adult-relationship.yaml @@ -30,10 +30,6 @@ ConsentSingleConsentingAdultRelationshipBundle: system: 'https://fhir.nhs.uk/Id/nhs-number' value: '9000000005' dateTime: '2024-07-21T17:32:28Z' - performer: - - identifier: - system: 'https://fhir.nhs.uk/Id/nhs-number' - value: '9000000010' policy: - authority: https://www.england.nhs.uk uri: REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD @@ -59,5 +55,10 @@ 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.grantee + valueReference: + identifier: + system: https://fhir.nhs.uk/Id/nhs-number + value: '9000000010' search: mode: match 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 2e8e4ff1..8578b91a 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 @@ -59,10 +59,6 @@ ConsentSingleAdultChildRelationshipIncludePatientBundle: system: "https://fhir.nhs.uk/Id/nhs-number" value: "9000000009" dateTime: "2024-07-21T17:32:28Z" - performer: - - identifier: - system: "https://fhir.nhs.uk/Id/nhs-number" - value: "9000000019" policy: - authority: https://www.england.nhs.uk uri: REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD @@ -85,5 +81,10 @@ 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.grantee + valueReference: + identifier: + system: https://fhir.nhs.uk/Id/nhs-number + value: '9000000019' search: mode: match 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 d3578c21..a8768949 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 @@ -84,10 +84,6 @@ ConsentSingleAdultChildRelationshipIncludePerformerPatientBundle: system: "https://fhir.nhs.uk/Id/nhs-number" value: "9000000009" dateTime: "2024-07-21T17:32:28Z" - performer: - - identifier: - system: "https://fhir.nhs.uk/Id/nhs-number" - value: "9000000019" policy: - authority: https://www.england.nhs.uk uri: REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD @@ -113,5 +109,10 @@ 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.grantee + valueReference: + identifier: + system: https://fhir.nhs.uk/Id/nhs-number + value: '9000000019' search: mode: match 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 56a97721..1484158b 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 @@ -53,10 +53,6 @@ ConsentSingleAdultChildRelationshipIncludePerformerBundle: system: 'https://fhir.nhs.uk/Id/nhs-number' value: '9000000009' dateTime: '2024-07-21T17:32:28Z' - performer: - - identifier: - system: 'https://fhir.nhs.uk/Id/nhs-number' - value: '9000000019' policy: - authority: https://www.england.nhs.uk uri: REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD @@ -82,5 +78,10 @@ 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.grantee + valueReference: + identifier: + system: https://fhir.nhs.uk/Id/nhs-number + value: '9000000019' search: mode: match 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 f1d76eac..d7109185 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 @@ -30,10 +30,6 @@ ConsentSingleAdultChildRelationshipUnknownLegalBasisBundle: system: 'https://fhir.nhs.uk/Id/nhs-number' value: '9000000119' dateTime: '2024-07-21T17:32:28Z' - performer: - - identifier: - system: 'https://fhir.nhs.uk/Id/nhs-number' - value: '9000000111' policy: - authority: https://www.england.nhs.uk uri: REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD @@ -62,5 +58,10 @@ 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.grantee + valueReference: + identifier: + system: https://fhir.nhs.uk/Id/nhs-number + value: '9000000111' search: mode: match 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 2e153c7c..2846d996 100644 --- a/specification/examples/responses/GET_Consent/single-mother-child-relationship.yaml +++ b/specification/examples/responses/GET_Consent/single-mother-child-relationship.yaml @@ -30,10 +30,6 @@ ConsentSingleAdultChildRelationshipBundle: system: 'https://fhir.nhs.uk/Id/nhs-number' value: '9000000009' dateTime: '2024-07-21T17:32:28Z' - performer: - - identifier: - system: 'https://fhir.nhs.uk/Id/nhs-number' - value: '9000000019' policy: - authority: https://www.england.nhs.uk uri: REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD @@ -59,5 +55,10 @@ ConsentSingleAdultChildRelationshipBundle: - 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.grantee + valueReference: + identifier: + system: https://fhir.nhs.uk/Id/nhs-number + value: '9000000019' search: mode: match diff --git a/specification/validated-relationships-service-api.yaml b/specification/validated-relationships-service-api.yaml index f588f38f..c574c422 100644 --- a/specification/validated-relationships-service-api.yaml +++ b/specification/validated-relationships-service-api.yaml @@ -2371,8 +2371,8 @@ components: type: string enum: - "https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee" - valueCodeableConcept: - $ref: "#/components/schemas/CodeableConcept" + valueReference: + $ref: "#/components/schemas/Identifier" description: Details for a proxy. OperationOutcome: From 1a10a96b1eb7defdcc79f161d63ab9e2d6798d90 Mon Sep 17 00:00:00 2001 From: Ellie Bound <175816742+ellie-bound1-NHSD@users.noreply.github.com> Date: Thu, 22 Jan 2026 08:48:55 +0000 Subject: [PATCH 03/10] NPA-6165: Postman Collection Updates --- ...ervice.integration.postman_collection.json | 18614 ++++++++-------- ...ip_service.sandbox.postman_collection.json | 11250 ++++++++++ 2 files changed, 20624 insertions(+), 9240 deletions(-) diff --git a/postman/validated_relationship_service.integration.postman_collection.json b/postman/validated_relationship_service.integration.postman_collection.json index 4ffbe339..3b557e2a 100644 --- a/postman/validated_relationship_service.integration.postman_collection.json +++ b/postman/validated_relationship_service.integration.postman_collection.json @@ -1,9242 +1,9376 @@ { - "info": { - "_postman_id": "a359139d-5115-463f-926e-dea326d9f2a6", - "name": "Validated Relationship Service - Integration - 21/01/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 \n- App-restricted - for service-to-service authorization\n \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 \n- get_cis2_access_token_int.py - for CIS2 authorization\n \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\n \n2. Go to the Authorization tab for this Postman request\n \n3. Select 'Bearer token' from the drop-down\n \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 \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": "18067099" - }, - "item": [ - { - "name": "Get proxy roles (GET /Consent)", - "item": [ - { - "name": "Valid request - NPS - Get proxy roles for performer", - "event": [ - { - "listen": "prerequest", - "script": { - "exec": [ - "" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - }, - { - "listen": "test", - "script": { - "exec": [ - "" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "SomeToken;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9736898148", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9736898148" - } - ] - }, - "description": "This request and its examples will only retrieve proxy roles from the National Proxy Store and not directly from GPIT suppliers via NAM.\n\nSee folder-level docs for more info.\n\n## Example scenario\n\n**Given** proxy roles exist for a performer (proxy) in the National Proxy Store (NPS) \n**When** a GET /Consent request is sent with the performer identifier \n**Then** the proxy roles in NPS are returned\n\n## Authorization\n\nPlease see the folder overview for details of how to generate tokens for this endpoint." - }, - "response": [ - { - "name": "Proxy roles returned - No patient or performer details", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "1c190795-98fc-40d0-b13d-4b566650950a", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "3bedabd0-b86f-4d7b-92d9-94f020b4a834", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "some_token;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9736898148", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9736898148" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Date", - "value": "Thu, 04 Dec 2025 10:48:19 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "3486" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "cf3a99a3-7592-4968-893c-e443d6cb27c8" - }, - { - "key": "x-amz-apigw-id", - "value": "VD0FoHiurPEFXqQ=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-693166f0-1bb8c61dd3aa101687d0b754" - }, - { - "key": "X-Request-ID", - "value": "d3ec5ec8-088f-4db6-8342-1a21d2a2af16" - }, - { - "key": "X-Correlation-ID", - "value": "656bfa49-711b-48c4-9427-1ed8fa34260f" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T10:48:19Z\",\n \"total\": 2,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9736898148\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"resource\": {\n \"id\": \"7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T10:46:27Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/b22d6068-fe78-40f4-b71a-b916dac48c0b\",\n \"resource\": {\n \"id\": \"b22d6068-fe78-40f4-b71a-b916dac48c0b\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T10:47:43Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n }\n ]\n}" - }, - { - "name": "Proxy roles returned - Include patient details", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "some_token;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9736898148&_include=Consent:patient", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9736898148" - }, - { - "key": "_include", - "value": "Consent:patient" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Date", - "value": "Thu, 04 Dec 2025 10:50:25 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "6923" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "edd035fd-2cdb-4c7a-a55c-a55e6faf5743" - }, - { - "key": "x-amz-apigw-id", - "value": "VD0ZXFA2LPEFYqg=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-6931676e-74035c00139aae000a60b5d7" - }, - { - "key": "X-Request-ID", - "value": "64b0f06f-a35e-44bb-baf4-33de94895236" - }, - { - "key": "X-Correlation-ID", - "value": "6a95b411-9936-49bb-bbcb-8e6776417762" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T10:50:25Z\",\n \"total\": 2,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9736898148&_include=Consent%3Apatient\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"resource\": {\n \"id\": \"7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T10:46:27Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/b22d6068-fe78-40f4-b71a-b916dac48c0b\",\n \"resource\": {\n \"id\": \"b22d6068-fe78-40f4-b71a-b916dac48c0b\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T10:47:43Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898644\",\n \"resource\": {\n \"id\": \"9736898644\",\n \"meta\": {\n \"security\": [\n {\n \"code\": \"U\",\n \"display\": \"unrestricted\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-Confidentiality\"\n },\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ],\n \"versionId\": \"4\"\n },\n \"address\": [\n {\n \"extension\": [\n {\n \"extension\": [\n {\n \"url\": \"type\",\n \"valueCoding\": {\n \"code\": \"PAF\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType\"\n }\n },\n {\n \"url\": \"value\",\n \"valueString\": \"29706100\"\n }\n ],\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey\"\n }\n ],\n \"id\": \"gDmhc\",\n \"line\": [\n \"BRAMBLE COTTAGE\",\n \"OLD VICARAGE PARK\",\n \"SCAWBY\",\n \"BRIGG\",\n \"S HUMBERSIDE\"\n ],\n \"period\": {\n \"start\": \"2021-09-10\"\n },\n \"postalCode\": \"DN20 9RL\",\n \"use\": \"home\"\n }\n ],\n \"birthDate\": \"2015-09-26\",\n \"gender\": \"female\",\n \"generalPractitioner\": [\n {\n \"id\": \"gDHTb\",\n \"identifier\": {\n \"period\": {\n \"start\": \"2018-08-22\"\n },\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A20047\"\n }\n }\n ],\n \"identifier\": [\n {\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"01\",\n \"display\": \"Number present and verified\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\n \"version\": \"1.0.0\"\n }\n ]\n }\n }\n ],\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n ],\n \"name\": [\n {\n \"family\": \"SHEPP\",\n \"given\": [\n \"Ashley\",\n \"Ellen\"\n ],\n \"period\": {\n \"start\": \"2025-08-06\"\n },\n \"prefix\": [\n \"MS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898717\",\n \"resource\": {\n \"id\": \"9736898717\",\n \"meta\": {\n \"security\": [\n {\n \"code\": \"U\",\n \"display\": \"unrestricted\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-Confidentiality\"\n },\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ],\n \"versionId\": \"4\"\n },\n \"address\": [\n {\n \"extension\": [\n {\n \"extension\": [\n {\n \"url\": \"type\",\n \"valueCoding\": {\n \"code\": \"PAF\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType\"\n }\n },\n {\n \"url\": \"value\",\n \"valueString\": \"16654057\"\n }\n ],\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey\"\n }\n ],\n \"id\": \"YoGEf\",\n \"line\": [\n \"GLENVILLE\",\n \"FERRY ROAD\",\n \"GOXHILL\",\n \"BARROW-UPON-HUMBER\",\n \"S HUMBERSIDE\"\n ],\n \"period\": {\n \"start\": \"2016-04-09\"\n },\n \"postalCode\": \"DN19 7JY\",\n \"use\": \"home\"\n }\n ],\n \"birthDate\": \"2010-05-31\",\n \"gender\": \"male\",\n \"generalPractitioner\": [\n {\n \"id\": \"bYoHa\",\n \"identifier\": {\n \"period\": {\n \"start\": \"2016-02-12\"\n },\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A20047\"\n }\n }\n ],\n \"identifier\": [\n {\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"01\",\n \"display\": \"Number present and verified\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\n \"version\": \"1.0.0\"\n }\n ]\n }\n }\n ],\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n ],\n \"name\": [\n {\n \"family\": \"CASH\",\n \"given\": [\n \"Jacob\",\n \"Chas\"\n ],\n \"period\": {\n \"start\": \"2025-07-22\"\n },\n \"prefix\": [\n \"MR\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" - }, - { - "name": "Proxy roles returned - Include performer details", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "some_token;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9736898148&_include=Consent:performer", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9736898148" - }, - { - "key": "_include", - "value": "Consent:performer" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Date", - "value": "Thu, 04 Dec 2025 10:50:45 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "5289" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "60649be0-6363-4601-b792-d631af45a966" - }, - { - "key": "x-amz-apigw-id", - "value": "VD0cyFTYLPEF-Fg=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-69316784-cee1c757e6d4e43fb4837684" - }, - { - "key": "X-Request-ID", - "value": "8a113b57-8af9-4d34-b300-100c84059319" - }, - { - "key": "X-Correlation-ID", - "value": "a3683a8c-6172-44a7-8410-0e78a705907b" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T10:50:45Z\",\n \"total\": 2,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9736898148&_include=Consent%3Aperformer\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"resource\": {\n \"id\": \"7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T10:46:27Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/b22d6068-fe78-40f4-b71a-b916dac48c0b\",\n \"resource\": {\n \"id\": \"b22d6068-fe78-40f4-b71a-b916dac48c0b\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T10:47:43Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/ZfgKO\",\n \"resource\": {\n \"id\": \"ZfgKO\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/UwTCq\",\n \"resource\": {\n \"id\": \"UwTCq\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" - }, - { - "name": "Proxy roles returned - Include patient and performer details", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "some_token;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9736898148&_include=Consent:performer&_include=Consent:patient", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9736898148" - }, - { - "key": "_include", - "value": "Consent:performer" - }, - { - "key": "_include", - "value": "Consent:patient" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Date", - "value": "Thu, 04 Dec 2025 10:51:06 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "8726" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "2b36e22f-2649-44c9-b3ce-929ea840df0f" - }, - { - "key": "x-amz-apigw-id", - "value": "VD0gJFjQLPEF_Ew=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-6931679a-aa7dfa232b694d8fdbd9823f" - }, - { - "key": "X-Request-ID", - "value": "d5743541-7330-4347-b9c7-9067feb4b144" - }, - { - "key": "X-Correlation-ID", - "value": "af030657-aad8-45f4-9c70-85e4755a189f" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T10:51:06Z\",\n \"total\": 2,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9736898148&_include=Consent%3Aperformer&_include=Consent%3Apatient\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"resource\": {\n \"id\": \"7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T10:46:27Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/b22d6068-fe78-40f4-b71a-b916dac48c0b\",\n \"resource\": {\n \"id\": \"b22d6068-fe78-40f4-b71a-b916dac48c0b\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T10:47:43Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898644\",\n \"resource\": {\n \"id\": \"9736898644\",\n \"meta\": {\n \"security\": [\n {\n \"code\": \"U\",\n \"display\": \"unrestricted\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-Confidentiality\"\n },\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ],\n \"versionId\": \"4\"\n },\n \"address\": [\n {\n \"extension\": [\n {\n \"extension\": [\n {\n \"url\": \"type\",\n \"valueCoding\": {\n \"code\": \"PAF\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType\"\n }\n },\n {\n \"url\": \"value\",\n \"valueString\": \"29706100\"\n }\n ],\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey\"\n }\n ],\n \"id\": \"gDmhc\",\n \"line\": [\n \"BRAMBLE COTTAGE\",\n \"OLD VICARAGE PARK\",\n \"SCAWBY\",\n \"BRIGG\",\n \"S HUMBERSIDE\"\n ],\n \"period\": {\n \"start\": \"2021-09-10\"\n },\n \"postalCode\": \"DN20 9RL\",\n \"use\": \"home\"\n }\n ],\n \"birthDate\": \"2015-09-26\",\n \"gender\": \"female\",\n \"generalPractitioner\": [\n {\n \"id\": \"gDHTb\",\n \"identifier\": {\n \"period\": {\n \"start\": \"2018-08-22\"\n },\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A20047\"\n }\n }\n ],\n \"identifier\": [\n {\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"01\",\n \"display\": \"Number present and verified\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\n \"version\": \"1.0.0\"\n }\n ]\n }\n }\n ],\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n ],\n \"name\": [\n {\n \"family\": \"SHEPP\",\n \"given\": [\n \"Ashley\",\n \"Ellen\"\n ],\n \"period\": {\n \"start\": \"2025-08-06\"\n },\n \"prefix\": [\n \"MS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898717\",\n \"resource\": {\n \"id\": \"9736898717\",\n \"meta\": {\n \"security\": [\n {\n \"code\": \"U\",\n \"display\": \"unrestricted\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-Confidentiality\"\n },\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ],\n \"versionId\": \"4\"\n },\n \"address\": [\n {\n \"extension\": [\n {\n \"extension\": [\n {\n \"url\": \"type\",\n \"valueCoding\": {\n \"code\": \"PAF\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType\"\n }\n },\n {\n \"url\": \"value\",\n \"valueString\": \"16654057\"\n }\n ],\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey\"\n }\n ],\n \"id\": \"YoGEf\",\n \"line\": [\n \"GLENVILLE\",\n \"FERRY ROAD\",\n \"GOXHILL\",\n \"BARROW-UPON-HUMBER\",\n \"S HUMBERSIDE\"\n ],\n \"period\": {\n \"start\": \"2016-04-09\"\n },\n \"postalCode\": \"DN19 7JY\",\n \"use\": \"home\"\n }\n ],\n \"birthDate\": \"2010-05-31\",\n \"gender\": \"male\",\n \"generalPractitioner\": [\n {\n \"id\": \"bYoHa\",\n \"identifier\": {\n \"period\": {\n \"start\": \"2016-02-12\"\n },\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A20047\"\n }\n }\n ],\n \"identifier\": [\n {\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"01\",\n \"display\": \"Number present and verified\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\n \"version\": \"1.0.0\"\n }\n ]\n }\n }\n ],\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n ],\n \"name\": [\n {\n \"family\": \"CASH\",\n \"given\": [\n \"Jacob\",\n \"Chas\"\n ],\n \"period\": {\n \"start\": \"2025-07-22\"\n },\n \"prefix\": [\n \"MR\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/ZfgKO\",\n \"resource\": {\n \"id\": \"ZfgKO\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/UwTCq\",\n \"resource\": {\n \"id\": \"UwTCq\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" - }, - { - "name": "Proxy roles returned - Filtered by status 'inactive'", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "some_token;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9736898156&status=inactive", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9736898156" - }, - { - "key": "status", - "value": "inactive" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Date", - "value": "Thu, 04 Dec 2025 11:09:14 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "1888" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "290a4ffd-6021-435c-af76-8d6c80492b72" - }, - { - "key": "x-amz-apigw-id", - "value": "VD3JoHOkrPEFSoA=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-69316bd6-5bd69e7021cf6e4e0696d153" - }, - { - "key": "X-Request-ID", - "value": "8b8298dc-a9a4-4257-a6b9-f99d5ff65983" - }, - { - "key": "X-Correlation-ID", - "value": "5af5dfe2-b247-4624-8268-bb4e78593eb3" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:09:14Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9736898156&status=inactive\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/750cb586-eb9b-46c7-a1a5-711307a087af\",\n \"resource\": {\n \"id\": \"750cb586-eb9b-46c7-a1a5-711307a087af\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T10:55:53Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898652\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2025-12-05\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"inactive\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n }\n ]\n}" - }, - { - "name": "Proxy roles returned - Filtered by status 'active' and include patient and performer details", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "some_token;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9736898156&status=active&_include=Consent:performer&_include=Consent:patient", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9736898156" - }, - { - "key": "status", - "value": "active" - }, - { - "key": "_include", - "value": "Consent:performer" - }, - { - "key": "_include", - "value": "Consent:patient" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Date", - "value": "Thu, 04 Dec 2025 11:09:41 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "4528" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "44c6f0cf-6bdb-4b96-8889-55ebe68b8c60" - }, - { - "key": "x-amz-apigw-id", - "value": "VD3M5FGYrPEFZVg=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-69316beb-f2f5e05791f831ed34fb0afa" - }, - { - "key": "X-Request-ID", - "value": "73bded49-9645-4418-bf08-ebd13d92c2a1" - }, - { - "key": "X-Correlation-ID", - "value": "15b5d9d5-9909-458a-91c5-64ee20e93a01" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:09:40Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9736898156&status=active&_include=Consent%3Aperformer&_include=Consent%3Apatient\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40\",\n \"resource\": {\n \"id\": \"4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:08:46Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898660\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-12-05\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898660\",\n \"resource\": {\n \"id\": \"9736898660\",\n \"meta\": {\n \"security\": [\n {\n \"code\": \"U\",\n \"display\": \"unrestricted\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-Confidentiality\"\n },\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ],\n \"versionId\": \"4\"\n },\n \"address\": [\n {\n \"extension\": [\n {\n \"extension\": [\n {\n \"url\": \"type\",\n \"valueCoding\": {\n \"code\": \"PAF\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType\"\n }\n },\n {\n \"url\": \"value\",\n \"valueString\": \"19976537\"\n }\n ],\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey\"\n }\n ],\n \"id\": \"pBQDr\",\n \"line\": [\n \"CARLTON\",\n \"VICARAGE LANE\",\n \"REDBOURNE\",\n \"GAINSBOROUGH\",\n \"LINCS\"\n ],\n \"period\": {\n \"start\": \"2025-07-15\"\n },\n \"postalCode\": \"DN21 4QW\",\n \"use\": \"home\"\n }\n ],\n \"birthDate\": \"2012-04-24\",\n \"gender\": \"female\",\n \"generalPractitioner\": [\n {\n \"id\": \"xSEnH\",\n \"identifier\": {\n \"period\": {\n \"start\": \"2024-11-06\"\n },\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A20047\"\n }\n }\n ],\n \"identifier\": [\n {\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"01\",\n \"display\": \"Number present and verified\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\n \"version\": \"1.0.0\"\n }\n ]\n }\n }\n ],\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898660\"\n }\n ],\n \"name\": [\n {\n \"family\": \"GODREY\",\n \"given\": [\n \"Davina\",\n \"Linda\"\n ],\n \"period\": {\n \"start\": \"2017-04-22\"\n },\n \"prefix\": [\n \"MISS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/nVLgl\",\n \"resource\": {\n \"id\": \"nVLgl\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898660\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" - } - ] - }, - { - "name": "Valid request - NPS - Get proxy roles for patient", - "event": [ - { - "listen": "prerequest", - "script": { - "exec": [ - "" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - }, - { - "listen": "test", - "script": { - "exec": [ - "" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "SomeToken;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?patient:identifier=9736898644", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "patient:identifier", - "value": "9736898644" - } - ] - }, - "description": "This request and its examples will only retrieve proxy roles from the National Proxy Store and not directly from GPIT suppliers via NAM.\n\nSee folder level docs for more info.\n\n## Example scenario\n\n**Given** proxy roles exist for a patient in the National Proxy Store (NPS) \n**When** a GET /Consent request is sent with the patient identifier \n**Then** the proxy roles in NPS are returned\n\n## Authorization\n\nPlease see the folder overview for details of how to generate tokens for this endpoint." - }, - "response": [ - { - "name": "Proxy roles returned - No patient or performer details", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "a8fe6a8d-44c5-4451-b8e8-5cf5adc2db03", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "43c2ad8f-43a2-4cfc-8d3a-2b4298ab2b6d", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "some_token;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?patient:identifier=9736898644", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "patient:identifier", - "value": "9736898644" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Date", - "value": "Thu, 04 Dec 2025 11:17:19 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "3484" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "cd84643e-5789-445f-9d2f-eb53fe6b57c5" - }, - { - "key": "x-amz-apigw-id", - "value": "VD4VeEsnLPEFmxA=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-69316dbc-851b7fe822d672bb07d0be6d" - }, - { - "key": "X-Request-ID", - "value": "b7120974-233d-4634-80e2-f404e817f80b" - }, - { - "key": "X-Correlation-ID", - "value": "73e7ab39-f339-4f53-8090-d4320c6a1fc5" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:17:19Z\",\n \"total\": 2,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?patient%3Aidentifier=9736898644\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"resource\": {\n \"id\": \"7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T10:46:27Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"resource\": {\n \"id\": \"553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:15:26Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n }\n ]\n}" - }, - { - "name": "Proxy roles returned - Include performer details", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "some_token;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?patient:identifier=9736898644&_include=Consent:performer", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "patient:identifier", - "value": "9736898644" - }, - { - "key": "_include", - "value": "Consent:performer" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Date", - "value": "Thu, 04 Dec 2025 11:17:45 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "5287" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "d6ea589d-359b-43a5-ac3d-6b570eec9cac" - }, - { - "key": "x-amz-apigw-id", - "value": "VD4YuGlSLPEF7zw=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-69316dd1-47a064ac1a1d588355c13564" - }, - { - "key": "X-Request-ID", - "value": "eb00dad3-5e15-4ade-8ee9-f3597bfab4d3" - }, - { - "key": "X-Correlation-ID", - "value": "a496e8bd-c333-4e87-9927-bbe9ead436a4" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:17:45Z\",\n \"total\": 2,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?patient%3Aidentifier=9736898644&_include=Consent%3Aperformer\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"resource\": {\n \"id\": \"7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T10:46:27Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"resource\": {\n \"id\": \"553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:15:26Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/ZfgKO\",\n \"resource\": {\n \"id\": \"ZfgKO\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/EAONj\",\n \"resource\": {\n \"id\": \"EAONj\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" - }, - { - "name": "Proxy roles returned - Include patient details", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "some_token;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?patient:identifier=9736898644&_include=Consent:patient", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "patient:identifier", - "value": "9736898644" - }, - { - "key": "_include", - "value": "Consent:patient" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Date", - "value": "Thu, 04 Dec 2025 11:18:02 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "5218" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "3a81d012-80ef-4350-8d7b-1f8cda1ef809" - }, - { - "key": "x-amz-apigw-id", - "value": "VD4cPGnErPEFYsw=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-69316de7-bb724d308ffa3272269bfba9" - }, - { - "key": "X-Request-ID", - "value": "ada44c4a-9dcc-4666-a97e-72ebce5630a8" - }, - { - "key": "X-Correlation-ID", - "value": "cfa6112c-4235-41a4-9e58-f4f04d4f7614" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:18:02Z\",\n \"total\": 2,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?patient%3Aidentifier=9736898644&_include=Consent%3Apatient\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"resource\": {\n \"id\": \"7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T10:46:27Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"resource\": {\n \"id\": \"553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:15:26Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898644\",\n \"resource\": {\n \"id\": \"9736898644\",\n \"meta\": {\n \"security\": [\n {\n \"code\": \"U\",\n \"display\": \"unrestricted\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-Confidentiality\"\n },\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ],\n \"versionId\": \"4\"\n },\n \"address\": [\n {\n \"extension\": [\n {\n \"extension\": [\n {\n \"url\": \"type\",\n \"valueCoding\": {\n \"code\": \"PAF\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType\"\n }\n },\n {\n \"url\": \"value\",\n \"valueString\": \"29706100\"\n }\n ],\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey\"\n }\n ],\n \"id\": \"gDmhc\",\n \"line\": [\n \"BRAMBLE COTTAGE\",\n \"OLD VICARAGE PARK\",\n \"SCAWBY\",\n \"BRIGG\",\n \"S HUMBERSIDE\"\n ],\n \"period\": {\n \"start\": \"2021-09-10\"\n },\n \"postalCode\": \"DN20 9RL\",\n \"use\": \"home\"\n }\n ],\n \"birthDate\": \"2015-09-26\",\n \"gender\": \"female\",\n \"generalPractitioner\": [\n {\n \"id\": \"gDHTb\",\n \"identifier\": {\n \"period\": {\n \"start\": \"2018-08-22\"\n },\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A20047\"\n }\n }\n ],\n \"identifier\": [\n {\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"01\",\n \"display\": \"Number present and verified\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\n \"version\": \"1.0.0\"\n }\n ]\n }\n }\n ],\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n ],\n \"name\": [\n {\n \"family\": \"SHEPP\",\n \"given\": [\n \"Ashley\",\n \"Ellen\"\n ],\n \"period\": {\n \"start\": \"2025-08-06\"\n },\n \"prefix\": [\n \"MS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" - }, - { - "name": "Proxy roles returned - Include patient and performer details", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "some_token;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?patient:identifier=9736898644&_include=Consent:performer&_include=Consent:patient", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "patient:identifier", - "value": "9736898644" - }, - { - "key": "_include", - "value": "Consent:performer" - }, - { - "key": "_include", - "value": "Consent:patient" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Date", - "value": "Thu, 04 Dec 2025 11:18:17 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "7021" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "013f49d1-ffbe-4880-bfd6-1b92d13d08a3" - }, - { - "key": "x-amz-apigw-id", - "value": "VD4evE6yLPEFZZA=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-69316df7-175910d69cd894708a0921b9" - }, - { - "key": "X-Request-ID", - "value": "9ce9a6d5-2bd2-4d5e-a984-2c78a457f4d4" - }, - { - "key": "X-Correlation-ID", - "value": "02eabdf7-0a76-4fec-9c99-306273ea8da5" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:18:17Z\",\n \"total\": 2,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?patient%3Aidentifier=9736898644&_include=Consent%3Aperformer&_include=Consent%3Apatient\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"resource\": {\n \"id\": \"7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T10:46:27Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"resource\": {\n \"id\": \"553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:15:26Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898644\",\n \"resource\": {\n \"id\": \"9736898644\",\n \"meta\": {\n \"security\": [\n {\n \"code\": \"U\",\n \"display\": \"unrestricted\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-Confidentiality\"\n },\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ],\n \"versionId\": \"4\"\n },\n \"address\": [\n {\n \"extension\": [\n {\n \"extension\": [\n {\n \"url\": \"type\",\n \"valueCoding\": {\n \"code\": \"PAF\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType\"\n }\n },\n {\n \"url\": \"value\",\n \"valueString\": \"29706100\"\n }\n ],\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey\"\n }\n ],\n \"id\": \"gDmhc\",\n \"line\": [\n \"BRAMBLE COTTAGE\",\n \"OLD VICARAGE PARK\",\n \"SCAWBY\",\n \"BRIGG\",\n \"S HUMBERSIDE\"\n ],\n \"period\": {\n \"start\": \"2021-09-10\"\n },\n \"postalCode\": \"DN20 9RL\",\n \"use\": \"home\"\n }\n ],\n \"birthDate\": \"2015-09-26\",\n \"gender\": \"female\",\n \"generalPractitioner\": [\n {\n \"id\": \"gDHTb\",\n \"identifier\": {\n \"period\": {\n \"start\": \"2018-08-22\"\n },\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A20047\"\n }\n }\n ],\n \"identifier\": [\n {\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"01\",\n \"display\": \"Number present and verified\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\n \"version\": \"1.0.0\"\n }\n ]\n }\n }\n ],\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n ],\n \"name\": [\n {\n \"family\": \"SHEPP\",\n \"given\": [\n \"Ashley\",\n \"Ellen\"\n ],\n \"period\": {\n \"start\": \"2025-08-06\"\n },\n \"prefix\": [\n \"MS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/ZfgKO\",\n \"resource\": {\n \"id\": \"ZfgKO\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/EAONj\",\n \"resource\": {\n \"id\": \"EAONj\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" - }, - { - "name": "Proxy roles returned - Filtered by status 'inactive'", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "some_token;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?patient:identifier=9736898717&status=inactive", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "patient:identifier", - "value": "9736898717" - }, - { - "key": "status", - "value": "inactive" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Date", - "value": "Thu, 04 Dec 2025 11:18:37 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "1886" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "595418c1-5c22-46b6-907c-e799e9fdf609" - }, - { - "key": "x-amz-apigw-id", - "value": "VD4iFHTWLPEFnHA=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-69316e0c-b334c67c9e4d72fd5809672a" - }, - { - "key": "X-Request-ID", - "value": "e6ad06af-45a7-4f98-92c2-88300871c3bc" - }, - { - "key": "X-Correlation-ID", - "value": "8d75c837-bd9e-4784-ac40-84322ee4d188" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:18:37Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?patient%3Aidentifier=9736898717&status=inactive\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/cf7bc8e6-f8e0-41c5-8d08-1741eee5a256\",\n \"resource\": {\n \"id\": \"cf7bc8e6-f8e0-41c5-8d08-1741eee5a256\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:16:43Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"inactive\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n }\n ]\n}" - }, - { - "name": "Proxy roles returned - Filtered by status 'active' and include patient and performer details", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "some_token;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?patient:identifier=9736898717&status=active&_include=Consent:performer&_include=Consent:patient", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "patient:identifier", - "value": "9736898717" - }, - { - "key": "status", - "value": "active" - }, - { - "key": "_include", - "value": "Consent:performer" - }, - { - "key": "_include", - "value": "Consent:patient" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Date", - "value": "Thu, 04 Dec 2025 11:18:51 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "4528" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "bd5079fb-1fc3-428c-ab53-5ba1dfacc510" - }, - { - "key": "x-amz-apigw-id", - "value": "VD4kRHuoLPEF-DQ=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-69316e1a-0dc7c19d64d48ad8a86c4518" - }, - { - "key": "X-Request-ID", - "value": "8da5a25e-ef8b-4cec-84c0-81af22e5132f" - }, - { - "key": "X-Correlation-ID", - "value": "ce7840a8-db71-4897-9853-d06c699adca9" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:18:51Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?patient%3Aidentifier=9736898717&status=active&_include=Consent%3Aperformer&_include=Consent%3Apatient\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/b22d6068-fe78-40f4-b71a-b916dac48c0b\",\n \"resource\": {\n \"id\": \"b22d6068-fe78-40f4-b71a-b916dac48c0b\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T10:47:43Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898717\",\n \"resource\": {\n \"id\": \"9736898717\",\n \"meta\": {\n \"security\": [\n {\n \"code\": \"U\",\n \"display\": \"unrestricted\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-Confidentiality\"\n },\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ],\n \"versionId\": \"4\"\n },\n \"address\": [\n {\n \"extension\": [\n {\n \"extension\": [\n {\n \"url\": \"type\",\n \"valueCoding\": {\n \"code\": \"PAF\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType\"\n }\n },\n {\n \"url\": \"value\",\n \"valueString\": \"16654057\"\n }\n ],\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey\"\n }\n ],\n \"id\": \"YoGEf\",\n \"line\": [\n \"GLENVILLE\",\n \"FERRY ROAD\",\n \"GOXHILL\",\n \"BARROW-UPON-HUMBER\",\n \"S HUMBERSIDE\"\n ],\n \"period\": {\n \"start\": \"2016-04-09\"\n },\n \"postalCode\": \"DN19 7JY\",\n \"use\": \"home\"\n }\n ],\n \"birthDate\": \"2010-05-31\",\n \"gender\": \"male\",\n \"generalPractitioner\": [\n {\n \"id\": \"bYoHa\",\n \"identifier\": {\n \"period\": {\n \"start\": \"2016-02-12\"\n },\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A20047\"\n }\n }\n ],\n \"identifier\": [\n {\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"01\",\n \"display\": \"Number present and verified\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\n \"version\": \"1.0.0\"\n }\n ]\n }\n }\n ],\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n ],\n \"name\": [\n {\n \"family\": \"CASH\",\n \"given\": [\n \"Jacob\",\n \"Chas\"\n ],\n \"period\": {\n \"start\": \"2025-07-22\"\n },\n \"prefix\": [\n \"MR\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/UwTCq\",\n \"resource\": {\n \"id\": \"UwTCq\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" - } - ] - }, - { - "name": "Valid request - NPS - Get proxy roles for patient and proxy", - "event": [ - { - "listen": "prerequest", - "script": { - "exec": [ - "" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - }, - { - "listen": "test", - "script": { - "exec": [ - "" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "SomeToken;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9736898121&patient:identifier=9736898644", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9736898121" - }, - { - "key": "patient:identifier", - "value": "9736898644" - } - ] - }, - "description": "This request and its examples will only retrieve proxy roles from the National Proxy Store and not directly from GPIT suppliers via NAM.\n\nSee folder level docs for more info.\n\n## Example scenario\n\n**Given** proxy roles exist for a patient in the National Proxy Store (NPS) \n**When** a GET /Consent request is sent with the performer and patient identifier \n**Then** a single proxy role from NPS is returned\n\n## Authorization\n\nPlease see the folder overview for details of how to generate tokens for this endpoint." - }, - "response": [ - { - "name": "Proxy roles returned - No patient or performer details", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "4d896833-170b-4dc9-a455-66db155cb5c1", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "1525b9dd-abde-44c0-a226-c93af7e47d8e", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "some_token;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9736898121&patient:identifier=9736898644", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9736898121" - }, - { - "key": "patient:identifier", - "value": "9736898644" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Date", - "value": "Thu, 04 Dec 2025 11:19:27 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "1902" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "3d56eb4c-4bc0-47d8-bc61-a55b098dfd9c" - }, - { - "key": "x-amz-apigw-id", - "value": "VD4p_GRgrPEFVPA=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-69316e3f-6ddd811fdb997165b9c6a0d5" - }, - { - "key": "X-Request-ID", - "value": "f8ac2f03-2a5f-4ff7-8ada-093f55fb9c38" - }, - { - "key": "X-Correlation-ID", - "value": "8fc4ed98-4b94-41e1-bff0-0065b6058201" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:19:27Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9736898121&patient%3Aidentifier=9736898644\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"resource\": {\n \"id\": \"553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:15:26Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n }\n ]\n}" - }, - { - "name": "Proxy roles returned - Include performer details", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "some_token;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9736898121&patient:identifier=9736898644&_include=Consent:performer", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9736898121" - }, - { - "key": "patient:identifier", - "value": "9736898644" - }, - { - "key": "_include", - "value": "Consent:performer" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Date", - "value": "Thu, 04 Dec 2025 11:19:44 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "2818" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "12da5c87-c8eb-4085-ad09-ab9df3923150" - }, - { - "key": "x-amz-apigw-id", - "value": "VD4slFJ5rPEF6Mg=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-69316e50-a15563e078d9633ab0d45fb6" - }, - { - "key": "X-Request-ID", - "value": "51afba5e-eea1-415e-a0c3-bc5d47e884fd" - }, - { - "key": "X-Correlation-ID", - "value": "c31bc807-8bc9-4aa5-b531-f44fbfeeef0c" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:19:44Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9736898121&patient%3Aidentifier=9736898644&_include=Consent%3Aperformer\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"resource\": {\n \"id\": \"553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:15:26Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/EAONj\",\n \"resource\": {\n \"id\": \"EAONj\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" - }, - { - "name": "Proxy roles returned - Include patient details", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "some_token;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9736898121&patient:identifier=9736898644&_include=Consent:patient", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9736898121" - }, - { - "key": "patient:identifier", - "value": "9736898644" - }, - { - "key": "_include", - "value": "Consent:patient" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Date", - "value": "Thu, 04 Dec 2025 11:19:57 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "3636" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "341e64dd-974f-4307-a16b-e775c0777fdd" - }, - { - "key": "x-amz-apigw-id", - "value": "VD4uhGhjLPEF8-A=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-69316e5c-16469b05761a5ee0d5ffe220" - }, - { - "key": "X-Request-ID", - "value": "2762b971-bfcc-42c6-be87-b2d2a98cf5b5" - }, - { - "key": "X-Correlation-ID", - "value": "94e42484-2c4d-46fc-8364-027c06a21798" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:19:56Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9736898121&patient%3Aidentifier=9736898644&_include=Consent%3Apatient\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"resource\": {\n \"id\": \"553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:15:26Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898644\",\n \"resource\": {\n \"id\": \"9736898644\",\n \"meta\": {\n \"security\": [\n {\n \"code\": \"U\",\n \"display\": \"unrestricted\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-Confidentiality\"\n },\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ],\n \"versionId\": \"4\"\n },\n \"address\": [\n {\n \"extension\": [\n {\n \"extension\": [\n {\n \"url\": \"type\",\n \"valueCoding\": {\n \"code\": \"PAF\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType\"\n }\n },\n {\n \"url\": \"value\",\n \"valueString\": \"29706100\"\n }\n ],\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey\"\n }\n ],\n \"id\": \"gDmhc\",\n \"line\": [\n \"BRAMBLE COTTAGE\",\n \"OLD VICARAGE PARK\",\n \"SCAWBY\",\n \"BRIGG\",\n \"S HUMBERSIDE\"\n ],\n \"period\": {\n \"start\": \"2021-09-10\"\n },\n \"postalCode\": \"DN20 9RL\",\n \"use\": \"home\"\n }\n ],\n \"birthDate\": \"2015-09-26\",\n \"gender\": \"female\",\n \"generalPractitioner\": [\n {\n \"id\": \"gDHTb\",\n \"identifier\": {\n \"period\": {\n \"start\": \"2018-08-22\"\n },\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A20047\"\n }\n }\n ],\n \"identifier\": [\n {\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"01\",\n \"display\": \"Number present and verified\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\n \"version\": \"1.0.0\"\n }\n ]\n }\n }\n ],\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n ],\n \"name\": [\n {\n \"family\": \"SHEPP\",\n \"given\": [\n \"Ashley\",\n \"Ellen\"\n ],\n \"period\": {\n \"start\": \"2025-08-06\"\n },\n \"prefix\": [\n \"MS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" - }, - { - "name": "Proxy roles returned - Include patient and performer details", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "some_token;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9736898121&patient:identifier=9736898644&_include=Consent:performer&_include=Consent:patient", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9736898121" - }, - { - "key": "patient:identifier", - "value": "9736898644" - }, - { - "key": "_include", - "value": "Consent:performer" - }, - { - "key": "_include", - "value": "Consent:patient" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Date", - "value": "Thu, 04 Dec 2025 11:20:24 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "4552" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "306d5243-752e-45e4-9c44-f175a008c1de" - }, - { - "key": "x-amz-apigw-id", - "value": "VD4y2Gg1rPEFcxQ=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-69316e78-df1338116d16a7272e1de2dc" - }, - { - "key": "X-Request-ID", - "value": "b05f7a59-c008-47d8-868c-011cbdf17500" - }, - { - "key": "X-Correlation-ID", - "value": "95f4ebb0-274e-4757-91f3-91a5fc0a3f0f" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:20:24Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9736898121&patient%3Aidentifier=9736898644&_include=Consent%3Aperformer&_include=Consent%3Apatient\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"resource\": {\n \"id\": \"553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:15:26Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898644\",\n \"resource\": {\n \"id\": \"9736898644\",\n \"meta\": {\n \"security\": [\n {\n \"code\": \"U\",\n \"display\": \"unrestricted\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-Confidentiality\"\n },\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ],\n \"versionId\": \"4\"\n },\n \"address\": [\n {\n \"extension\": [\n {\n \"extension\": [\n {\n \"url\": \"type\",\n \"valueCoding\": {\n \"code\": \"PAF\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType\"\n }\n },\n {\n \"url\": \"value\",\n \"valueString\": \"29706100\"\n }\n ],\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey\"\n }\n ],\n \"id\": \"gDmhc\",\n \"line\": [\n \"BRAMBLE COTTAGE\",\n \"OLD VICARAGE PARK\",\n \"SCAWBY\",\n \"BRIGG\",\n \"S HUMBERSIDE\"\n ],\n \"period\": {\n \"start\": \"2021-09-10\"\n },\n \"postalCode\": \"DN20 9RL\",\n \"use\": \"home\"\n }\n ],\n \"birthDate\": \"2015-09-26\",\n \"gender\": \"female\",\n \"generalPractitioner\": [\n {\n \"id\": \"gDHTb\",\n \"identifier\": {\n \"period\": {\n \"start\": \"2018-08-22\"\n },\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A20047\"\n }\n }\n ],\n \"identifier\": [\n {\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"01\",\n \"display\": \"Number present and verified\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\n \"version\": \"1.0.0\"\n }\n ]\n }\n }\n ],\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n ],\n \"name\": [\n {\n \"family\": \"SHEPP\",\n \"given\": [\n \"Ashley\",\n \"Ellen\"\n ],\n \"period\": {\n \"start\": \"2025-08-06\"\n },\n \"prefix\": [\n \"MS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/EAONj\",\n \"resource\": {\n \"id\": \"EAONj\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" - }, - { - "name": "Proxy roles returned - Filtered by status 'inactive'", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "some_token;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9736898156&patient:identifier=9736898652&status=inactive", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9736898156" - }, - { - "key": "patient:identifier", - "value": "9736898652" - }, - { - "key": "status", - "value": "inactive" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Date", - "value": "Thu, 04 Dec 2025 11:21:09 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "1920" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "24bfc7a0-5f30-47b4-a751-7534837f5224" - }, - { - "key": "x-amz-apigw-id", - "value": "VD455ErXrPEFuaQ=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-69316ea5-6c272d90a7d3656142da3073" - }, - { - "key": "X-Request-ID", - "value": "67a71930-24b3-4baa-8b13-65f27c413a41" - }, - { - "key": "X-Correlation-ID", - "value": "dd934795-88bf-44a3-a2c3-eff757413bfb" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:21:09Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9736898156&patient%3Aidentifier=9736898652&status=inactive\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/750cb586-eb9b-46c7-a1a5-711307a087af\",\n \"resource\": {\n \"id\": \"750cb586-eb9b-46c7-a1a5-711307a087af\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T10:55:53Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898652\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2025-12-05\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"inactive\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n }\n ]\n}" - }, - { - "name": "Proxy roles returned - Filtered by status 'active' and include patient and performer details", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "some_token;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9736898156&patient:identifier=9736898652&status=active&_include=Consent:performer&_include=Consent:patient", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9736898156" - }, - { - "key": "patient:identifier", - "value": "9736898652" - }, - { - "key": "status", - "value": "active" - }, - { - "key": "_include", - "value": "Consent:performer" - }, - { - "key": "_include", - "value": "Consent:patient" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Date", - "value": "Thu, 04 Dec 2025 11:21:28 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "2038" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "f44b69f0-f814-4e0f-89eb-349f1f7e143d" - }, - { - "key": "x-amz-apigw-id", - "value": "VD48uEKHLPEF67A=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-69316eb7-00b15aebe653e94192bc60ee" - }, - { - "key": "X-Request-ID", - "value": "8f40b74e-99fa-4401-bcf1-def08a63da50" - }, - { - "key": "X-Correlation-ID", - "value": "1460d166-ba8d-4d1c-8822-83394abe1169" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:21:27Z\",\n \"total\": 0,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9736898156&patient%3Aidentifier=9736898652&status=active&_include=Consent%3Aperformer&_include=Consent%3Apatient\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898652\",\n \"resource\": {\n \"id\": \"9736898652\",\n \"meta\": {\n \"security\": [\n {\n \"code\": \"U\",\n \"display\": \"unrestricted\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-Confidentiality\"\n },\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ],\n \"versionId\": \"4\"\n },\n \"address\": [\n {\n \"extension\": [\n {\n \"extension\": [\n {\n \"url\": \"type\",\n \"valueCoding\": {\n \"code\": \"PAF\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType\"\n }\n },\n {\n \"url\": \"value\",\n \"valueString\": \"6290975\"\n }\n ],\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey\"\n }\n ],\n \"id\": \"RPnzd\",\n \"line\": [\n \"77 ANGERSTEIN ROAD\",\n \"SCUNTHORPE\",\n \"S HUMBERSIDE\"\n ],\n \"period\": {\n \"start\": \"2019-11-10\"\n },\n \"postalCode\": \"DN17 2NB\",\n \"use\": \"home\"\n }\n ],\n \"birthDate\": \"2013-09-02\",\n \"gender\": \"female\",\n \"generalPractitioner\": [\n {\n \"id\": \"yIjPV\",\n \"identifier\": {\n \"period\": {\n \"start\": \"2021-01-07\"\n },\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A20047\"\n }\n }\n ],\n \"identifier\": [\n {\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"01\",\n \"display\": \"Number present and verified\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\n \"version\": \"1.0.0\"\n }\n ]\n }\n }\n ],\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898652\"\n }\n ],\n \"name\": [\n {\n \"family\": \"CLYDE\",\n \"given\": [\n \"Deanne\",\n \"Tara\"\n ],\n \"period\": {\n \"start\": \"2018-06-16\"\n },\n \"prefix\": [\n \"MS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" - } - ] - }, - { - "name": "Valid request - NAM - Get proxy roles", - "event": [ - { - "listen": "prerequest", - "script": { - "exec": [ - "" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - }, - { - "listen": "test", - "script": { - "exec": [ - "" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "{{tpp_9674998535_access_token}};A82648", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=false;nam-cache-enabled=false;nam-enabled=true;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9674998535", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9674998535" - } - ] - }, - "description": "This request and its examples will only retrieve proxy roles directly from GPIT suppliers via NAM and not from the National Proxy Store.\n\nSee folder level docs for more info.\n\n## Example scenario\n\n**Given** proxy roles exist for a patient/performer in a GPIT system \n**And** no proxy roles exist in the National Proxy Store (NPS) for the patient/performer \n**When** a GET /Consent request is sent with the performer/patient identifier \n**Then** the proxy roles from GPIT are returned\n\n## Authorization\n\nPlease see the folder overview for details of how to generate tokens for this endpoint." - }, - "response": [ - { - "name": "No linked profiles returned from NAM - TPP user", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "83892b1a-6369-4657-a0c3-f6071a25e226", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "b496d552-f0c3-4e20-b362-cfc0c80724e3", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "{{tpp_9674998535_access_token}};A82648", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=false;nam-cache-enabled=false;nam-enabled=true;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9674998535&_include=Consent:performer&_include=Consent:patient", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9674998535" - }, - { - "key": "_include", - "value": "Consent:performer" - }, - { - "key": "_include", - "value": "Consent:patient" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Date", - "value": "Thu, 04 Dec 2025 11:22:00 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "5773" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "94465816-7aaa-4d03-81c9-e19156606316" - }, - { - "key": "x-amz-apigw-id", - "value": "VD5BAEGOLPEFVPA=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-69316ed8-af72bfe69942b25c155a4daa" - }, - { - "key": "X-Request-ID", - "value": "ed28025a-9c27-468c-85fd-9b1b8f794198" - }, - { - "key": "X-Correlation-ID", - "value": "fbd025d4-c7e1-4085-8bf8-d11b84652f8d" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:22:00Z\",\n \"total\": 2,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9674998535&_include=Consent%3Aperformer&_include=Consent%3Apatient\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/3a86ad92\",\n \"resource\": {\n \"id\": \"3a86ad92\",\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:21:58.915488+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9692113736\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998535\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998535\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/5c0c47d9\",\n \"resource\": {\n \"id\": \"5c0c47d9\",\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:21:58.915640+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998454\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998535\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998535\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/0b36c4e0\",\n \"resource\": {\n \"id\": \"0b36c4e0\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998535\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9692113736\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/bd6da0a0\",\n \"resource\": {\n \"id\": \"bd6da0a0\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998535\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998454\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/e41dfa63\",\n \"resource\": {\n \"id\": \"e41dfa63\",\n \"meta\": {\n \"profile\": [\n \"https://fhir.hl7.org.uk/StructureDefinition/UKCore-Patient\"\n ],\n \"security\": [\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ]\n },\n \"birthDate\": \"1985-05-29\",\n \"generalPractitioner\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A82648\"\n }\n }\n ],\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9692113736\"\n }\n ],\n \"name\": [\n {\n \"text\": \"Mr Kevin Barry\",\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/2d10a3d9\",\n \"resource\": {\n \"id\": \"2d10a3d9\",\n \"meta\": {\n \"profile\": [\n \"https://fhir.hl7.org.uk/StructureDefinition/UKCore-Patient\"\n ],\n \"security\": [\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ]\n },\n \"birthDate\": \"1921-10-17\",\n \"generalPractitioner\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A82648\"\n }\n }\n ],\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998454\"\n }\n ],\n \"name\": [\n {\n \"text\": \"Mr Landon Fahey\",\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" - }, - { - "name": "Linked profiles returned from NAM - TPP user", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "{{tpp_9674998454_access_token}};A82648", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=false;nam-cache-enabled=false;nam-enabled=true;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9674998454&_include=Consent:patient", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9674998454" - }, - { - "key": "_include", - "value": "Consent:patient" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Date", - "value": "Thu, 04 Dec 2025 11:22:15 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "4370" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "1b190446-e56f-4a64-8c54-25688af8f8f7" - }, - { - "key": "x-amz-apigw-id", - "value": "VD5EAFv1rPEF7zw=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-69316ee6-9925773ab605850282f2d18c" - }, - { - "key": "X-Request-ID", - "value": "dfa182c6-8f6a-46e9-bdc1-1ef5a00740c1" - }, - { - "key": "X-Correlation-ID", - "value": "d50ce1da-c025-451c-847e-c405c299115f" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:22:15Z\",\n \"total\": 2,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9674998454&_include=Consent%3Apatient\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/92a66114\",\n \"resource\": {\n \"id\": \"92a66114\",\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:22:15.290954+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998640\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998454\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998454\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/0b02be0a\",\n \"resource\": {\n \"id\": \"0b02be0a\",\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:22:15.290994+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998543\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998454\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998454\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/934bfd54\",\n \"resource\": {\n \"id\": \"934bfd54\",\n \"meta\": {\n \"profile\": [\n \"https://fhir.hl7.org.uk/StructureDefinition/UKCore-Patient\"\n ],\n \"security\": [\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ]\n },\n \"birthDate\": \"1998-11-14\",\n \"generalPractitioner\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A82648\"\n }\n }\n ],\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998640\"\n }\n ],\n \"name\": [\n {\n \"text\": \"Mr Harry Hood\",\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/29b6ab39\",\n \"resource\": {\n \"id\": \"29b6ab39\",\n \"meta\": {\n \"profile\": [\n \"https://fhir.hl7.org.uk/StructureDefinition/UKCore-Patient\"\n ],\n \"security\": [\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ]\n },\n \"birthDate\": \"1930-11-02\",\n \"generalPractitioner\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A82648\"\n }\n }\n ],\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998543\"\n }\n ],\n \"name\": [\n {\n \"text\": \"Miss Lisa Hankey\",\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" - }, - { - "name": "No linked profiles returned from NAM - EMIS user", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "{{emis_9692113612_access_token}};A29928", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=false;nam-cache-enabled=false;nam-enabled=true;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9692113612&_include=Consent:patient", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9692113612" - }, - { - "key": "_include", - "value": "Consent:patient" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Date", - "value": "Thu, 04 Dec 2025 11:22:37 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "283" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "15121c1a-99de-4830-86c7-00925d4faf3a" - }, - { - "key": "x-amz-apigw-id", - "value": "VD5HEE6MLPEFz5w=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-69316ef9-58a10d83bc130c381cdb0b44" - }, - { - "key": "X-Request-ID", - "value": "1828501c-86dc-4baf-9a13-e37a822e327f" - }, - { - "key": "X-Correlation-ID", - "value": "b891fe97-7778-4db5-be39-b23c03879d2d" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:22:36Z\",\n \"total\": 0,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9692113612&_include=Consent%3Apatient\"\n }\n ],\n \"entry\": []\n}" - }, - { - "name": "Linked profiles returned from NAM - EMIS user", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "{{emis_9692113698_access_token}};A00002", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=false;nam-cache-enabled=false;nam-enabled=true;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9692113698&_include=Consent:performer", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9692113698" - }, - { - "key": "_include", - "value": "Consent:patient", - "disabled": true - }, - { - "key": "_include", - "value": "Consent:performer" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Date", - "value": "Thu, 04 Dec 2025 11:24:08 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "17617" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "739313dc-9917-4df2-9b9d-e59bf36d8c4e" - }, - { - "key": "x-amz-apigw-id", - "value": "VD5U-FHkLPEF0fw=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-69316f52-1205235fe7d41983ba807831" - }, - { - "key": "X-Request-ID", - "value": "2eb98c87-f421-4902-a885-ecc408bd8d89" - }, - { - "key": "X-Correlation-ID", - "value": "4ac19b94-25d4-4de6-9be6-fe5a4a520d15" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:24:08Z\",\n \"total\": 9,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9692113698&_include=Consent%3Aperformer\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/2993b769\",\n \"resource\": {\n \"id\": \"2993b769\",\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:24:07.874676+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9661034451\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/c0d48822\",\n \"resource\": {\n \"id\": \"c0d48822\",\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:24:07.874715+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998403\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/75d0c9dc\",\n \"resource\": {\n \"id\": \"75d0c9dc\",\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:24:07.874739+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9661034400\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/2bed6c1e\",\n \"resource\": {\n \"id\": \"2bed6c1e\",\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:24:07.874762+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9661034168\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/ed77c791\",\n \"resource\": {\n \"id\": \"ed77c791\",\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:24:07.874785+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9253046414\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/02e9fe06\",\n \"resource\": {\n \"id\": \"02e9fe06\",\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:24:07.874807+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9930725970\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/70f274ba\",\n \"resource\": {\n \"id\": \"70f274ba\",\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:24:07.874830+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9803007025\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/87501704\",\n \"resource\": {\n \"id\": \"87501704\",\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:24:07.874852+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9734615173\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/022a7290\",\n \"resource\": {\n \"id\": \"022a7290\",\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:24:07.874874+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9694154065\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/4931d7ae\",\n \"resource\": {\n \"id\": \"4931d7ae\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9661034451\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/34e6ba88\",\n \"resource\": {\n \"id\": \"34e6ba88\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998403\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/1b0f7204\",\n \"resource\": {\n \"id\": \"1b0f7204\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9661034400\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/7115d670\",\n \"resource\": {\n \"id\": \"7115d670\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9661034168\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/63bd0423\",\n \"resource\": {\n \"id\": \"63bd0423\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9253046414\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/04683858\",\n \"resource\": {\n \"id\": \"04683858\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9930725970\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/e0cff956\",\n \"resource\": {\n \"id\": \"e0cff956\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9803007025\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/a9f54c1c\",\n \"resource\": {\n \"id\": \"a9f54c1c\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9734615173\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/8b794ba5\",\n \"resource\": {\n \"id\": \"8b794ba5\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9694154065\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" - } - ] - }, - { - "name": "Valid request - No proxy roles returned - Get proxy roles", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - }, - { - "listen": "prerequest", - "script": { - "exec": [ - "" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "SomeToken;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?patient:identifier=9736898199", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "patient:identifier", - "value": "9736898199" - } - ] - }, - "description": "## Example scenario\n\n**Given** no proxy roles exist for a patient/performer in NPS or GPIT systems \n**When** a GET /Consent request is sent with the performer/patient identifier \n**Then** no proxy roles are returned\n\n## Authorization\n\nPlease see the folder overview for details of how to generate tokens for this endpoint." - }, - "response": [ - { - "name": "No roles returned", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "b8b052ae-6841-4b64-bdf0-c969d32d94bd", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "e9920101-1ae7-4644-8ae9-5298f7bdda3b", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "SomeToken;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?patient:identifier=9736898199", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "patient:identifier", - "value": "9736898199" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Thu, 27 Nov 2025 15:20:11 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "254" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "62f7a9ef-477a-4a24-8bba-c3da1f684805" - }, - { - "key": "x-amz-apigw-id", - "value": "UtXWqH7MLPEFkaw=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-69286c2a-60c4f8c5c094e6753e2352ce" - }, - { - "key": "X-Request-ID", - "value": "31683198-4901-4516-8522-baf7a3de343a" - }, - { - "key": "X-Correlation-ID", - "value": "bdc29a81-c2c3-4622-b1cb-6b0d939ef622" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2025-11-27T15:20:11Z\",\n \"total\": 0,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?patient%3Aidentifier=9736898199\"\n }\n ],\n \"entry\": []\n}" - } - ] - }, - { - "name": "Invalid status parameter - Get proxy roles", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "SomeToken;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?patient:identifier=9736898199&status=test", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "patient:identifier", - "value": "9736898199" - }, - { - "key": "status", - "value": "test" - } - ] - }, - "description": "## Example scenario\n\n**Given** proxy roles exist for a patient/performer in NPS or a GPIT system \n**When** a GET /Consent request is sent with an invalid status parameter \n**Then** a 422 error is returned with the detail 'Required parameter(s) are invalid.'\n\n## Authorization\n\nPlease see the folder overview for details of how to generate tokens for this endpoint." - }, - "response": [ - { - "name": "Invalid status parameter error returned", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "dcc26889-b2fe-4794-9531-88c887f7e134", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "91e70db5-6a5d-4382-bfc1-027d2b81bc3c", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "SomeToken;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?patient:identifier=9736898199&status=test", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "patient:identifier", - "value": "9736898199" - }, - { - "key": "status", - "value": "test" - } - ] - } - }, - "status": "Unprocessable Entity (WebDAV) (RFC 4918)", - "code": 422, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Thu, 27 Nov 2025 16:45:57 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "375" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "072d3fa4-9703-4b80-88ba-e679c01b3129" - }, - { - "key": "x-amz-apigw-id", - "value": "Utj6vHGjLPEFvyQ=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-69288044-9a8fa9560202aeb1b9390e51" - }, - { - "key": "X-Request-ID", - "value": "0437a831-fa18-43ca-a376-21b2a8f33900" - }, - { - "key": "X-Correlation-ID", - "value": "8cf2b8d1-d98e-4b93-bb62-34583b31f0ea" - }, - { - "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_PARAMETER\",\n \"display\": \"Required parameter(s) are invalid.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"Invalid request with error - status parameter is invalid.\",\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" - } - ] - }, - { - "name": "Invalid include parameter - Get proxy roles", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "SomeToken;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9736898148&_include=Consent:test", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9736898148" - }, - { - "key": "_include", - "value": "Consent:test" - } - ] - }, - "description": "## Gherkin scenario\n\n**Given** proxy roles exist for a patient/performer in NPS or a GPIT system \n**When** a GET /Consent request is sent with an invalid include parameter \n**Then** a 422 error is returned with the detail 'Required parameter(s) are invalid.'\n\n## Authorization\n\nPlease see the folder overview for details of how to generate tokens for this endpoint." - }, - "response": [ - { - "name": "Invalid include parameter error returned", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "b14c0f0f-ad95-45e4-9b2a-9286fb050453", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "e7e0d226-d580-44a6-8688-2aeb0deedf00", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "SomeToken;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9736898148&_include=Consent:test", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9736898148" - }, - { - "key": "_include", - "value": "Consent:test" - } - ] - } - }, - "status": "Unprocessable Entity (WebDAV) (RFC 4918)", - "code": 422, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Thu, 27 Nov 2025 16:46:36 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "377" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "e9f62008-61ec-417a-8231-506b51d07844" - }, - { - "key": "x-amz-apigw-id", - "value": "UtkBAFkIrPEFuvQ=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-6928806c-3f5337b27e75f90c703fd6b0" - }, - { - "key": "X-Request-ID", - "value": "fb15a103-bf9a-499e-a7b1-24dc6563eb13" - }, - { - "key": "X-Correlation-ID", - "value": "f5ec5ae0-c762-4efb-95e3-317628c5cd80" - }, - { - "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_PARAMETER\",\n \"display\": \"Required parameter(s) are invalid.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"Invalid request with error - _include parameter is invalid.\",\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" - } - ] - }, - { - "name": "Invalid performer identifier - Get proxy roles", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "SomeToken;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=90000000", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "90000000" - } - ] - }, - "description": "## Example scenario\n\n**Given** proxy roles exist for a patient/performer in NPS or a GPIT system \n**When** a GET /Consent request is sent with an invalid performer identifier \n**Then** a 422 error is returned with the detail 'Required parameter(s) are invalid.'\n\n## Authorization\n\nPlease see the folder overview for details of how to generate tokens for this endpoint." - }, - "response": [ - { - "name": "Invalid performer identifier returned", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "6e975672-d1b4-402c-b47d-0994d55e1517", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "268d0936-6ffb-474a-a7bf-f44d4214e36e", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "SomeToken;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=90000000", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "90000000" - } - ] - } - }, - "status": "Unprocessable Entity (WebDAV) (RFC 4918)", - "code": 422, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Thu, 27 Nov 2025 16:47:01 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "428" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "2c57ff69-fe19-498b-8163-00b392e47313" - }, - { - "key": "x-amz-apigw-id", - "value": "UtkE-EaXLPEFV9Q=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-69288085-dfbdd45a57543fb9bb4ebd8b" - }, - { - "key": "X-Request-ID", - "value": "2d274752-140d-49de-ab31-56012d28c2cb" - }, - { - "key": "X-Correlation-ID", - "value": "7187bca7-8d57-4561-b0f2-a5aba91ec94c" - }, - { - "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_IDENTIFIER_VALUE\",\n \"display\": \"Required parameter(s) are invalid.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"Invalid request with error - performer:identifier or patient:identifier parameter is invalid.\",\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" - } - ] - }, - { - "name": "Invalid performer identifier system - Get proxy roles", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "SomeToken;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=invalid|9736898199", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "invalid|9736898199" - } - ] - }, - "description": "## Example scenario\n\n**Given** proxy roles exist for a patient/performer in NPS or a GPIT system \n**When** a GET /Consent request is sent with an invalid performer identifier system \n**Then** a 422 error is returned with the detail 'Required parameter(s) are invalid.'\n\n## Authorization\n\nPlease see the folder overview for details of how to generate tokens for this endpoint." - }, - "response": [ - { - "name": "Invalid performer identifier system error returned", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "995e5222-fce7-40e2-8424-1e920d920491", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "16ec5418-1591-45f7-a84c-e95cbcd5cd67", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "SomeToken;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=invalid|9736898199", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "invalid|9736898199" - } - ] - } - }, - "status": "Unprocessable Entity (WebDAV) (RFC 4918)", - "code": 422, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Thu, 27 Nov 2025 16:47:46 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "426" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "8a8529b6-34ac-46b1-8868-0a6ec0440151" - }, - { - "key": "x-amz-apigw-id", - "value": "UtkL-HDVLPEFVxg=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-692880b2-6286da8b511f08a6d7ccf9db" - }, - { - "key": "X-Request-ID", - "value": "9cc2d0ef-8f7a-46b7-89c9-c884bf61cc3a" - }, - { - "key": "X-Correlation-ID", - "value": "57948f02-5db0-4267-a6b7-cae30485e5eb" - }, - { - "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_IDENTIFIER_SYSTEM\",\n \"display\": \"Required parameter(s) are invalid.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"Invalid request with error - performer:identifier or patient:identifier system parameter is invalid.\",\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" - } - ] - }, - { - "name": "Missing performer identifier value - Get proxy roles", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "SomeToken;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ] - }, - "description": "## Example scenario\n\n**Given** proxy roles exist for a patient/performer in NPS or a GPIT system \n**When** a GET /Consent request is sent with an missing performer identifier value \n**Then** a 400 error is returned with the detail 'Required parameter(s) are missing.'\n\n## Authorization\n\nPlease see the folder overview for details of how to generate tokens for this endpoint." - }, - "response": [ - { - "name": "Missing performer identifier value error returned", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "53b3ca95-ad9d-4cd5-a194-78a42daff0df", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "88aaae3f-7168-4f69-b71a-60641082ab4b", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "SomeToken;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ] - } - }, - "status": "Bad Request", - "code": 400, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Thu, 27 Nov 2025 16:48:15 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "417" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "4984ba67-d994-4f08-910e-e25024a8ba57" - }, - { - "key": "x-amz-apigw-id", - "value": "UtkQdERvrPEFrBg=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-692880cf-614067cb88aa075eca482015" - }, - { - "key": "X-Request-ID", - "value": "f536a55f-7115-4ab4-a1c9-3049ca919351" - }, - { - "key": "X-Correlation-ID", - "value": "636e5f80-53b3-4bcf-9176-2967325a9e85" - }, - { - "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_IDENTIFIER_VALUE\",\n \"display\": \"Required parameter(s) are missing.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"Invalid request with error - performer:identifier or patient:identifier parameter not found.\",\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" - } - ] - }, - { - "name": "GP practice not found - Get proxy roles", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "SomeToken;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=false;nam-cache-enabled=false;nam-enabled=true;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9736898229", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9736898229" - } - ] - }, - "description": "## Example scenario\n\n**Given** a performer/patient is not registered at a GP \n**And** the performer/patient has no proxy roles in the National Proxy Store \n**When** a GET /Consent request is sent for the performer/patient \n**Then** a 404 error is returned with the detail 'GP Practice could not be found - invalid resources cannot be retrieved'\n\n## Authorization\n\nPlease see the folder overview for details of how to generate tokens for this endpoint." - }, - "response": [ - { - "name": "GP practice not found error returned", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "7c22ece1-b0a0-4067-8ad7-56f8bceced93", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "f1b40261-0aa6-44de-8563-3bfcc5813510", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "SomeToken;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=false;nam-cache-enabled=false;nam-enabled=true;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9736898229", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9736898229" - } - ] - } - }, - "status": "Not Found", - "code": 404, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Thu, 27 Nov 2025 16:48:38 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "391" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "e0bae044-bde7-4def-a600-199f72ea2e50" - }, - { - "key": "x-amz-apigw-id", - "value": "UtkTcEIOLPEF5aQ=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-692880e2-7d058bc8fc71f9ee272f339d" - }, - { - "key": "X-Request-ID", - "value": "c1f8bed5-6729-4b9f-b20c-180b069809ed" - }, - { - "key": "X-Correlation-ID", - "value": "3132cc74-64ef-465d-aac9-502f27c6ac1d" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"issue\": [\n {\n \"code\": \"processing\",\n \"details\": {\n \"coding\": [\n {\n \"code\": \"GP_PRACTICE_NOT_FOUND\",\n \"display\": \"GP Practice could not be found - invalid resources cannot be retrieved\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"GP Practice could not be found\",\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" - } - ] - } - ], - "description": "## Authorization\n\n### Allowed auth methods\n\n- App restricted token\n \n- NHS Login token - Auth with test user `9730675929`\n \n- CIS2 token - Auth with test user `656005750108`\n \n\nSee collection level documentation for info about how to get authorization tokens.\n\n## NPS and NAM routing\n\nYou will notice that there are 'Valid request - NPS' and 'Valid request - NAM' requests and examples within this folder. These are set up to retrieve the proxy roles from different data sources:\n\n- **Valid request - NPS**: Retrieves the roles from the National Proxy Store (NPS) only. Following the eventual migration of all proxy and related person data from GPIT to NPS, this will become the only route for all requests.\n \n- **Valid request - NAM:** Retrives the roles as related person data from the GPIT suppliers via NAM without checking if any exist in NPS first. This requires specific connection parameters to authorise with the GPIT supplier systems\n \n\nThis routing is controlled in the requests by the `X-Test-Routing-Flag` header. This header is used in the VRS pre-prod environments to control where the proxy roles are retrieved from. It is intended to be used for testing purposes only. Omission of this header will cause the default routing settings for the given environment to be followed instead. This is typically for roles to be retrieved from NPS, with NAM used as a fallback if none are found.", - "auth": { - "type": "bearer", - "bearer": [ - { - "key": "token", - "value": "{{consent_app_auth_header_value}}", - "type": "string" - } - ] - }, - "event": [ - { - "listen": "prerequest", - "script": { - "type": "text/javascript", - "packages": {}, - "requests": {}, - "exec": [ - "var uuid = require('uuid');", - "", - "var privateKey = pm.environment.get('vrs_api_private_key') || '';", - "var api_key_value = pm.environment.get('nhs_developer_account_api_key') || '';", - "", - "if (!privateKey) {", - " throw new Error(\"Variable vrs_api_private_key must be set with your private key for signed JWT authentication.\");", - "}", - "", - "// Replace any '/n' new lines with actual new lines", - "privateKey = privateKey.replace(/\\\\n/g, '\\n');", - "", - "if (!api_key_value) {", - " throw new Error(\"Variable nhs_developer_account_app_key must be set with your integration testing application API key.\");", - "}", - "", - "var auth_url = 'https://int.api.service.nhs.uk/oauth2-mock/token';", - "var navigator = {};", - "var window = {};", - "const interval = setTimeout(() => {}, 2147483647);", - "", - "return new Promise((resolve, reject) => { ", - " if (pm.globals.has('jsrsasign-js') && pm.globals.get('jsrsasign-js') !== \"\") {", - " return resolve();", - " }", - "", - " pm.sendRequest(", - " {", - " url: 'https://kjur.github.io/jsrsasign/jsrsasign-all-min.js',", - " method: 'GET'", - " }, function (err, res) {", - " if (err) {", - " return reject(err);", - " }", - "", - " pm.globals.set('jsrsasign-js', res.text()); ", - " return resolve();", - " }", - " );", - "}).then(() => { ", - " eval(pm.globals.get(\"jsrsasign-js\")); ", - "", - " // Set headers for JWT", - " var header = {", - " 'typ': 'JWT',", - " 'alg': 'RS512',", - " 'kid': 'VRS-dev-12-nov-2025'", - " };", - "", - " // Prepare timestamp in seconds", - " var currentTimestamp = Math.floor(Date.now() / 1000)", - " var uuid = require('uuid');", - " var jti_value = uuid.v4();", - " var data = {", - " 'sub': api_key_value,", - " 'iss': api_key_value,", - " 'jti': jti_value,", - " 'aud': auth_url,", - " 'exp': currentTimestamp + 180, // expiry time is 180 seconds from time of creation", - " } ", - "", - " var sJWT = KJUR.jws.JWS.sign(header.alg, JSON.stringify(header), JSON.stringify(data), privateKey); ", - " return new Promise((resolve, reject) => { ", - " pm.sendRequest({", - " url: auth_url,", - " method: \"POST\",", - " header: {", - " \"Content-Type\": \"application/x-www-form-urlencoded\"", - " },", - " body: {", - " mode: \"urlencoded\",", - " urlencoded: [", - " {", - " key: \"grant_type\",", - " value: \"client_credentials\"", - " },", - " {", - " key: \"client_assertion_type\",", - " value: \"urn:ietf:params:oauth:client-assertion-type:jwt-bearer\",", - " },", - " {", - " key: \"client_assertion\",", - " value: sJWT", - " }", - " ]", - " }", - " }, function (err, res) { ", - " if (err) {", - " return reject(err);", - " }", - "", - " //assign the authorization header value", - " pm.environment.set('consent_app_auth_header_value', `${res.json().access_token}`);", - "", - " return resolve();", - " }); ", - " });", - "}).then(() => { ", - " clearTimeout(interval);", - "}).catch((err) => { ", - " console.error(err); ", - " clearTimeout(interval); ", - "});" - ] - } - }, - { - "listen": "test", - "script": { - "type": "text/javascript", - "packages": {}, - "requests": {}, - "exec": [ - "" - ] - } - } - ] - }, - { - "name": "Get proxy role (GET /Consent/{id})", - "item": [ - { - "name": "Valid request - Get proxy role", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent/:consent_id", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - ":consent_id" - ], - "variable": [ - { - "key": "consent_id", - "value": "4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40" - } - ] - }, - "description": "## Example scenario\n\n**Given** a proxy role exists between a performer and a patient in the National Proxy Store \n**When** a GET /Consent/{id} request is sent with the consent id of the proxy role \n**Then** the proxy role is returned" - }, - "response": [ - { - "name": "Proxy role returned - No patient or performer details", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "4b1a8cf8-aa7e-4aa2-b465-44a5d25be876", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "b09740bc-b71f-4d04-a597-c89ab3804f90", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent/:consent_id", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - ":consent_id" - ], - "variable": [ - { - "key": "consent_id", - "value": "4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Date", - "value": "Thu, 04 Dec 2025 11:28:18 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "1873" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "23636f8d-f5ef-4050-8c67-51e393b47c87" - }, - { - "key": "x-amz-apigw-id", - "value": "VD581F_4LPEFyDg=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-69317051-6384bdf9e3106d26096daa32" - }, - { - "key": "X-Request-ID", - "value": "784fb8d0-37ff-4716-bf77-81a395fd20f8" - }, - { - "key": "X-Correlation-ID", - "value": "ec404ce9-1721-4158-91af-2064ad3e7ea4" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:28:18Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40\",\n \"resource\": {\n \"id\": \"4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:08:46Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898660\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-12-05\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n }\n ]\n}" - }, - { - "name": "Proxy role returned - Include performer details", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent/:consent_id?_include=Consent:performer", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - ":consent_id" - ], - "query": [ - { - "key": "_include", - "value": "Consent:performer" - } - ], - "variable": [ - { - "key": "consent_id", - "value": "4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Date", - "value": "Thu, 04 Dec 2025 11:28:48 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "2789" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "a1f034c1-6ee8-499e-aa60-eea157ad4bd9" - }, - { - "key": "x-amz-apigw-id", - "value": "VD6AYFQMrPEFgjw=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-69317068-3a18b175fb02b76c68acfce1" - }, - { - "key": "X-Request-ID", - "value": "e8a5dada-5577-4738-abd5-7a09251e8c3b" - }, - { - "key": "X-Correlation-ID", - "value": "5eeb9d78-133f-4132-b121-649162a6bc14" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:28:47Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40?_include=Consent%3Aperformer\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40\",\n \"resource\": {\n \"id\": \"4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:08:46Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898660\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-12-05\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/nVLgl\",\n \"resource\": {\n \"id\": \"nVLgl\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898660\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" - }, - { - "name": "Proxy role returned - Include patient details", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent/:consent_id?_include=Consent:patient", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - ":consent_id" - ], - "query": [ - { - "key": "_include", - "value": "Consent:patient" - } - ], - "variable": [ - { - "key": "consent_id", - "value": "4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Date", - "value": "Thu, 04 Dec 2025 11:29:08 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "3601" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "b6cb5439-d1a8-4f95-bd3e-9dca7bed9e88" - }, - { - "key": "x-amz-apigw-id", - "value": "VD6ErHoPLPEF1rg=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-69317083-b57a368a7776107b8b3e5f7a" - }, - { - "key": "X-Request-ID", - "value": "22ca0610-1b6e-4e3a-aa1a-ede697da4a1d" - }, - { - "key": "X-Correlation-ID", - "value": "71035b63-936a-4ce4-b036-3d592c764d88" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:29:08Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40?_include=Consent%3Apatient\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40\",\n \"resource\": {\n \"id\": \"4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:08:46Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898660\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-12-05\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898660\",\n \"resource\": {\n \"id\": \"9736898660\",\n \"meta\": {\n \"security\": [\n {\n \"code\": \"U\",\n \"display\": \"unrestricted\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-Confidentiality\"\n },\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ],\n \"versionId\": \"4\"\n },\n \"address\": [\n {\n \"extension\": [\n {\n \"extension\": [\n {\n \"url\": \"type\",\n \"valueCoding\": {\n \"code\": \"PAF\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType\"\n }\n },\n {\n \"url\": \"value\",\n \"valueString\": \"19976537\"\n }\n ],\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey\"\n }\n ],\n \"id\": \"pBQDr\",\n \"line\": [\n \"CARLTON\",\n \"VICARAGE LANE\",\n \"REDBOURNE\",\n \"GAINSBOROUGH\",\n \"LINCS\"\n ],\n \"period\": {\n \"start\": \"2025-07-15\"\n },\n \"postalCode\": \"DN21 4QW\",\n \"use\": \"home\"\n }\n ],\n \"birthDate\": \"2012-04-24\",\n \"gender\": \"female\",\n \"generalPractitioner\": [\n {\n \"id\": \"xSEnH\",\n \"identifier\": {\n \"period\": {\n \"start\": \"2024-11-06\"\n },\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A20047\"\n }\n }\n ],\n \"identifier\": [\n {\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"01\",\n \"display\": \"Number present and verified\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\n \"version\": \"1.0.0\"\n }\n ]\n }\n }\n ],\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898660\"\n }\n ],\n \"name\": [\n {\n \"family\": \"GODREY\",\n \"given\": [\n \"Davina\",\n \"Linda\"\n ],\n \"period\": {\n \"start\": \"2017-04-22\"\n },\n \"prefix\": [\n \"MISS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" - }, - { - "name": "Proxy role returned - Include performer and patient details", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent/:consent_id?_include=Consent:patient&_include=Consent:performer", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - ":consent_id" - ], - "query": [ - { - "key": "_include", - "value": "Consent:patient" - }, - { - "key": "_include", - "value": "Consent:performer" - } - ], - "variable": [ - { - "key": "consent_id", - "value": "4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Date", - "value": "Thu, 04 Dec 2025 11:29:26 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "4517" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "9db19dac-df92-4494-8f31-076621ab3d1a" - }, - { - "key": "x-amz-apigw-id", - "value": "VD6HkGFkrPEFxmw=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-69317096-6ad930e767f145f7dd07b977" - }, - { - "key": "X-Request-ID", - "value": "5fd5c3dc-1f5c-4ac5-a9b4-018fdd7f1a0b" - }, - { - "key": "X-Correlation-ID", - "value": "fd7368b4-0828-40b0-97fa-6d19fb51a9e0" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:29:26Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40?_include=Consent%3Apatient&_include=Consent%3Aperformer\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40\",\n \"resource\": {\n \"id\": \"4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:08:46Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898660\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-12-05\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898660\",\n \"resource\": {\n \"id\": \"9736898660\",\n \"meta\": {\n \"security\": [\n {\n \"code\": \"U\",\n \"display\": \"unrestricted\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-Confidentiality\"\n },\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ],\n \"versionId\": \"4\"\n },\n \"address\": [\n {\n \"extension\": [\n {\n \"extension\": [\n {\n \"url\": \"type\",\n \"valueCoding\": {\n \"code\": \"PAF\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType\"\n }\n },\n {\n \"url\": \"value\",\n \"valueString\": \"19976537\"\n }\n ],\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey\"\n }\n ],\n \"id\": \"pBQDr\",\n \"line\": [\n \"CARLTON\",\n \"VICARAGE LANE\",\n \"REDBOURNE\",\n \"GAINSBOROUGH\",\n \"LINCS\"\n ],\n \"period\": {\n \"start\": \"2025-07-15\"\n },\n \"postalCode\": \"DN21 4QW\",\n \"use\": \"home\"\n }\n ],\n \"birthDate\": \"2012-04-24\",\n \"gender\": \"female\",\n \"generalPractitioner\": [\n {\n \"id\": \"xSEnH\",\n \"identifier\": {\n \"period\": {\n \"start\": \"2024-11-06\"\n },\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A20047\"\n }\n }\n ],\n \"identifier\": [\n {\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"01\",\n \"display\": \"Number present and verified\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\n \"version\": \"1.0.0\"\n }\n ]\n }\n }\n ],\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898660\"\n }\n ],\n \"name\": [\n {\n \"family\": \"GODREY\",\n \"given\": [\n \"Davina\",\n \"Linda\"\n ],\n \"period\": {\n \"start\": \"2017-04-22\"\n },\n \"prefix\": [\n \"MISS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/nVLgl\",\n \"resource\": {\n \"id\": \"nVLgl\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898660\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" - } - ] - }, - { - "name": "Invalid consent id - Get proxy role", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent/:consent_id", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - ":consent_id" - ], - "variable": [ - { - "key": "consent_id", - "value": "invalid" - } - ] - }, - "description": "## Example scenario\n\n**Given** a proxy role exists between a performer and a patient in the National Proxy Store \n**When** a GET /Consent/{id} request is sent where the ID is invalid \n**Then** a 400 error is returned with details including 'Required parameter(s) are invalid.'" - }, - "response": [ - { - "name": "Invalid consent id error returned", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "6ada3f0b-6520-4517-a71c-8ee93616f52b", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "ac9c9714-f361-44f2-92be-ea1eb00f9990", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent/:consent_id", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - ":consent_id" - ], - "variable": [ - { - "key": "consent_id", - "value": "invalid" - } - ] - } - }, - "status": "Unprocessable Entity (WebDAV) (RFC 4918)", - "code": 422, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Thu, 27 Nov 2025 16:49:51 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "370" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "8bae29b7-2cf9-4f6f-b054-0ff6133092b7" - }, - { - "key": "x-amz-apigw-id", - "value": "UtkfVE6VLPEFmDg=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-6928812e-f15d362bb65b30e32885ea32" - }, - { - "key": "X-Request-ID", - "value": "51f1c948-51e0-4719-8307-fd1f987809a1" - }, - { - "key": "X-Correlation-ID", - "value": "cf91adbc-f994-4a56-9d6b-2b324c0af196" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"issue\": [\n {\n \"code\": \"invalid\",\n \"diagnostics\": \"Invalid request with error - ID must be a valid UUID.\",\n \"details\": {\n \"coding\": [\n {\n \"code\": \"INVALID_ID_VALUE\",\n \"display\": \"Required parameter(s) are invalid.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" - } - ] - }, - { - "name": "Invalid include parameter - Get proxy role", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent/:consent_id?_include=Consent:invalid", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - ":consent_id" - ], - "query": [ - { - "key": "_include", - "value": "Consent:invalid" - } - ], - "variable": [ - { - "key": "consent_id", - "value": "77363c92-8c33-490f-b5c9-9ef81c2cf16f" - } - ] - }, - "description": "## Example scenario\n\n**Given** a proxy role exists between a performer and a patient in the National Proxy Store \n**When** a GET /Consent/{id} request is sent with an invalid include parameter \n**Then** a 422 error is returned with details including 'Required parameter(s) are invalid.'" - }, - "response": [ - { - "name": "Invalid include parameter error returned", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "b6656a79-4fde-4def-b9ae-5cb1d5667d8f", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "7ae117a4-5b43-4aac-aa00-5fcc0c460fac", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent/:consent_id?_include=Consent:invalid", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - ":consent_id" - ], - "query": [ - { - "key": "_include", - "value": "Consent:invalid" - } - ], - "variable": [ - { - "key": "consent_id", - "value": "77363c92-8c33-490f-b5c9-9ef81c2cf16f" - } - ] - } - }, - "status": "Unprocessable Entity (WebDAV) (RFC 4918)", - "code": 422, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Thu, 27 Nov 2025 16:50:07 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "377" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "6da48428-7512-4d8b-9856-b2cc37713381" - }, - { - "key": "x-amz-apigw-id", - "value": "Utkh9GPDLPEF3pw=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-6928813f-6ca71472e425ed45ed5bd0a5" - }, - { - "key": "X-Request-ID", - "value": "2dbb0b8c-a6c8-4bf2-9005-ec19ff68f5b2" - }, - { - "key": "X-Correlation-ID", - "value": "ec9a3692-5922-491d-8df1-da17fe8e473b" - }, - { - "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_PARAMETER\",\n \"display\": \"Required parameter(s) are invalid.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"Invalid request with error - _include parameter is invalid.\",\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" - } - ] - }, - { - "name": "Proxy role not found - Get proxy role", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent/:consent_id", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - ":consent_id" - ], - "variable": [ - { - "key": "consent_id", - "value": "4cfccac1-673c-4fea-9b73-54b1a605c9a0" - } - ] - }, - "description": "## Example scenario\n\n**Given** a proxy role does not exist between a performer and a patient in the National Proxy Store \n**When** a GET /Consent/{id} request is sent \n**Then** a 404 error is returned with details including 'Resource that has been marked as invalid was requested - invalid resources cannot be retrieved'" - }, - "response": [ - { - "name": "Proxy role not found error response", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "ed862755-76fc-47b5-9381-9578062418e3", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "5095096c-4f78-4544-b812-ba9a4b21d08d", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent/:consent_id", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - ":consent_id" - ], - "variable": [ - { - "key": "consent_id", - "value": "4cfccac1-673c-4fea-9b73-54b1a605c9a0" - } - ] - } - }, - "status": "Not Found", - "code": 404, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Thu, 27 Nov 2025 16:50:22 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "478" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "ece32b72-4d4a-43c9-b42a-e47b729e04da" - }, - { - "key": "x-amz-apigw-id", - "value": "UtkkIHJprPEFiYw=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-6928814d-5023dcb7c8009889ccde4f3d" - }, - { - "key": "X-Request-ID", - "value": "3ec49ee6-c56c-4df9-aa7a-f54bb6b3e795" - }, - { - "key": "X-Correlation-ID", - "value": "74eb5dd5-2d74-4b3a-a482-5480e1ad6464" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"issue\": [\n {\n \"code\": \"processing\",\n \"details\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\",\n \"code\": \"INVALIDATED_RESOURCE\",\n \"display\": \"Resource that has been marked as invalid was requested - invalid resources cannot be retrieved\"\n }\n ]\n },\n \"diagnostics\": \"Resource that has been marked as invalid was requested - invalid resources cannot be retrieved\",\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" - } - ] - }, - { - "name": "Missing consent id value - Get proxy role", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent/", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - "" - ] - }, - "description": "## Example scenario\n\n**Given** a proxy role exists between a performer and a patient in the National Proxy Store \n**When** a GET /Consent/{id} request is sent with the ID value missing \n**Then** a 400 error is returned with details including 'Required parameter(s) are missing.'" - }, - "response": [ - { - "name": "Missing consent id value error returned", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "7c50dc2d-fc25-4bed-8ce8-d58b4811f58c", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "210ede12-efec-4195-b2cd-1a04d1827a81", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent/", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - "" - ] - } - }, - "status": "Bad Request", - "code": 400, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Thu, 27 Nov 2025 16:51:00 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "417" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "c4a3d99b-0ea1-40de-82bf-5cd2fa60afd6" - }, - { - "key": "x-amz-apigw-id", - "value": "UtkqLGF_rPEFcMw=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-69288173-c5d997b9110a61bf7b655fe7" - }, - { - "key": "X-Request-ID", - "value": "de0e2e5b-1f1b-4448-a7ee-42d0236b88a6" - }, - { - "key": "X-Correlation-ID", - "value": "6f458de2-64c6-4764-9044-34a5617d3d43" - }, - { - "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_IDENTIFIER_VALUE\",\n \"display\": \"Required parameter(s) are missing.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"Invalid request with error - performer:identifier or patient:identifier parameter not found.\",\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" - } - ] - } - ], - "description": "## Allowed auth methods\n\n- NHS Login token - Auth with test user `9730675929`\n \n- CIS2 token - Auth with test user `656005750108`\n \n\nSee collection level documentation for info about how to get authorization tokens.", - "auth": { - "type": "bearer", - "bearer": [ - { - "key": "token", - "value": "{{cis2_token}}", - "type": "string" - } - ] - }, - "event": [ - { - "listen": "prerequest", - "script": { - "type": "text/javascript", - "packages": {}, - "requests": {}, - "exec": [ - "" - ] - } - }, - { - "listen": "test", - "script": { - "type": "text/javascript", - "packages": {}, - "requests": {}, - "exec": [ - "" - ] - } - } - ] - }, - { - "name": "Create a new access request (POST /QuestionnaireResponse)", - "item": [ - { - "name": "Valid request - Proxy applicant - New adult to adult access request", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/fhir+json", - "type": "text" - }, - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Use-National-Proxy-Store", - "value": "False", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"resourceType\": \"QuestionnaireResponse\",\n \"status\": \"completed\",\n \"authored\": \"{{$isoTimestamp}}\",\n \"source\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9730675929\"\n }\n },\n \"subject\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898202\"\n }\n },\n \"questionnaire\": \"Questionnaire/{{$randomUUID}}\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson\",\n \"text\": \"relatedPerson\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_identifier\",\n \"text\": \"NHS Number\",\n \"answer\": [\n {\n \"valueString\": \"9730675929\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name\",\n \"text\": \"relatedPerson_name\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_name_first\",\n \"text\": \"First name.\",\n \"answer\": [\n {\n \"valueString\": \"Betty\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name_family\",\n \"text\": \"Family name (often called Surname).\",\n \"answer\": [\n {\n \"valueString\": \"MORLEY\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_birthDate\",\n \"text\": \"Date of Birth\",\n \"answer\": [\n {\n \"valueDate\": \"2005-01-20\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_basisForAccess\",\n \"text\": \"Basis For Access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_relationship\",\n \"text\": \"Relationship\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient\",\n \"text\": \"patient\",\n \"item\": [\n {\n \"linkId\": \"patient_identifier\",\n \"text\": \"NHS Number\",\n \"answer\": [\n {\n \"valueString\": \"9736898202\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name\",\n \"text\": \"patient_name\",\n \"item\": [\n {\n \"linkId\": \"patient_name_first\",\n \"text\": \"First name.\",\n \"answer\": [\n {\n \"valueString\": \"URIEL\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name_family\",\n \"text\": \"Family name (often called Surname).\",\n \"answer\": [\n {\n \"valueString\": \"ROTH\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient_birthDate\",\n \"text\": \"Date of Birth\",\n \"answer\": [\n {\n \"valueDate\": \"1988-11-10\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess\",\n \"text\": \"requestedAccess\",\n \"item\": [\n {\n \"linkId\": \"requestedAccess_accessLevel\",\n \"text\": \"Requested access level\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"APPT\",\n \"display\": \"Appointment Booking\"\n }\n },\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"VACC\",\n \"display\": \"Vaccination Records\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccess\",\n \"text\": \"Reason for access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-ReasonForAccess\",\n \"code\": \"COMB\",\n \"display\": \"Communication Barriers\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccessMoreinfo\",\n \"text\": \"Reason for access - further information\",\n \"answer\": [\n {\n \"valueString\": \"No internet connection\"\n }\n ]\n }\n ]\n }\n ]\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/QuestionnaireResponse", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "QuestionnaireResponse" - ] - }, - "description": "## Example scenario\n\n**Given** no proxy role exists between two adults \n**When** a valid access request is sent with the proxy as the applicant \n**Then** a 201 response is returned" - }, - "response": [ - { - "name": "A2A proxy applicant access request created", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/fhir+json", - "type": "text" - }, - { - "key": "X-Request-ID", - "value": "5ef96245-493a-468c-9936-06fb46e387af", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "15ace5c8-dc43-435f-baf8-3437b76ffdbf", - "type": "text" - }, - { - "key": "X-Use-National-Proxy-Store", - "value": "False", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"resourceType\": \"QuestionnaireResponse\",\n \"status\": \"completed\",\n \"authored\": \"2026-01-12T15:09:45.790Z\",\n \"source\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9730675929\"\n }\n },\n \"subject\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898202\"\n }\n },\n \"questionnaire\": \"Questionnaire/2e61ba16-f2ee-4e16-8526-194873d63f24\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson\",\n \"text\": \"relatedPerson\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_identifier\",\n \"text\": \"NHS Number\",\n \"answer\": [\n {\n \"valueString\": \"9730675929\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name\",\n \"text\": \"relatedPerson_name\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_name_first\",\n \"text\": \"First name.\",\n \"answer\": [\n {\n \"valueString\": \"Betty\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name_family\",\n \"text\": \"Family name (often called Surname).\",\n \"answer\": [\n {\n \"valueString\": \"MORLEY\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_birthDate\",\n \"text\": \"Date of Birth\",\n \"answer\": [\n {\n \"valueDate\": \"2005-01-20\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_basisForAccess\",\n \"text\": \"Basis For Access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_relationship\",\n \"text\": \"Relationship\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient\",\n \"text\": \"patient\",\n \"item\": [\n {\n \"linkId\": \"patient_identifier\",\n \"text\": \"NHS Number\",\n \"answer\": [\n {\n \"valueString\": \"9736898202\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name\",\n \"text\": \"patient_name\",\n \"item\": [\n {\n \"linkId\": \"patient_name_first\",\n \"text\": \"First name.\",\n \"answer\": [\n {\n \"valueString\": \"URIEL\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name_family\",\n \"text\": \"Family name (often called Surname).\",\n \"answer\": [\n {\n \"valueString\": \"ROTH\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient_birthDate\",\n \"text\": \"Date of Birth\",\n \"answer\": [\n {\n \"valueDate\": \"1988-11-10\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess\",\n \"text\": \"requestedAccess\",\n \"item\": [\n {\n \"linkId\": \"requestedAccess_accessLevel\",\n \"text\": \"Requested access level\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"APPT\",\n \"display\": \"Appointment Booking\"\n }\n },\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"VACC\",\n \"display\": \"Vaccination Records\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccess\",\n \"text\": \"Reason for access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-ReasonForAccess\",\n \"code\": \"COMB\",\n \"display\": \"Communication Barriers\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccessMoreinfo\",\n \"text\": \"Reason for access - further information\",\n \"answer\": [\n {\n \"valueString\": \"No internet connection\"\n }\n ]\n }\n ]\n }\n ]\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/QuestionnaireResponse", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "QuestionnaireResponse" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Mon, 01 Dec 2025 16:09:01 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "186" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "720499ae-68fe-495a-8485-862105f276a9" - }, - { - "key": "x-amz-apigw-id", - "value": "U6qQkGxVrPEFeoA=" - }, - { - "key": "location", - "value": "https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/QuestionnaireResponse/e185e5e3-901e-4b6a-bfe2-f9adb0b311a4" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-692dbd9c-999e6478f9613be345a68c77" - }, - { - "key": "X-Request-ID", - "value": "687bfc1b-b7a7-4681-a7bf-01ac6e7dd97a" - }, - { - "key": "X-Correlation-ID", - "value": "6adda3bb-aacf-4e4f-a459-a2a0fe6d34be" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"OperationOutcome\",\n \"issue\": [\n {\n \"severity\": \"information\",\n \"code\": \"informational\",\n \"details\": {\n \"coding\": [\n {\n \"code\": \"19C01XB6WC\",\n \"display\": \"19C01XB6WC\"\n }\n ]\n }\n }\n ]\n}" - } - ] - }, - { - "name": "Valid request - Patient applicant - New adult to adult access request", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/fhir+json", - "type": "text" - }, - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Use-National-Proxy-Store", - "value": "False", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"resourceType\": \"QuestionnaireResponse\",\n \"status\": \"completed\",\n \"authored\": \"{{$isoTimestamp}}\",\n \"source\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9730675929\"\n }\n },\n \"subject\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9730675929\"\n }\n },\n \"questionnaire\": \"Questionnaire/{{$randomUUID}}\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson\",\n \"text\": \"relatedPerson\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_identifier\",\n \"text\": \"NHS Number\",\n \"answer\": [\n {\n \"valueString\": \"9736898164\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name\",\n \"text\": \"relatedPerson_name\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_name_first\",\n \"text\": \"First name.\",\n \"answer\": [\n {\n \"valueString\": \"Heidi\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name_family\",\n \"text\": \"Family name (often called Surname).\",\n \"answer\": [\n {\n \"valueString\": \"LAW\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_birthDate\",\n \"text\": \"Date of Birth\",\n \"answer\": [\n {\n \"valueDate\": \"1997-09-15\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_basisForAccess\",\n \"text\": \"Basis For Access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_relationship\",\n \"text\": \"Relationship\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient\",\n \"text\": \"patient\",\n \"item\": [\n {\n \"linkId\": \"patient_identifier\",\n \"text\": \"NHS Number\",\n \"answer\": [\n {\n \"valueString\": \"9730675929\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name\",\n \"text\": \"patient_name\",\n \"item\": [\n {\n \"linkId\": \"patient_name_first\",\n \"text\": \"First name.\",\n \"answer\": [\n {\n \"valueString\": \"Betty\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name_family\",\n \"text\": \"Family name (often called Surname).\",\n \"answer\": [\n {\n \"valueString\": \"MORLEY\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient_birthDate\",\n \"text\": \"Date of Birth\",\n \"answer\": [\n {\n \"valueDate\": \"2005-01-20\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess\",\n \"text\": \"requestedAccess\",\n \"item\": [\n {\n \"linkId\": \"requestedAccess_accessLevel\",\n \"text\": \"Requested access level\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"APPT\",\n \"display\": \"Appointment Booking\"\n }\n },\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"VACC\",\n \"display\": \"Vaccination Records\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccess\",\n \"text\": \"Reason for access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-ReasonForAccess\",\n \"code\": \"COMB\",\n \"display\": \"Communication Barriers\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccessMoreinfo\",\n \"text\": \"Reason for access - further information\",\n \"answer\": [\n {\n \"valueString\": \"No internet connection\"\n }\n ]\n }\n ]\n }\n ]\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/QuestionnaireResponse", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "QuestionnaireResponse" - ] - }, - "description": "## Example scenario\n\n**Given** no proxy role exists between two adults \n**When** a valid access request is sent with the patient as the applicant \n**Then** a 201 response is returned" - }, - "response": [ - { - "name": "A2A patient applicant access request created", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/fhir+json", - "type": "text" - }, - { - "key": "X-Request-ID", - "value": "8af428cd-7e1e-4ed3-b127-0b751d6ae98d", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "e5cc0a6d-ea0d-433b-9307-30c988926969", - "type": "text" - }, - { - "key": "X-Use-National-Proxy-Store", - "value": "False", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"resourceType\": \"QuestionnaireResponse\",\n \"status\": \"completed\",\n \"authored\": \"2026-01-12T15:09:46.233Z\",\n \"source\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9730675929\"\n }\n },\n \"subject\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9730675929\"\n }\n },\n \"questionnaire\": \"Questionnaire/aa952e3f-3657-4ec3-bec0-25d881ed2e20\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson\",\n \"text\": \"relatedPerson\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_identifier\",\n \"text\": \"NHS Number\",\n \"answer\": [\n {\n \"valueString\": \"9736898164\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name\",\n \"text\": \"relatedPerson_name\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_name_first\",\n \"text\": \"First name.\",\n \"answer\": [\n {\n \"valueString\": \"Heidi\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name_family\",\n \"text\": \"Family name (often called Surname).\",\n \"answer\": [\n {\n \"valueString\": \"LAW\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_birthDate\",\n \"text\": \"Date of Birth\",\n \"answer\": [\n {\n \"valueDate\": \"1997-09-15\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_basisForAccess\",\n \"text\": \"Basis For Access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_relationship\",\n \"text\": \"Relationship\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient\",\n \"text\": \"patient\",\n \"item\": [\n {\n \"linkId\": \"patient_identifier\",\n \"text\": \"NHS Number\",\n \"answer\": [\n {\n \"valueString\": \"9730675929\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name\",\n \"text\": \"patient_name\",\n \"item\": [\n {\n \"linkId\": \"patient_name_first\",\n \"text\": \"First name.\",\n \"answer\": [\n {\n \"valueString\": \"Betty\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name_family\",\n \"text\": \"Family name (often called Surname).\",\n \"answer\": [\n {\n \"valueString\": \"MORLEY\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient_birthDate\",\n \"text\": \"Date of Birth\",\n \"answer\": [\n {\n \"valueDate\": \"2005-01-20\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess\",\n \"text\": \"requestedAccess\",\n \"item\": [\n {\n \"linkId\": \"requestedAccess_accessLevel\",\n \"text\": \"Requested access level\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"APPT\",\n \"display\": \"Appointment Booking\"\n }\n },\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"VACC\",\n \"display\": \"Vaccination Records\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccess\",\n \"text\": \"Reason for access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-ReasonForAccess\",\n \"code\": \"COMB\",\n \"display\": \"Communication Barriers\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccessMoreinfo\",\n \"text\": \"Reason for access - further information\",\n \"answer\": [\n {\n \"valueString\": \"No internet connection\"\n }\n ]\n }\n ]\n }\n ]\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/QuestionnaireResponse", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "QuestionnaireResponse" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Mon, 01 Dec 2025 16:10:22 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "186" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "d15e2ba0-3698-4fcf-80fe-d73279dd89a8" - }, - { - "key": "x-amz-apigw-id", - "value": "U6qdWHFfLPEFoUA=" - }, - { - "key": "location", - "value": "https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/QuestionnaireResponse/bdbba534-6e11-4491-aa3a-1631b0009628" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-692dbdee-08b18875f6f85ab2a7353bd4" - }, - { - "key": "X-Request-ID", - "value": "82cb14a5-09d0-41d4-8f73-2936794c32de" - }, - { - "key": "X-Correlation-ID", - "value": "73873b5d-1e2e-4a42-9dc3-83f1292f944b" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"OperationOutcome\",\n \"issue\": [\n {\n \"severity\": \"information\",\n \"code\": \"informational\",\n \"details\": {\n \"coding\": [\n {\n \"code\": \"19C0177GRI\",\n \"display\": \"19C0177GRI\"\n }\n ]\n }\n }\n ]\n}" - } - ] - }, - { - "name": "Valid request - New adult to child access request", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/fhir+json", - "type": "text" - }, - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Use-National-Proxy-Store", - "value": "False", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"resourceType\": \"QuestionnaireResponse\",\n \"status\": \"completed\",\n \"authored\": \"{{$isoTimestamp}}\",\n \"source\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9730675929\"\n }\n },\n \"subject\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898245\"\n }\n },\n \"questionnaire\": \"Questionnaire/01dc6813-3421-4d14-948d-a4888241add1\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson\",\n \"text\": \"relatedPerson\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_identifier\",\n \"text\": \"NHS Number\",\n \"answer\": [\n {\n \"valueString\": \"9730675929\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name\",\n \"text\": \"relatedPerson_name\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_name_first\",\n \"text\": \"First name.\",\n \"answer\": [\n {\n \"valueString\": \"Betty\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name_family\",\n \"text\": \"Family name (often called Surname).\",\n \"answer\": [\n {\n \"valueString\": \"MORLEY\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_birthDate\",\n \"text\": \"Date of Birth\",\n \"answer\": [\n {\n \"valueDate\": \"2005-01-20\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_basisForAccess\",\n \"text\": \"Basis For Access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_relationship\",\n \"text\": \"Relationship\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails\",\n \"text\": \"parentalApplicationSupplementaryDetails\",\n \"item\": [\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_evidenceOfResponsibility\",\n \"text\": \"Evidence of parental responsibility\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-EvidenceOfResponsibility\",\n \"code\": \"BRTH\",\n \"display\": \"Birth certificate\"\n }\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_evidenceOfResponsibilityMoreinfo\",\n \"text\": \"Evidence of responsibility - Further Information\",\n \"answer\": [\n {\n \"valueString\": \"Birth Certificate is original\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_isCurrentAddressConfirmed\",\n \"text\": \"Is current address confirmed?\",\n \"answer\": [\n {\n \"valueString\": \"Yes\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_newAddress\",\n \"text\": \"parentalApplicationSupplementaryDetails_newAddress\",\n \"item\": [\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_line1\",\n \"text\": \"Address Line 1\",\n \"answer\": [\n {\n \"valueString\": \"101 MESSINGHAM ROAD\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_line2\",\n \"text\": \"Address Line 2\",\n \"answer\": [\n {\n \"valueString\": \"\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_line3\",\n \"text\": \"Address Line 3\",\n \"answer\": [\n {\n \"valueString\": \"\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_city\",\n \"text\": \"Town / City\",\n \"answer\": [\n {\n \"valueString\": \"SCUNTHORPE\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_district\",\n \"text\": \"County\",\n \"answer\": [\n {\n \"valueString\": \"S HUMBERSIDE\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_postalCode\",\n \"text\": \"Postcode\",\n \"answer\": [\n {\n \"valueString\": \"DN17 2LN\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_liveAtSameAddress\",\n \"text\": \"Do the adult and child live at the same address?\",\n \"answer\": [\n {\n \"valueString\": \"Yes\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_canChildConsent\",\n \"text\": \"Can the child consent?\",\n \"answer\": [\n {\n \"valueString\": \"No\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_reasonNoChildConsent\",\n \"text\": \"Reason the child cannot consent\",\n \"answer\": [\n {\n \"valueString\": \"Child is too young\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient\",\n \"text\": \"patient\",\n \"item\": [\n {\n \"linkId\": \"patient_identifier\",\n \"text\": \"NHS Number\",\n \"answer\": [\n {\n \"valueString\": \"9736898245\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name\",\n \"text\": \"patient_name\",\n \"item\": [\n {\n \"linkId\": \"patient_name_first\",\n \"text\": \"First name.\",\n \"answer\": [\n {\n \"valueString\": \"Amber\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name_family\",\n \"text\": \"Family name (often called Surname).\",\n \"answer\": [\n {\n \"valueString\": \"TUCKER\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient_birthDate\",\n \"text\": \"Date of Birth\",\n \"answer\": [\n {\n \"valueDate\": \"2017-06-09\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess\",\n \"text\": \"requestedAccess\",\n \"item\": [\n {\n \"linkId\": \"requestedAccess_accessLevel\",\n \"text\": \"Requested access level\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"APPT\",\n \"display\": \"Appointment Booking\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccess\",\n \"text\": \"Reason for access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-ReasonForAccess\",\n \"code\": \"COMB\",\n \"display\": \"Communication Barriers\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccessMoreinfo\",\n \"text\": \"Reason for access - further information\",\n \"answer\": [\n {\n \"valueString\": \"No internet connection\"\n }\n ]\n }\n ]\n }\n ]\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/QuestionnaireResponse", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "QuestionnaireResponse" - ] - }, - "description": "## Example scenario\n\n**Given** no proxy role exists between an adult and child \n**When** a valid access request is sent with the proxy as the applicant \n**Then** a 201 response is returned" - }, - "response": [ - { - "name": "A2C access request created", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/fhir+json", - "type": "text" - }, - { - "key": "X-Request-ID", - "value": "d6f3b8fe-0041-4c34-aeb4-eac71020170d", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "46efa85e-d5c4-403b-a38a-1945f33bac2c", - "type": "text" - }, - { - "key": "X-Use-National-Proxy-Store", - "value": "False", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"resourceType\": \"QuestionnaireResponse\",\n \"status\": \"completed\",\n \"authored\": \"2026-01-12T15:09:46.453Z\",\n \"source\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9730675929\"\n }\n },\n \"subject\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898245\"\n }\n },\n \"questionnaire\": \"Questionnaire/01dc6813-3421-4d14-948d-a4888241add1\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson\",\n \"text\": \"relatedPerson\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_identifier\",\n \"text\": \"NHS Number\",\n \"answer\": [\n {\n \"valueString\": \"9730675929\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name\",\n \"text\": \"relatedPerson_name\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_name_first\",\n \"text\": \"First name.\",\n \"answer\": [\n {\n \"valueString\": \"Betty\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name_family\",\n \"text\": \"Family name (often called Surname).\",\n \"answer\": [\n {\n \"valueString\": \"MORLEY\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_birthDate\",\n \"text\": \"Date of Birth\",\n \"answer\": [\n {\n \"valueDate\": \"2005-01-20\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_basisForAccess\",\n \"text\": \"Basis For Access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_relationship\",\n \"text\": \"Relationship\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails\",\n \"text\": \"parentalApplicationSupplementaryDetails\",\n \"item\": [\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_evidenceOfResponsibility\",\n \"text\": \"Evidence of parental responsibility\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-EvidenceOfResponsibility\",\n \"code\": \"BRTH\",\n \"display\": \"Birth certificate\"\n }\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_evidenceOfResponsibilityMoreinfo\",\n \"text\": \"Evidence of responsibility - Further Information\",\n \"answer\": [\n {\n \"valueString\": \"Birth Certificate is original\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_isCurrentAddressConfirmed\",\n \"text\": \"Is current address confirmed?\",\n \"answer\": [\n {\n \"valueString\": \"Yes\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_newAddress\",\n \"text\": \"parentalApplicationSupplementaryDetails_newAddress\",\n \"item\": [\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_line1\",\n \"text\": \"Address Line 1\",\n \"answer\": [\n {\n \"valueString\": \"101 MESSINGHAM ROAD\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_line2\",\n \"text\": \"Address Line 2\",\n \"answer\": [\n {\n \"valueString\": \"\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_line3\",\n \"text\": \"Address Line 3\",\n \"answer\": [\n {\n \"valueString\": \"\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_city\",\n \"text\": \"Town / City\",\n \"answer\": [\n {\n \"valueString\": \"SCUNTHORPE\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_district\",\n \"text\": \"County\",\n \"answer\": [\n {\n \"valueString\": \"S HUMBERSIDE\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_postalCode\",\n \"text\": \"Postcode\",\n \"answer\": [\n {\n \"valueString\": \"DN17 2LN\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_liveAtSameAddress\",\n \"text\": \"Do the adult and child live at the same address?\",\n \"answer\": [\n {\n \"valueString\": \"Yes\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_canChildConsent\",\n \"text\": \"Can the child consent?\",\n \"answer\": [\n {\n \"valueString\": \"No\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_reasonNoChildConsent\",\n \"text\": \"Reason the child cannot consent\",\n \"answer\": [\n {\n \"valueString\": \"Child is too young\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient\",\n \"text\": \"patient\",\n \"item\": [\n {\n \"linkId\": \"patient_identifier\",\n \"text\": \"NHS Number\",\n \"answer\": [\n {\n \"valueString\": \"9736898245\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name\",\n \"text\": \"patient_name\",\n \"item\": [\n {\n \"linkId\": \"patient_name_first\",\n \"text\": \"First name.\",\n \"answer\": [\n {\n \"valueString\": \"Amber\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name_family\",\n \"text\": \"Family name (often called Surname).\",\n \"answer\": [\n {\n \"valueString\": \"TUCKER\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient_birthDate\",\n \"text\": \"Date of Birth\",\n \"answer\": [\n {\n \"valueDate\": \"2017-06-09\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess\",\n \"text\": \"requestedAccess\",\n \"item\": [\n {\n \"linkId\": \"requestedAccess_accessLevel\",\n \"text\": \"Requested access level\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"APPT\",\n \"display\": \"Appointment Booking\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccess\",\n \"text\": \"Reason for access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-ReasonForAccess\",\n \"code\": \"COMB\",\n \"display\": \"Communication Barriers\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccessMoreinfo\",\n \"text\": \"Reason for access - further information\",\n \"answer\": [\n {\n \"valueString\": \"No internet connection\"\n }\n ]\n }\n ]\n }\n ]\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/QuestionnaireResponse", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "QuestionnaireResponse" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Mon, 01 Dec 2025 16:11:33 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "186" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "4eba2237-3c13-4bab-afb1-1261b5ac6a19" - }, - { - "key": "x-amz-apigw-id", - "value": "U6qoVF-JLPEFXqQ=" - }, - { - "key": "location", - "value": "https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/QuestionnaireResponse/29a7f71a-2554-4e53-87de-07553d40d5ec" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-692dbe34-f306ba0e1a55aba127add964" - }, - { - "key": "X-Request-ID", - "value": "848e592d-a42e-4fee-b529-8ac484fd459c" - }, - { - "key": "X-Correlation-ID", - "value": "73de9aa5-5951-4d30-8f2d-e64482fb1990" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"OperationOutcome\",\n \"issue\": [\n {\n \"severity\": \"information\",\n \"code\": \"informational\",\n \"details\": {\n \"coding\": [\n {\n \"code\": \"19C01N8Q37\",\n \"display\": \"19C01N8Q37\"\n }\n ]\n }\n }\n ]\n}" - }, - { - "name": "A2C access request created - Verified relationship", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/fhir+json", - "type": "text" - }, - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Use-National-Proxy-Store", - "value": "False", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"resourceType\": \"QuestionnaireResponse\",\n \"status\": \"completed\",\n \"authored\": \"{{$isoTimestamp}}\",\n \"source\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9730675929\"\n }\n },\n \"subject\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9730675422\"\n }\n },\n \"questionnaire\": \"Questionnaire/01dc6813-3421-4d14-948d-a4888241add1\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson\",\n \"text\": \"relatedPerson\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_identifier\",\n \"text\": \"NHS Number\",\n \"answer\": [\n {\n \"valueString\": \"9730675929\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name\",\n \"text\": \"relatedPerson_name\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_name_first\",\n \"text\": \"First name.\",\n \"answer\": [\n {\n \"valueString\": \"Betty\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name_family\",\n \"text\": \"Family name (often called Surname).\",\n \"answer\": [\n {\n \"valueString\": \"MORLEY\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_birthDate\",\n \"text\": \"Date of Birth\",\n \"answer\": [\n {\n \"valueDate\": \"2005-01-20\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_basisForAccess\",\n \"text\": \"Basis For Access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_relationship\",\n \"text\": \"Relationship\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails\",\n \"text\": \"parentalApplicationSupplementaryDetails\",\n \"item\": [\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_evidenceOfResponsibility\",\n \"text\": \"Evidence of parental responsibility\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-EvidenceOfResponsibility\",\n \"code\": \"BRTH\",\n \"display\": \"Birth certificate\"\n }\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_evidenceOfResponsibilityMoreinfo\",\n \"text\": \"Evidence of responsibility - Further Information\",\n \"answer\": [\n {\n \"valueString\": \"Birth Certificate is original\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_isCurrentAddressConfirmed\",\n \"text\": \"Is current address confirmed?\",\n \"answer\": [\n {\n \"valueString\": \"Yes\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_newAddress\",\n \"text\": \"parentalApplicationSupplementaryDetails_newAddress\",\n \"item\": [\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_line1\",\n \"text\": \"Address Line 1\",\n \"answer\": [\n {\n \"valueString\": \"101 MESSINGHAM ROAD\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_line2\",\n \"text\": \"Address Line 2\",\n \"answer\": [\n {\n \"valueString\": \"\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_line3\",\n \"text\": \"Address Line 3\",\n \"answer\": [\n {\n \"valueString\": \"\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_city\",\n \"text\": \"Town / City\",\n \"answer\": [\n {\n \"valueString\": \"SCUNTHORPE\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_district\",\n \"text\": \"County\",\n \"answer\": [\n {\n \"valueString\": \"S HUMBERSIDE\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_postalCode\",\n \"text\": \"Postcode\",\n \"answer\": [\n {\n \"valueString\": \"DN17 2LN\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_liveAtSameAddress\",\n \"text\": \"Do the adult and child live at the same address?\",\n \"answer\": [\n {\n \"valueString\": \"Yes\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_canChildConsent\",\n \"text\": \"Can the child consent?\",\n \"answer\": [\n {\n \"valueString\": \"No\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_reasonNoChildConsent\",\n \"text\": \"Reason the child cannot consent\",\n \"answer\": [\n {\n \"valueString\": \"Child is too young\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient\",\n \"text\": \"patient\",\n \"item\": [\n {\n \"linkId\": \"patient_identifier\",\n \"text\": \"NHS Number\",\n \"answer\": [\n {\n \"valueString\": \"9730675422\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name\",\n \"text\": \"patient_name\",\n \"item\": [\n {\n \"linkId\": \"patient_name_first\",\n \"text\": \"First name.\",\n \"answer\": [\n {\n \"valueString\": \"Rowena\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name_family\",\n \"text\": \"Family name (often called Surname).\",\n \"answer\": [\n {\n \"valueString\": \"HIRST\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient_birthDate\",\n \"text\": \"Date of Birth\",\n \"answer\": [\n {\n \"valueDate\": \"2015-08-09\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess\",\n \"text\": \"requestedAccess\",\n \"item\": [\n {\n \"linkId\": \"requestedAccess_accessLevel\",\n \"text\": \"Requested access level\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"APPT\",\n \"display\": \"Appointment Booking\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccess\",\n \"text\": \"Reason for access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-ReasonForAccess\",\n \"code\": \"COMB\",\n \"display\": \"Communication Barriers\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccessMoreinfo\",\n \"text\": \"Reason for access - further information\",\n \"answer\": [\n {\n \"valueString\": \"No internet connection\"\n }\n ]\n }\n ]\n }\n ]\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/QuestionnaireResponse", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "QuestionnaireResponse" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Mon, 01 Dec 2025 16:11:33 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "186" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "4eba2237-3c13-4bab-afb1-1261b5ac6a19" - }, - { - "key": "x-amz-apigw-id", - "value": "U6qoVF-JLPEFXqQ=" - }, - { - "key": "location", - "value": "https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/QuestionnaireResponse/29a7f71a-2554-4e53-87de-07553d40d5ec" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-692dbe34-f306ba0e1a55aba127add964" - }, - { - "key": "X-Request-ID", - "value": "848e592d-a42e-4fee-b529-8ac484fd459c" - }, - { - "key": "X-Correlation-ID", - "value": "73de9aa5-5951-4d30-8f2d-e64482fb1990" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"OperationOutcome\",\n \"issue\": [\n {\n \"severity\": \"information\",\n \"code\": \"informational\",\n \"details\": {\n \"coding\": [\n {\n \"code\": \"19C01N8Q37\",\n \"display\": \"19C01N8Q37\"\n }\n ]\n }\n }\n ]\n}" - } - ] - }, - { - "name": "Invalid request body - New adult to adult access request", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/fhir+json", - "type": "text" - }, - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Use-National-Proxy-Store", - "value": "False", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/QuestionnaireResponse", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "QuestionnaireResponse" - ] - }, - "description": "## Example scenario\n\n**Given** no proxy role exists between two adults \n**When** a access request is sent with invalid body \n**Then** a 400 error response is returned with code 'INVALID_VALUE'" - }, - "response": [ - { - "name": "Invalid request body error response", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/fhir+json", - "type": "text" - }, - { - "key": "X-Request-ID", - "value": "94d7227f-f801-465f-b04c-8dd7494faf5f", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "7f829c8e-bec6-4cbe-8ed0-d71bf981095b", - "type": "text" - }, - { - "key": "X-Use-National-Proxy-Store", - "value": "False", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/QuestionnaireResponse", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "QuestionnaireResponse" - ] - } - }, - "status": "Bad Request", - "code": 400, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Mon, 01 Dec 2025 16:13:37 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "377" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "28073546-4513-47c5-9d2e-17caeb920a78" - }, - { - "key": "x-amz-apigw-id", - "value": "U6q7zHXFLPEF3Bg=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-692dbeb1-7dd1e1125d0b5422386cffe9" - }, - { - "key": "X-Request-ID", - "value": "d82f5db5-1c08-4251-a94b-50684ea1a06b" - }, - { - "key": "X-Correlation-ID", - "value": "7eeca365-bf2b-4859-9e2c-b5c7731bbe1b" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"issue\": [\n {\n \"code\": \"invalid\",\n \"details\": {\n \"coding\": [\n {\n \"code\": \"BAD_REQUEST\",\n \"display\": \"The request could not be processed.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"The supplied input is not a valid FHIR QuestionnaireResponse.\",\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" - } - ] - } - ], - "description": "## Allowed auth methods\n\n- NHS Login token - Auth with test user `9730675929`\n \n\nSee collection level documentation for info about how to get authorization tokens.", - "auth": { - "type": "bearer", - "bearer": [ - { - "key": "token", - "value": "{{login_token}}", - "type": "string" - } - ] - }, - "event": [ - { - "listen": "prerequest", - "script": { - "type": "text/javascript", - "packages": {}, - "requests": {}, - "exec": [ - "" - ] - } - }, - { - "listen": "test", - "script": { - "type": "text/javascript", - "packages": {}, - "requests": {}, - "exec": [ - "" - ] - } - } - ] - }, - { - "name": "Get access request (GET /QuestionnaireResponse/{id})", - "item": [ - { - "name": "Valid request - Get access request", - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/QuestionnaireResponse/:access_request_id", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "QuestionnaireResponse", - ":access_request_id" - ], - "variable": [ - { - "key": "access_request_id", - "value": "32a5cc78-eb64-4367-abea-cfdb6e9fa2e4" - } - ] - }, - "description": "## Example scenario\n\n**Given** a valid access request has been sent to VRS \n**When** a GET /QuestionnaireResponse/{id} request is sent with the access request UUID \n**Then** the access request is returned" - }, - "response": [] - }, - { - "name": "No access request found - Get access request", - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/QuestionnaireResponse/:access_request_id", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "QuestionnaireResponse", - ":access_request_id" - ], - "variable": [ - { - "key": "access_request_id", - "value": "32a5cc78-eb64-4367-abea-cfdb6e9fa2e4" - } - ] - }, - "description": "## Example scenario\n\n**Given** a valid access request has been sent to VRS \n**When** a GET /QuestionnaireResponse/{id} request is sent with a random UUID \n**Then** a 404 error is returned with message 'QUESTIONNAIRE_RESPONSE_NOT_FOUND'" - }, - "response": [ - { - "name": "No access request found error returned", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "074b07d8-104e-4574-abd7-bdc5181280da", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "f47a9a68-34a5-4a11-881b-8b45695f2e76", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/QuestionnaireResponse/:access_request_id", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "QuestionnaireResponse", - ":access_request_id" - ], - "variable": [ - { - "key": "access_request_id", - "value": "32a5cc78-eb64-4367-abea-cfdb6e9fa2e4" - } - ] - } - }, - "status": "Not Found", - "code": 404, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Mon, 01 Dec 2025 14:37:04 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "400" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "64959769-f136-4d27-9369-b4e01224c066" - }, - { - "key": "x-amz-apigw-id", - "value": "U6cyYE4brPEFXvw=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-692da80e-520fcf28565fe1ea77ceb7fc" - }, - { - "key": "X-Request-ID", - "value": "f6fe610a-d80b-4436-b727-67960c9687a1" - }, - { - "key": "X-Correlation-ID", - "value": "076421a4-1c56-43e4-95a9-6139434516a7" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"OperationOutcome\",\n \"issue\": [\n {\n \"severity\": \"error\",\n \"code\": \"not-found\",\n \"details\": {\n \"coding\": [\n {\n \"code\": \"QUESTIONNAIRE_RESPONSE_NOT_FOUND\",\n \"display\": \"Questionnaire response not found\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\"\n }\n ]\n },\n \"diagnostics\": \"The Questionnaire response could not be found using the provided access request ID.\"\n }\n ]\n}" - } - ] - }, - { - "name": "No access request UUID - Get access request", - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/QuestionnaireResponse/", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "QuestionnaireResponse", - "" - ] - }, - "description": "## Example scenario\n\n**Given** a valid access request has been sent to VRS \n**When** a GET /QuestionnaireResponse/{id} request is sent without a UUID \n**Then** a 400 error is returned with message 'METHOD_NOT_ALLOWED'" - }, - "response": [ - { - "name": "No access request UUID invalid response", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "6e763c1c-b24b-4ffe-8598-e2983ae5e3cf", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "87ed4d25-05d6-4ab6-985e-a254cdd26339", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/QuestionnaireResponse/", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "QuestionnaireResponse", - "" - ] - } - }, - "status": "Bad Request", - "code": 400, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Mon, 01 Dec 2025 15:15:37 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "370" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "42e98c18-f152-4e8f-8cd2-fc0ba2bcc590" - }, - { - "key": "x-amz-apigw-id", - "value": "U6ibrGjDrPEFgRQ=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-692db117-2a87f1ac0c50e6702fcbc5ce" - }, - { - "key": "X-Request-ID", - "value": "4270ae5f-3cc9-418e-a6f8-aab43372486a" - }, - { - "key": "X-Correlation-ID", - "value": "a23d9c20-bcf2-4e03-ba6b-092a703947f3" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"issue\": [\n {\n \"code\": \"not-supported\",\n \"details\": {\n \"coding\": [\n {\n \"code\": \"METHOD_NOT_ALLOWED\",\n \"display\": \"The method is not allowed.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"The method is not allowed for the requested resource.\",\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" - } - ] - }, - { - "name": "Invalid access request UUID - Get access request", - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/QuestionnaireResponse/invalid", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "QuestionnaireResponse", - "invalid" - ] - }, - "description": "## Example scenario\n\n**Given** a valid access request has been sent to VRS \n**When** a GET /QuestionnaireResponse/{id} request is sent with an invalid UUID \n**Then** a 400 error is returned with message 'INVALID_IDENTIFIER_VALUE'" - }, - "response": [ - { - "name": "Invalid access request UUID invalid response", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "30e863b4-b90b-439e-a757-06eadf3cae48", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "79bc7284-1f65-407a-bc5e-1e5bd8d0496b", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/QuestionnaireResponse/invalid", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "QuestionnaireResponse", - "invalid" - ] - } - }, - "status": "Bad Request", - "code": 400, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Mon, 01 Dec 2025 15:15:37 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "370" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "42e98c18-f152-4e8f-8cd2-fc0ba2bcc590" - }, - { - "key": "x-amz-apigw-id", - "value": "U6ibrGjDrPEFgRQ=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-692db117-2a87f1ac0c50e6702fcbc5ce" - }, - { - "key": "X-Request-ID", - "value": "4270ae5f-3cc9-418e-a6f8-aab43372486a" - }, - { - "key": "X-Correlation-ID", - "value": "a23d9c20-bcf2-4e03-ba6b-092a703947f3" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"OperationOutcome\",\n \"issue\": [\n {\n \"severity\": \"error\",\n \"code\": \"invalid\",\n \"details\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/STU3/CodeSystem/Spine-ErrorOrWarningCode-1\",\n \"code\": \"INVALID_IDENTIFIER_VALUE\",\n \"display\": \"Invalid identifier value\"\n }\n ]\n },\n \"diagnostics\": \"The specified access request ID is invalid. Access request IDs must be a valid UUID.\"\n }\n ]\n}" - } - ] - } - ], - "description": "## Allowed auth methods\n\n- CIS2 token - Auth with test user `656005750108`\n \n- NHS Login token - Auth with test user `9730675929`\n \n\nSee collection level documentation for info about how to get authorization tokens.", - "auth": { - "type": "bearer", - "bearer": [ - { - "key": "token", - "value": "{{cis2_token}}", - "type": "string" - } - ] - }, - "event": [ - { - "listen": "prerequest", - "script": { - "type": "text/javascript", - "packages": {}, - "requests": {}, - "exec": [ - "" - ] - } - }, - { - "listen": "test", - "script": { - "type": "text/javascript", - "packages": {}, - "requests": {}, - "exec": [ - "" - ] - } - } - ] - }, - { - "name": "Create a new proxy role (POST /Consent)", - "item": [ - { - "name": "Valid request - New proxy role", - "request": { - "auth": { - "type": "bearer", - "bearer": [ - { - "key": "token", - "value": "{{cis2_token}}", - "type": "string" - } - ] - }, - "method": "POST", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "Content-Type", - "value": "application/fhir+json", - "type": "text" - } - ], - "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 \t\"system\":\"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",\n \t\"code\":\"parental-responsibility\",\n \t\"display\":\"Parental responsibility\"\n }\n ]\n },\n \t\"reference\":{\"type\":\"RelatedPerson\",\"identifier\":{\"system\":\"https://fhir.nhs.uk/Id/nhs-number\",\"value\":\"9736898148\"}}\n }\n ]\n },\n \t\"extension\":[{\n\t\t\"url\":\"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n\t\t\"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" - } - } - }, - "url": { - "raw": "{{api_base_url}}/Consent", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ] - }, - "description": "## Important - duplicates\n\nWe cannot currently accept duplicate proxy role requests for testing purposes.\n\nThis may lead to you experiencing 409 errors on the 'valid request' scenarios if the same request has already been sent.\n\n## 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 \n**Then** a 201 success response is returned" - }, - "response": [ - { - "name": "Adult to child - New proxy role created", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "X-Request-ID", - "value": "df29a1cb-3861-4d7f-918d-3bcf6f5ef362", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "0b7ed233-3055-48ac-93ef-c71922ccc577", - "type": "text" - }, - { - "key": "Content-Type", - "value": "application/fhir+json", - "type": "text" - } - ], - "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", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/Consent", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Fri, 28 Nov 2025 15:14:39 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "101" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "bf6bc3d8-1829-4a81-9433-c0b1c21376d6" - }, - { - "key": "x-amz-apigw-id", - "value": "Uwpe7FCjrPEF5aQ=" - }, - { - "key": "location", - "value": "https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/4f15f399-d381-4949-a744-25f9cbfecfb3" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-6929bc5f-f6012c539553033b0859994a" - }, - { - "key": "X-Request-ID", - "value": "46baf4c8-5bb5-4a6e-9bd4-264452817dab" - }, - { - "key": "X-Correlation-ID", - "value": "65bdf903-1cb2-4722-a291-d5056c44e712" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"OperationOutcome\",\n \"issue\": [\n {\n \"severity\": \"information\",\n \"code\": \"informational\"\n }\n ]\n}" - }, - { - "name": "Adult to adult - New proxy role created", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "Content-Type", - "value": "application/fhir+json", - "type": "text" - } - ], - "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 \"performer\": [\n {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898164\"\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\": \"9736898164\"\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" - } - } - }, - "url": { - "raw": "{{api_base_url}}/Consent", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Fri, 28 Nov 2025 15:14:39 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "101" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "bf6bc3d8-1829-4a81-9433-c0b1c21376d6" - }, - { - "key": "x-amz-apigw-id", - "value": "Uwpe7FCjrPEF5aQ=" - }, - { - "key": "location", - "value": "https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/4f15f399-d381-4949-a744-25f9cbfecfb3" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-6929bc5f-f6012c539553033b0859994a" - }, - { - "key": "X-Request-ID", - "value": "46baf4c8-5bb5-4a6e-9bd4-264452817dab" - }, - { - "key": "X-Correlation-ID", - "value": "65bdf903-1cb2-4722-a291-d5056c44e712" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"OperationOutcome\",\n \"issue\": [\n {\n \"severity\": \"information\",\n \"code\": \"informational\"\n }\n ]\n}" - } - ] - }, - { - "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": {}, - "requests": {} - } - } - ], - "request": { - "auth": { - "type": "bearer", - "bearer": [ - { - "key": "token", - "value": "{{cis2_token}}", - "type": "string" - } - ] - }, - "method": "POST", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "Content-Type", - "value": "application/fhir+json", - "type": "text" - } - ], - "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 \"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.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" - } - } - }, - "url": { - "raw": "{{api_base_url}}/Consent", - "host": [ - "{{api_base_url}}" - ], - "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 identifier value error returned", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "X-Request-ID", - "value": "fa822d40-196d-4112-8c87-b46631ba7463", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "13f1ba14-20e9-48c8-b1ef-7f2c34d9bab3", - "type": "text" - }, - { - "key": "Content-Type", - "value": "application/fhir+json", - "type": "text" - } - ], - "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}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/Consent", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ] - } - }, - "status": "Unprocessable Entity (WebDAV) (RFC 4918)", - "code": 422, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Fri, 28 Nov 2025 12:46:09 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "402" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "369c4598-e093-44d1-8d27-015c1e1f8a40" - }, - { - "key": "x-amz-apigw-id", - "value": "UwTu1FORLPEFh3Q=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-69299991-27f38de5fa687e1e7d4659b3" - }, - { - "key": "X-Request-ID", - "value": "70591ef1-fbe0-442b-bd9a-545fb5713859" - }, - { - "key": "X-Correlation-ID", - "value": "037cf36b-1014-4177-bcc6-c1cd647aae42" - }, - { - "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_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}" - } - ] - }, - { - "name": "Duplicate role - New proxy role", - "request": { - "auth": { - "type": "bearer", - "bearer": [ - { - "key": "token", - "value": "{{cis2_token}}", - "type": "string" - } - ] - }, - "method": "POST", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "Content-Type", - "value": "application/fhir+json", - "type": "text" - } - ], - "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", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/Consent", - "host": [ - "{{api_base_url}}" - ], - "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", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "X-Request-ID", - "value": "8616edc0-f04b-4d56-ac54-4c5dd8930d87", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "42cf4c55-e180-4b8f-abe3-60acd1780311", - "type": "text" - }, - { - "key": "Content-Type", - "value": "application/fhir+json", - "type": "text" - } - ], - "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", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/Consent", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ] - } - }, - "status": "Conflict", - "code": 409, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Fri, 28 Nov 2025 12:41:31 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "352" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "de65a534-5cee-45c1-845e-023e9ffab375" - }, - { - "key": "x-amz-apigw-id", - "value": "UwTC8H42LPEFggg=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-69299878-54ea0e3b7bd5d7e836eaea8f" - }, - { - "key": "X-Request-ID", - "value": "dd90c863-82e3-4ef8-9568-3e68a64de1e0" - }, - { - "key": "X-Correlation-ID", - "value": "b08cd6b6-96fc-410c-84a9-e52732fcbc09" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "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}" - } - ] - }, - { - "name": "Missing scope - New proxy role", - "request": { - "method": "POST", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "Content-Type", - "value": "application/fhir+json", - "type": "text" - } - ], - "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}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/Consent", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ] - } - }, - "response": [ - { - "name": "Missing scope error returned", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "X-Request-ID", - "value": "2aa3293e-ad0e-4389-a466-d3209ebbfa4e", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "425ca0da-e10c-4010-86b4-93ca9bf737eb", - "type": "text" - }, - { - "key": "Content-Type", - "value": "application/fhir+json", - "type": "text" - } - ], - "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}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/Consent", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ] - } - }, - "status": "Bad Request", - "code": 400, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Fri, 28 Nov 2025 15:18:49 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "353" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "75bfd563-8f97-4b8a-8d50-a08643917d89" - }, - { - "key": "x-amz-apigw-id", - "value": "UwqGBE7MLPEFySQ=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-6929bd59-918cef993de61bcebe339d3e" - }, - { - "key": "X-Request-ID", - "value": "2ca06d13-2568-4f70-b06c-077af0f57137" - }, - { - "key": "X-Correlation-ID", - "value": "8c8ffb79-cc4c-4cb0-a62e-31dc1310a387" - }, - { - "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_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": "Invalid status - New proxy role", - "request": { - "method": "POST", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "Content-Type", - "value": "application/fhir+json", - "type": "text" - } - ], - "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}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/Consent", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ] - } - }, - "response": [ - { - "name": "Invalid status - New proxy role", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "X-Request-ID", - "value": "1e0a0136-6025-4190-8450-5676ada97c3c", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "bc404ec3-52fa-465c-9401-2b70484989bc", - "type": "text" - }, - { - "key": "Content-Type", - "value": "application/fhir+json", - "type": "text" - } - ], - "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}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/Consent", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ] - } - }, - "status": "Unprocessable Entity (WebDAV) (RFC 4918)", - "code": 422, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Fri, 28 Nov 2025 15:27:32 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "339" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "47dd1183-4b49-44f1-a524-79fe459589a9" - }, - { - "key": "x-amz-apigw-id", - "value": "UwrXkFOZrPEF1ZA=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-6929bf63-31132bda7b3f654ea3534f15" - }, - { - "key": "X-Request-ID", - "value": "e23fbdd1-027c-4281-b37d-094691df9fc7" - }, - { - "key": "X-Correlation-ID", - "value": "226277b1-9d7c-411a-b3fd-3a4a70a4d90e" - }, - { - "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_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": "Missing free text for Other", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "auth": { - "type": "bearer", - "bearer": [ - { - "key": "token", - "value": "{{cis2_token}}", - "type": "string" - } - ] - }, - "method": "POST", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "Content-Type", - "value": "application/fhir+json", - "type": "text" - } - ], - "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", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/Consent", - "host": [ - "{{api_base_url}}" - ], - "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": "Missing free text code error returned", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "Content-Type", - "value": "application/fhir+json", - "type": "text" - } - ], - "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", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/Consent", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ] - } - }, - "status": "Unprocessable Entity (WebDAV) (RFC 4918)", - "code": 422, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Fri, 28 Nov 2025 12:46:09 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "402" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "369c4598-e093-44d1-8d27-015c1e1f8a40" - }, - { - "key": "x-amz-apigw-id", - "value": "UwTu1FORLPEFh3Q=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-69299991-27f38de5fa687e1e7d4659b3" - }, - { - "key": "X-Request-ID", - "value": "70591ef1-fbe0-442b-bd9a-545fb5713859" - }, - { - "key": "X-Correlation-ID", - "value": "037cf36b-1014-4177-bcc6-c1cd647aae42" - }, - { - "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_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": "Invalid identifer system - New proxy role", - "request": { - "method": "POST", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "Content-Type", - "value": "application/fhir+json", - "type": "text" - } - ], - "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 \"performer\": [\n {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number/invalid\",\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" - } - } - }, - "url": { - "raw": "{{api_base_url}}/Consent", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ] - } - }, - "response": [ - { - "name": "Invalid status error returned", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "X-Request-ID", - "value": "004491e4-b270-4882-99c8-af4e387a505f", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "5f51e084-afd4-442b-b229-5470a750de52", - "type": "text" - }, - { - "key": "Content-Type", - "value": "application/fhir+json", - "type": "text" - } - ], - "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 \"performer\": [\n {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number/invalid\",\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" - } - } - }, - "url": { - "raw": "{{api_base_url}}/Consent", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ] - } - }, - "status": "Unprocessable Entity (WebDAV) (RFC 4918)", - "code": 422, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Fri, 28 Nov 2025 15:29:32 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "399" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "9ca19fe7-0a06-4da0-9b72-9e6135da40f1" - }, - { - "key": "x-amz-apigw-id", - "value": "UwrqcGPaLPEFWkg=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-6929bfdc-4e9f2ada8f5faf65f1630c1c" - }, - { - "key": "X-Request-ID", - "value": "21cc43ac-e531-477d-bc97-3e77e9657b52" - }, - { - "key": "X-Correlation-ID", - "value": "aeeaa71d-0a78-4e83-8c81-3b2884371ae9" - }, - { - "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_IDENTIFIER_SYSTEM\",\n \"display\": \"Invalid identifier system.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"Patient identifier system is invalid\",\n \"expression\": [\n \"patient.identifier.system\"\n ],\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" - } - ] - } - ], - "description": "## Allowed auth methods\n\n- CIS2 token - Auth with test user `656005750108`\n \n\nSee collection level documentation for info about how to get authorization tokens.", - "auth": { - "type": "bearer", - "bearer": [ - { - "key": "token", - "value": "{{cis2_token}}", - "type": "string" - } - ] - }, - "event": [ - { - "listen": "prerequest", - "script": { - "type": "text/javascript", - "packages": {}, - "requests": {}, - "exec": [ - "" - ] - } - }, - { - "listen": "test", - "script": { - "type": "text/javascript", - "packages": {}, - "requests": {}, - "exec": [ - "" - ] - } - } - ] - }, - { - "name": "Update proxy role (PATCH /Consent/{id})", - "item": [ - { - "name": "Valid request - Single update - Update proxy role", - "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 {\"op\": \"replace\", \"path\": \"/status\", \"value\": \"inactive\"},\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]\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": "Proxy role updated to 'inactive' status", - "originalRequest": { - "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 {\"op\": \"replace\", \"path\": \"/status\", \"value\": \"inactive\"},\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" - } - } - }, - "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" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Fri, 28 Nov 2025 16:23:31 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "101" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "5b03d759-c55a-462d-ba3c-e2dbf92d031a" - }, - { - "key": "x-amz-apigw-id", - "value": "UwzkUE0urPEFqHg=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-6929cc81-0d146fcdbc79baf5a5279c3d" - }, - { - "key": "X-Request-ID", - "value": "4555113e-aa4d-409d-bac0-41b0ed91cfc2" - }, - { - "key": "X-Correlation-ID", - "value": "b8c69a60-667d-4b0f-89c7-9de6d4e289a4" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"OperationOutcome\",\n \"issue\": [\n {\n \"severity\": \"information\",\n \"code\": \"informational\"\n }\n ]\n}" - }, - { - "name": "Proxy role end date updated", - "originalRequest": { - "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\": \"/provision/period/end\",\n \"value\": \"2026-12-31\"\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" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Date", - "value": "Thu, 04 Dec 2025 15:48:46 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "101" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "eb0a2130-76e5-41a0-9916-e7c8aa25a4ea" - }, - { - "key": "x-amz-apigw-id", - "value": "VEgG2Hh6LPEFXRQ=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-6931ad5e-d4506ade6d4f3410b20618b9" - }, - { - "key": "X-Request-ID", - "value": "90a9a964-db4c-4ec7-9498-76087f979bb5" - }, - { - "key": "X-Correlation-ID", - "value": "2aa6936b-c5ba-437d-898e-c58794601a01" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"OperationOutcome\",\n \"issue\": [\n {\n \"severity\": \"information\",\n \"code\": \"informational\"\n }\n ]\n}" - }, - { - "name": "Proxy role legal basis updated", - "originalRequest": { - "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\": \"/provision/actor\",\n \"value\": [\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]", - "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" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Date", - "value": "Thu, 04 Dec 2025 15:54:54 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "101" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "63072889-896c-43b1-aff1-0e4eceb2b4d4" - }, - { - "key": "x-amz-apigw-id", - "value": "VEg_9FQxLPEF1mA=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-6931aecc-d571f76cb8f3900088a01c45" - }, - { - "key": "X-Request-ID", - "value": "e436ebda-5011-431a-9de3-1d0749c6f45e" - }, - { - "key": "X-Correlation-ID", - "value": "930a58a1-7ca9-4a89-ac33-a24f5277b1d9" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"OperationOutcome\",\n \"issue\": [\n {\n \"severity\": \"information\",\n \"code\": \"informational\"\n }\n ]\n}" - } - ] - }, - { - "name": "Valid request - Multiple updates - Update proxy role", - "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 {\"op\": \"replace\", \"path\": \"/status\", \"value\": \"inactive\"},\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 {\n \"op\": \"replace\",\n \"path\": \"/provision/period/end\",\n \"value\": \"2026-12-31\"\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 with multiple updates for the proxy role \n**Then** a 200 response is returned and the role is updated" - }, - "response": [ - { - "name": "Proxy role status updated with end date", - "originalRequest": { - "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 {\"op\": \"replace\", \"path\": \"/status\", \"value\": \"inactive\"},\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 {\n \"op\": \"replace\",\n \"path\": \"/provision/period/end\",\n \"value\": \"2026-12-31\"\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" - } - ] - } - }, - "status": "Not Found", - "code": 404, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Date", - "value": "Thu, 04 Dec 2025 15:56:16 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "348" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "fbb23fc6-d143-4ad4-ab95-fef1276bf7d0" - }, - { - "key": "x-amz-apigw-id", - "value": "VEhNJE2VrPEFXkA=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-6931af20-0cc7e03b708f8949fc05bdfa" - }, - { - "key": "X-Request-ID", - "value": "0aa389b6-9542-428f-9e1c-b5411ff0a531" - }, - { - "key": "X-Correlation-ID", - "value": "e3845975-3d6b-4185-81cb-22a80f7ed0da" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"OperationOutcome\",\n \"issue\": [\n {\n \"severity\": \"information\",\n \"code\": \"informational\"\n }\n ]\n}" - } - ] - }, - { - "name": "Resource not found - Update proxy role", - "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 {\"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", - "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": "{{$randomUUID}}" - } - ] - }, - "description": "## Example scenario\n\n**Given** a proxy role exists in the National Proxy Store for a given UUID \n**When** a PATCH /Consent request is sent using the UUID \n**Then** a 404 error is returned with code 'RESOURCE_NOT_FOUND'" - }, - "response": [ - { - "name": "Resource not found error response", - "originalRequest": { - "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 {\"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", - "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": "{{$randomUUID}}" - } - ] - } - }, - "status": "Not Found", - "code": 404, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Fri, 28 Nov 2025 16:51:31 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "348" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "5940dd45-0b04-4e71-8fce-6a69665b256e" - }, - { - "key": "x-amz-apigw-id", - "value": "Uw3q4HTZrPEFxLQ=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-6929d312-f383a46c595faa9361bb8326" - }, - { - "key": "X-Request-ID", - "value": "4cfc1e62-1d97-47b2-825e-2f72eed5e29e" - }, - { - "key": "X-Correlation-ID", - "value": "db86232d-68a5-492d-96e3-02613a3cf6bf" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"issue\": [\n {\n \"code\": \"invalid\",\n \"diagnostics\": \"Proxy role not found.\",\n \"details\": {\n \"coding\": [\n {\n \"code\": \"RESOURCE_NOT_FOUND\",\n \"display\": \"Request must be for a existing proxy role.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" - } - ] - }, - { - "name": "Invalid status code - Update proxy role", - "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 {\"op\": \"replace\", \"path\": \"/status\", \"value\": \"invalid_status\"},\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", - "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 for a given UUID \n**When** a PATCH /Consent request is sent using the UUID \n**Then** a 404 error is returned with code 'RESOURCE_NOT_FOUND'" - }, - "response": [ - { - "name": "Invalid status code error returned", - "originalRequest": { - "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 {\"op\": \"replace\", \"path\": \"/status\", \"value\": \"invalid_status\"},\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", - "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": "aa58f9b7-2a02-45a2-9cb4-0d6fefe07a02" - } - ] - } - }, - "status": "Unprocessable Entity (WebDAV) (RFC 4918)", - "code": 422, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Fri, 28 Nov 2025 16:56:26 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "329" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "557c0652-9a38-434c-99c1-f979920055bf" - }, - { - "key": "x-amz-apigw-id", - "value": "Uw4ZOEOOLPEFggg=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-6929d43a-6c636f683c11b4ac83776aa6" - }, - { - "key": "X-Request-ID", - "value": "1a4ee8bf-0d2b-4398-950f-b3fd9332e7d3" - }, - { - "key": "X-Correlation-ID", - "value": "986fe591-c2f0-422d-9e1e-c99628e9a1df" - }, - { - "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_STATUS_CODE\",\n \"display\": \"Status code is invalid.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"Invalid status code.\",\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" - } - ] - }, - { - "name": "Invalid state transition - Update proxy role", - "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 {\"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]", - "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 for a given UUID \n**When** a PATCH /Consent request is sent using the UUID \n**Then** a 404 error is returned with code 'RESOURCE_NOT_FOUND'" - }, - "response": [ - { - "name": "Invalid status code error returned", - "originalRequest": { - "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\": \"someinvalidcode\"\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": "aa58f9b7-2a02-45a2-9cb4-0d6fefe07a02" - } - ] - } - }, - "status": "Unprocessable Entity (WebDAV) (RFC 4918)", - "code": 422, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Fri, 28 Nov 2025 16:56:26 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "329" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "557c0652-9a38-434c-99c1-f979920055bf" - }, - { - "key": "x-amz-apigw-id", - "value": "Uw4ZOEOOLPEFggg=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-6929d43a-6c636f683c11b4ac83776aa6" - }, - { - "key": "X-Request-ID", - "value": "1a4ee8bf-0d2b-4398-950f-b3fd9332e7d3" - }, - { - "key": "X-Correlation-ID", - "value": "986fe591-c2f0-422d-9e1e-c99628e9a1df" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"issue\": [\n {\n \"code\": \"invalid\",\n \"diagnostics\": \"Patch attempting invalid status change.\",\n \"details\": {\n \"coding\": [\n {\n \"code\": \"INVALID_STATE_TRANSITION\",\n \"display\": \"Status change is invalid.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" - } - ] - }, - { - "name": "Invalid path - Update proxy role", - "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\": \"/someotherpath\",\n \"value\": \"active\"\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 for a given UUID \n**When** a PATCH /Consent request with an invalid path is sent using the UUID \n**Then** a 400 error is returned with code 'INVALID_PATCH_PATH'" - }, - "response": [ - { - "name": "Invalid path error returned", - "originalRequest": { - "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\": \"/someotherpath\",\n \"value\": \"active\"\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": "aa58f9b7-2a02-45a2-9cb4-0d6fefe07a02" - } - ] - } - }, - "status": "Unprocessable Entity (WebDAV) (RFC 4918)", - "code": 422, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Fri, 28 Nov 2025 16:58:39 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "346" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "9c37f3a0-d1af-4a9d-8664-20edf45bd111" - }, - { - "key": "x-amz-apigw-id", - "value": "Uw4t7HzBrPEFTsw=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-6929d4bf-e038f4c128983e6e945b14ad" - }, - { - "key": "X-Request-ID", - "value": "3e5e943f-2647-4a09-b216-7d3551a637e7" - }, - { - "key": "X-Correlation-ID", - "value": "65dc6940-bcb3-466d-b25d-0a10ab98d7e6" - }, - { - "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_PATCH_PATH\",\n \"display\": \"Patch target is invalid.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"Patch targeting non-existent element.\",\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" - } - ] - }, - { - "name": "Missing free text for Other", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "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 {\"op\": \"replace\", \"path\": \"/status\", \"value\": \"inactive\"},\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\": \"OTHER\",\n \"display\": \"Other reason\"\n }\n ]\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 for a given UUID \n**When** a PATCH /Consent request with a missing free text and status reason of 'Other' is sent using the UUID \n**Then** a 400 error is returned with code 'MISSING_FREE_TEXT_FOR_OTHER'" - }, - "response": [ - { - "name": "Missing free text error", - "originalRequest": { - "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 {\"op\": \"replace\", \"path\": \"/status\", \"value\": \"inactive\"},\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\": \"OTHER\",\n \"display\": \"Other reason\"\n }\n ]\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" - } - ] - } - }, - "status": "Unprocessable Entity (WebDAV) (RFC 4918)", - "code": 422, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Fri, 28 Nov 2025 16:58:39 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "346" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "9c37f3a0-d1af-4a9d-8664-20edf45bd111" - }, - { - "key": "x-amz-apigw-id", - "value": "Uw4t7HzBrPEFTsw=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-6929d4bf-e038f4c128983e6e945b14ad" - }, - { - "key": "X-Request-ID", - "value": "3e5e943f-2647-4a09-b216-7d3551a637e7" - }, - { - "key": "X-Correlation-ID", - "value": "65dc6940-bcb3-466d-b25d-0a10ab98d7e6" - }, - { - "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_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}" - } - ] - } - ], - "description": "## Allowed auth methods\n\n- CIS2 token - Auth with test user `656005750108`\n \n- NHS Login token - Auth with test user `9730675929`\n \n\nSee collection level documentation for info about how to get authorization tokens." - }, - { - "name": "Get verified candidate relationships (GET /RelatedPerson)", - "item": [ - { - "name": "Valid request - Get verified candidate relationships", - "event": [ - { - "listen": "prerequest", - "script": { - "exec": [ - "" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/RelatedPerson?identifier=9736898121", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "RelatedPerson" - ], - "query": [ - { - "key": "identifier", - "value": "9736898121", - "description": "NHS number of the user to retrieve verified relationships for" - } - ] - }, - "description": "## Example scenario\n\n**Given** an NHS user has multiple related person relationships in PDS \n**When** a GET /RelatedPerson request is sent for the user \n**Then** the relationships are returned" - }, - "response": [ - { - "name": "Candidate relationship returned", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/RelatedPerson?identifier=9736898148", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "RelatedPerson" - ], - "query": [ - { - "key": "identifier", - "value": "9736898148", - "description": "NHS number of the user to retrieve verified relationships for" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Fri, 28 Nov 2025 17:10:29 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "927" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "3c77c3f5-2f94-4718-b4df-a994b49a9c8d" - }, - { - "key": "x-amz-apigw-id", - "value": "Uw6coGWKLPEFyvQ=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-6929d783-8368a433a0eae3395c7136cb" - }, - { - "key": "X-Request-ID", - "value": "e464b1c8-ad9b-41a2-9de3-2dd0e34d0fce" - }, - { - "key": "X-Correlation-ID", - "value": "056c8f1f-9d95-44b2-a4f7-582554f53387" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/IyKYB\",\n \"resource\": {\n \"id\": \"IyKYB\",\n \"birthDate\": \"2015-09-26\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n ],\n \"name\": [\n {\n \"family\": \"SHEPP\",\n \"given\": [\n \"Ashley\",\n \"Ellen\"\n ],\n \"period\": {\n \"start\": \"2025-08-06\"\n },\n \"prefix\": [\n \"MS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"MTH\",\n \"display\": \"mother\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n }\n ],\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson?identifier=9736898148\"\n }\n ],\n \"timestamp\": \"2025-11-28T17:10:29.231159+00:00\",\n \"total\": 1,\n \"type\": \"searchset\",\n \"resourceType\": \"Bundle\"\n}" - }, - { - "name": "Candidate relationship returned with patient details", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/RelatedPerson?identifier=9736898148&_include=RelatedPerson:patient", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "RelatedPerson" - ], - "query": [ - { - "key": "identifier", - "value": "9736898148", - "description": "NHS number of the user to retrieve verified relationships for" - }, - { - "key": "_include", - "value": "RelatedPerson:patient" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Date", - "value": "Fri, 28 Nov 2025 17:13:27 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "1395" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "a34914f5-c757-4a7c-b8e6-2061793de970" - }, - { - "key": "x-amz-apigw-id", - "value": "Uw63LFuCLPEFtfA=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-6929d82d-7210a91047b09608692e6ff6" - }, - { - "key": "X-Request-ID", - "value": "c46487fa-a7a9-4adb-82ec-dc7702fa66d4" - }, - { - "key": "X-Correlation-ID", - "value": "755116de-f4ef-406b-8088-1af14dd85c8d" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898644\",\n \"resource\": {\n \"id\": \"9736898644\",\n \"birthDate\": \"2015-09-26\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n ],\n \"name\": [\n {\n \"family\": \"SHEPP\",\n \"given\": [\n \"Ashley\",\n \"Ellen\"\n ],\n \"period\": {\n \"start\": \"2025-08-06\"\n },\n \"prefix\": [\n \"MS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/IyKYB\",\n \"resource\": {\n \"id\": \"IyKYB\",\n \"birthDate\": \"2015-09-26\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n ],\n \"name\": [\n {\n \"family\": \"SHEPP\",\n \"given\": [\n \"Ashley\",\n \"Ellen\"\n ],\n \"period\": {\n \"start\": \"2025-08-06\"\n },\n \"prefix\": [\n \"MS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"MTH\",\n \"display\": \"mother\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n }\n ],\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson?identifier=9736898148&_include=RelatedPerson%3Apatient\"\n }\n ],\n \"timestamp\": \"2025-11-28T17:13:27.630813+00:00\",\n \"total\": 1,\n \"type\": \"searchset\",\n \"resourceType\": \"Bundle\"\n}" - } - ] - }, - { - "name": "Valid request - No relationships returned - Get verified candidate relationships", - "event": [ - { - "listen": "prerequest", - "script": { - "exec": [ - "" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/RelatedPerson?identifier=9736898199", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "RelatedPerson" - ], - "query": [ - { - "key": "identifier", - "value": "9736898199", - "description": "NHS number of the user to retrieve verified relationships for" - } - ] - }, - "description": "## Example scenario\n\n**Given** an NHS user has no related person relationships in PDS \n**When** a GET /RelatedPerson request is sent for the user \n**Then** no relationships are returned" - }, - "response": [ - { - "name": "No relationships returned", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/RelatedPerson?identifier=9736898199", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "RelatedPerson" - ], - "query": [ - { - "key": "identifier", - "value": "9736898199", - "description": "NHS number of the user to retrieve verified relationships for" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Fri, 28 Nov 2025 17:15:06 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "249" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "9305e61b-2b8b-4a0c-84dd-0be9c4e1ce72" - }, - { - "key": "x-amz-apigw-id", - "value": "Uw7IDHSxrPEF7gg=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-6929d899-c345d4868005c5dc5999d598" - }, - { - "key": "X-Request-ID", - "value": "189b9dd8-722e-4e1b-b76b-75d2dd05fd00" - }, - { - "key": "X-Correlation-ID", - "value": "38045e59-8b2a-4f52-a1a5-834c91c25a9f" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson?identifier=9736898199\"\n }\n ],\n \"timestamp\": \"2025-11-28T17:15:05.994606+00:00\",\n \"total\": 0,\n \"type\": \"searchset\",\n \"resourceType\": \"Bundle\"\n}" - } - ] - }, - { - "name": "Valid request - Verify relationship - Get verified candidate relationships", - "event": [ - { - "listen": "prerequest", - "script": { - "exec": [ - "" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/RelatedPerson?identifier=9736898148&patient:identifier=9736898644", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "RelatedPerson" - ], - "query": [ - { - "key": "identifier", - "value": "9736898148", - "description": "NHS number of the user to retrieve verified relationships for" - }, - { - "key": "patient:identifier", - "value": "9736898644" - } - ] - }, - "description": "## Example scenario\n\n**Given** a proxy has a related person relationship in PDS \n**When** a GET /RelatedPerson request is sent for the proxy and the patient \n**Then** the relationship is returned" - }, - "response": [ - { - "name": "Verified relationship returned", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/RelatedPerson?identifier=9736898148&patient:identifier=9736898644", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "RelatedPerson" - ], - "query": [ - { - "key": "identifier", - "value": "9736898148", - "description": "NHS number of the user to retrieve verified relationships for" - }, - { - "key": "patient:identifier", - "value": "9736898644" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Fri, 28 Nov 2025 17:19:37 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "959" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "2ac409be-e9ce-4d73-a4b4-3c8a791aa51e" - }, - { - "key": "x-amz-apigw-id", - "value": "Uw7x4HIMrPEF-Fg=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-6929d9a5-d9df4059c3c602feabe873fc" - }, - { - "key": "X-Request-ID", - "value": "88367407-4953-4b64-9da0-6308c007b120" - }, - { - "key": "X-Correlation-ID", - "value": "8b55ca15-93fb-4ce9-be1b-eb0eb5e728fa" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/IyKYB\",\n \"resource\": {\n \"id\": \"IyKYB\",\n \"birthDate\": \"2015-09-26\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n ],\n \"name\": [\n {\n \"family\": \"SHEPP\",\n \"given\": [\n \"Ashley\",\n \"Ellen\"\n ],\n \"period\": {\n \"start\": \"2025-08-06\"\n },\n \"prefix\": [\n \"MS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"MTH\",\n \"display\": \"mother\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n }\n ],\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson?identifier=9736898148&patient%3Aidentifier=9736898644\"\n }\n ],\n \"timestamp\": \"2025-11-28T17:19:37.300736+00:00\",\n \"total\": 1,\n \"type\": \"searchset\",\n \"resourceType\": \"Bundle\"\n}" - }, - { - "name": "Verified relationship returned with patient details", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/RelatedPerson?identifier=9736898148&patient:identifier=9736898644&_include=RelatedPerson:patient", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "RelatedPerson" - ], - "query": [ - { - "key": "identifier", - "value": "9736898148", - "description": "NHS number of the user to retrieve verified relationships for" - }, - { - "key": "patient:identifier", - "value": "9736898644" - }, - { - "key": "_include", - "value": "RelatedPerson:patient" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Fri, 28 Nov 2025 17:19:37 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "959" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "2ac409be-e9ce-4d73-a4b4-3c8a791aa51e" - }, - { - "key": "x-amz-apigw-id", - "value": "Uw7x4HIMrPEF-Fg=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-6929d9a5-d9df4059c3c602feabe873fc" - }, - { - "key": "X-Request-ID", - "value": "88367407-4953-4b64-9da0-6308c007b120" - }, - { - "key": "X-Correlation-ID", - "value": "8b55ca15-93fb-4ce9-be1b-eb0eb5e728fa" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/IyKYB\",\n \"resource\": {\n \"id\": \"IyKYB\",\n \"birthDate\": \"2015-09-26\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n ],\n \"name\": [\n {\n \"family\": \"SHEPP\",\n \"given\": [\n \"Ashley\",\n \"Ellen\"\n ],\n \"period\": {\n \"start\": \"2025-08-06\"\n },\n \"prefix\": [\n \"MS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"MTH\",\n \"display\": \"mother\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n }\n ],\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson?identifier=9736898148&patient%3Aidentifier=9736898644\"\n }\n ],\n \"timestamp\": \"2025-11-28T17:19:37.300736+00:00\",\n \"total\": 1,\n \"type\": \"searchset\",\n \"resourceType\": \"Bundle\"\n}" - } - ] - }, - { - "name": "Missing identifier value - Get verified candidate relationships", - "event": [ - { - "listen": "prerequest", - "script": { - "exec": [ - "" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/RelatedPerson", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "RelatedPerson" - ] - }, - "description": "## Example scenario\n\n**Given** a proxy has a related person relationship in PDS \n**When** a GET /RelatedPerson request is sent with no identifier \n**Then** a 400 error is returned with code 'MISSING_IDENTIFIER_VALUE'" - }, - "response": [ - { - "name": "Missing identifier value error returned", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/RelatedPerson", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "RelatedPerson" - ] - } - }, - "status": "Bad Request", - "code": 400, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Fri, 28 Nov 2025 17:45:09 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "362" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "f524a29e-b0e9-45b0-af70-ad23fd87158c" - }, - { - "key": "x-amz-apigw-id", - "value": "Uw_h7GQFrPEF8xw=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-6929dfa5-ca879ed8f2a8b5c139182a8b" - }, - { - "key": "X-Request-ID", - "value": "28dbd904-517c-4e42-a3f6-37772b2da578" - }, - { - "key": "X-Correlation-ID", - "value": "e1229f7b-b14f-4858-b4fd-dcb3c9151a99" - }, - { - "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_IDENTIFIER_VALUE\",\n \"display\": \"Missing RelatedPerson NHS number.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"The 'identifier' parameter is required\",\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" - } - ] - }, - { - "name": "Invalid identifier value - Get verified candidate relationships", - "event": [ - { - "listen": "prerequest", - "script": { - "exec": [ - "" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/RelatedPerson?identifier=invalid", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "RelatedPerson" - ], - "query": [ - { - "key": "identifier", - "value": "invalid" - } - ] - }, - "description": "## Example scenario\n\n**Given** a proxy has a related person relationship in PDS \n**When** a GET /RelatedPerson request is sent with an invalid identifier \n**Then** a 400 error is returned with code 'INVALID_IDENTIFIER_VALUE'" - }, - "response": [ - { - "name": "Invalid identifier value error returned", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/RelatedPerson?identifier=invalid", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "RelatedPerson" - ], - "query": [ - { - "key": "identifier", - "value": "invalid" - } - ] - } - }, - "status": "Bad Request", - "code": 400, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Fri, 28 Nov 2025 17:47:15 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "422" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "7a627dc1-8fe7-4a07-9a17-5e8a7c77963b" - }, - { - "key": "x-amz-apigw-id", - "value": "Uw_1hFJWLPEFbKQ=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-6929e022-4dc5c06769a0b866a6456227" - }, - { - "key": "X-Request-ID", - "value": "c695d77b-b94e-4e04-9e2b-f7e34ef2e414" - }, - { - "key": "X-Correlation-ID", - "value": "46db2d38-e52b-4fcc-a8cf-2617fec4557a" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"issue\": [\n {\n \"code\": \"invalid\",\n \"diagnostics\": \"Not a valid NHS Number provided for the 'identifier' parameter\",\n \"expression\": [\n \"RelatedPerson.identifier\"\n ],\n \"details\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\",\n \"code\": \"INVALID_IDENTIFIER_VALUE\",\n \"display\": \"Provided value is invalid\"\n }\n ]\n },\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" - } - ] - }, - { - "name": "Invalid identifier system - Get verified candidate relationships", - "event": [ - { - "listen": "prerequest", - "script": { - "exec": [ - "" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/RelatedPerson?identifier=https://fhir.nhs.uk/Id/nhs-number/invalid|730675929", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "RelatedPerson" - ], - "query": [ - { - "key": "identifier", - "value": "https://fhir.nhs.uk/Id/nhs-number/invalid|730675929" - } - ] - }, - "description": "## Example scenario\n\n**Given** a proxy has a related person relationship in PDS \n**When** a GET /RelatedPerson request is sent with an invalid identifier \n**Then** a 400 error is returned with code 'INVALID_IDENTIFIER_VALUE'" - }, - "response": [ - { - "name": "Invalid identifier value error returned", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/RelatedPerson?identifier=https://fhir.nhs.uk/Id/nhs-number/invalid|730675929", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "RelatedPerson" - ], - "query": [ - { - "key": "identifier", - "value": "https://fhir.nhs.uk/Id/nhs-number/invalid|730675929" - } - ] - } - }, - "status": "Bad Request", - "code": 400, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Fri, 28 Nov 2025 17:48:42 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "352" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "66e70023-f78b-48aa-a29f-3df08e3e895c" - }, - { - "key": "x-amz-apigw-id", - "value": "UxADKEqiLPEFbWw=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-6929e07a-ade89162a2d0b573830554ca" - }, - { - "key": "X-Request-ID", - "value": "a6c275c6-3964-4d18-8860-fcf25e510f14" - }, - { - "key": "X-Correlation-ID", - "value": "1d7ecfb8-29fb-461a-9904-e28216b510f8" - }, - { - "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_IDENTIFIER_SYSTEM\",\n \"display\": \"Invalid identifier system\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"The identifier system is not valid.\",\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" - } - ] - } - ], - "description": "## Allowed auth methods\n\n- NHS Login token - Auth with test user `9730675929`\n \n- CIS2 token - Auth with test user `656005750108`\n \n\nSee collection level documentation for info about how to get authorization tokens.", - "auth": { - "type": "bearer", - "bearer": [ - { - "key": "token", - "value": "{{cis2_token}}", - "type": "string" - } - ] - }, - "event": [ - { - "listen": "prerequest", - "script": { - "type": "text/javascript", - "packages": {}, - "requests": {}, - "exec": [ - "" - ] - } - }, - { - "listen": "test", - "script": { - "type": "text/javascript", - "packages": {}, - "requests": {}, - "exec": [ - "" - ] - } - } - ] - } - ], - "auth": { - "type": "bearer", - "bearer": [ - { - "key": "token", - "value": "{{authorization_header_value}}", - "type": "string" - } - ] - }, - "event": [ - { - "listen": "prerequest", - "script": { - "type": "text/javascript", - "packages": {}, - "requests": {}, - "exec": [ - "" - ] - } - }, - { - "listen": "test", - "script": { - "type": "text/javascript", - "packages": {}, - "requests": {}, - "exec": [ - "" - ] - } - } - ], - "variable": [ - { - "key": "nps_enabled", - "value": "" - }, - { - "key": "nam_cache_enabled", - "value": "" - }, - { - "key": "nam_enabled", - "value": "" - }, - { - "key": "use_nam_mock", - "value": "" - } - ] + "info": { + "_postman_id": "b74b4efe-1cda-46f3-a61f-2cecaed50022", + "name": "Validated Relationship Service - Integration - 16/01/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": "18067099" + }, + "item": [ + { + "name": "Get proxy roles (GET /Consent)", + "item": [ + { + "name": "Valid request - NPS - Get proxy roles for performer", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "" + ], + "type": "text/javascript", + "packages": {}, + "requests": {} + } + }, + { + "listen": "test", + "script": { + "exec": [ + "" + ], + "type": "text/javascript", + "packages": {}, + "requests": {} + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "SomeToken;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9736898148", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9736898148" + } + ] + }, + "description": "This request and its examples will only retrieve proxy roles from the National Proxy Store and not directly from GPIT suppliers via NAM.\n\nSee folder-level docs for more info.\n\n## Example scenario\n\n**Given** proxy roles exist for a performer (proxy) in the National Proxy Store (NPS) \n**When** a GET /Consent request is sent with the performer identifier \n**Then** the proxy roles in NPS are returned\n\n## Authorization\n\nPlease see the folder overview for details of how to generate tokens for this endpoint." + }, + "response": [ + { + "name": "Proxy roles returned - No patient or performer details", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "1c190795-98fc-40d0-b13d-4b566650950a", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "3bedabd0-b86f-4d7b-92d9-94f020b4a834", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "some_token;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9736898148", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9736898148" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Date", + "value": "Thu, 04 Dec 2025 10:48:19 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "3486" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "cf3a99a3-7592-4968-893c-e443d6cb27c8" + }, + { + "key": "x-amz-apigw-id", + "value": "VD0FoHiurPEFXqQ=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-693166f0-1bb8c61dd3aa101687d0b754" + }, + { + "key": "X-Request-ID", + "value": "d3ec5ec8-088f-4db6-8342-1a21d2a2af16" + }, + { + "key": "X-Correlation-ID", + "value": "656bfa49-711b-48c4-9427-1ed8fa34260f" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2025-12-04T10:48:19Z\",\n \"total\": 2,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9736898148\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"resource\": {\n \"id\": \"7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"Information Access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ],\n \"text\": \"Information Access Consent\"\n }\n ],\n \"dateTime\": \"2025-12-04T10:46:27Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ],\n \"text\": \"Patient Privacy Consent\"\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/b22d6068-fe78-40f4-b71a-b916dac48c0b\",\n \"resource\": {\n \"id\": \"b22d6068-fe78-40f4-b71a-b916dac48c0b\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"Information Access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ],\n \"text\": \"Information Access Consent\"\n }\n ],\n \"dateTime\": \"2025-12-04T10:47:43Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ],\n \"text\": \"Patient Privacy Consent\"\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n }\n ]\n}" + }, + { + "name": "Proxy roles returned - Include patient details", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "some_token;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9736898148&_include=Consent:patient", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9736898148" + }, + { + "key": "_include", + "value": "Consent:patient" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Date", + "value": "Thu, 04 Dec 2025 10:50:25 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "6923" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "edd035fd-2cdb-4c7a-a55c-a55e6faf5743" + }, + { + "key": "x-amz-apigw-id", + "value": "VD0ZXFA2LPEFYqg=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-6931676e-74035c00139aae000a60b5d7" + }, + { + "key": "X-Request-ID", + "value": "64b0f06f-a35e-44bb-baf4-33de94895236" + }, + { + "key": "X-Correlation-ID", + "value": "6a95b411-9936-49bb-bbcb-8e6776417762" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2025-12-04T10:50:25Z\",\n \"total\": 2,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9736898148&_include=Consent%3Apatient\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"resource\": {\n \"id\": \"7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"Information Access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ],\n \"text\": \"Information Access Consent\"\n }\n ],\n \"dateTime\": \"2025-12-04T10:46:27Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ],\n \"text\": \"Patient Privacy Consent\"\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/b22d6068-fe78-40f4-b71a-b916dac48c0b\",\n \"resource\": {\n \"id\": \"b22d6068-fe78-40f4-b71a-b916dac48c0b\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"Information Access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ],\n \"text\": \"Information Access Consent\"\n }\n ],\n \"dateTime\": \"2025-12-04T10:47:43Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ],\n \"text\": \"Patient Privacy Consent\"\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898644\",\n \"resource\": {\n \"id\": \"9736898644\",\n \"meta\": {\n \"security\": [\n {\n \"code\": \"U\",\n \"display\": \"unrestricted\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-Confidentiality\"\n },\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ],\n \"versionId\": \"4\"\n },\n \"address\": [\n {\n \"extension\": [\n {\n \"extension\": [\n {\n \"url\": \"type\",\n \"valueCoding\": {\n \"code\": \"PAF\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType\"\n }\n },\n {\n \"url\": \"value\",\n \"valueString\": \"29706100\"\n }\n ],\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey\"\n }\n ],\n \"id\": \"gDmhc\",\n \"line\": [\n \"BRAMBLE COTTAGE\",\n \"OLD VICARAGE PARK\",\n \"SCAWBY\",\n \"BRIGG\",\n \"S HUMBERSIDE\"\n ],\n \"period\": {\n \"start\": \"2021-09-10\"\n },\n \"postalCode\": \"DN20 9RL\",\n \"use\": \"home\"\n }\n ],\n \"birthDate\": \"2015-09-26\",\n \"gender\": \"female\",\n \"generalPractitioner\": [\n {\n \"id\": \"gDHTb\",\n \"identifier\": {\n \"period\": {\n \"start\": \"2018-08-22\"\n },\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A20047\"\n }\n }\n ],\n \"identifier\": [\n {\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"01\",\n \"display\": \"Number present and verified\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\n \"version\": \"1.0.0\"\n }\n ]\n }\n }\n ],\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n ],\n \"name\": [\n {\n \"family\": \"SHEPP\",\n \"given\": [\n \"Ashley\",\n \"Ellen\"\n ],\n \"period\": {\n \"start\": \"2025-08-06\"\n },\n \"prefix\": [\n \"MS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898717\",\n \"resource\": {\n \"id\": \"9736898717\",\n \"meta\": {\n \"security\": [\n {\n \"code\": \"U\",\n \"display\": \"unrestricted\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-Confidentiality\"\n },\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ],\n \"versionId\": \"4\"\n },\n \"address\": [\n {\n \"extension\": [\n {\n \"extension\": [\n {\n \"url\": \"type\",\n \"valueCoding\": {\n \"code\": \"PAF\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType\"\n }\n },\n {\n \"url\": \"value\",\n \"valueString\": \"16654057\"\n }\n ],\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey\"\n }\n ],\n \"id\": \"YoGEf\",\n \"line\": [\n \"GLENVILLE\",\n \"FERRY ROAD\",\n \"GOXHILL\",\n \"BARROW-UPON-HUMBER\",\n \"S HUMBERSIDE\"\n ],\n \"period\": {\n \"start\": \"2016-04-09\"\n },\n \"postalCode\": \"DN19 7JY\",\n \"use\": \"home\"\n }\n ],\n \"birthDate\": \"2010-05-31\",\n \"gender\": \"male\",\n \"generalPractitioner\": [\n {\n \"id\": \"bYoHa\",\n \"identifier\": {\n \"period\": {\n \"start\": \"2016-02-12\"\n },\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A20047\"\n }\n }\n ],\n \"identifier\": [\n {\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"01\",\n \"display\": \"Number present and verified\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\n \"version\": \"1.0.0\"\n }\n ]\n }\n }\n ],\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n ],\n \"name\": [\n {\n \"family\": \"CASH\",\n \"given\": [\n \"Jacob\",\n \"Chas\"\n ],\n \"period\": {\n \"start\": \"2025-07-22\"\n },\n \"prefix\": [\n \"MR\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" + }, + { + "name": "Proxy roles returned - Include performer details", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "some_token;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9736898148&_include=Consent:performer", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9736898148" + }, + { + "key": "_include", + "value": "Consent:performer" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Date", + "value": "Thu, 04 Dec 2025 10:50:45 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "5289" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "60649be0-6363-4601-b792-d631af45a966" + }, + { + "key": "x-amz-apigw-id", + "value": "VD0cyFTYLPEF-Fg=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-69316784-cee1c757e6d4e43fb4837684" + }, + { + "key": "X-Request-ID", + "value": "8a113b57-8af9-4d34-b300-100c84059319" + }, + { + "key": "X-Correlation-ID", + "value": "a3683a8c-6172-44a7-8410-0e78a705907b" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2025-12-04T10:50:45Z\",\n \"total\": 2,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9736898148&_include=Consent%3Aperformer\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"resource\": {\n \"id\": \"7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"Information Access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ],\n \"text\": \"Information Access Consent\"\n }\n ],\n \"dateTime\": \"2025-12-04T10:46:27Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ],\n \"text\": \"Patient Privacy Consent\"\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/b22d6068-fe78-40f4-b71a-b916dac48c0b\",\n \"resource\": {\n \"id\": \"b22d6068-fe78-40f4-b71a-b916dac48c0b\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"Information Access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ],\n \"text\": \"Information Access Consent\"\n }\n ],\n \"dateTime\": \"2025-12-04T10:47:43Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ],\n \"text\": \"Patient Privacy Consent\"\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/ZfgKO\",\n \"resource\": {\n \"id\": \"ZfgKO\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/UwTCq\",\n \"resource\": {\n \"id\": \"UwTCq\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" + }, + { + "name": "Proxy roles returned - Include patient and performer details", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "some_token;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9736898148&_include=Consent:performer&_include=Consent:patient", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9736898148" + }, + { + "key": "_include", + "value": "Consent:performer" + }, + { + "key": "_include", + "value": "Consent:patient" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Date", + "value": "Thu, 04 Dec 2025 10:51:06 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "8726" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "2b36e22f-2649-44c9-b3ce-929ea840df0f" + }, + { + "key": "x-amz-apigw-id", + "value": "VD0gJFjQLPEF_Ew=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-6931679a-aa7dfa232b694d8fdbd9823f" + }, + { + "key": "X-Request-ID", + "value": "d5743541-7330-4347-b9c7-9067feb4b144" + }, + { + "key": "X-Correlation-ID", + "value": "af030657-aad8-45f4-9c70-85e4755a189f" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2025-12-04T10:51:06Z\",\n \"total\": 2,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9736898148&_include=Consent%3Aperformer&_include=Consent%3Apatient\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"resource\": {\n \"id\": \"7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"Information Access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ],\n \"text\": \"Information Access Consent\"\n }\n ],\n \"dateTime\": \"2025-12-04T10:46:27Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ],\n \"text\": \"Patient Privacy Consent\"\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/b22d6068-fe78-40f4-b71a-b916dac48c0b\",\n \"resource\": {\n \"id\": \"b22d6068-fe78-40f4-b71a-b916dac48c0b\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"Information Access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ],\n \"text\": \"Information Access Consent\"\n }\n ],\n \"dateTime\": \"2025-12-04T10:47:43Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ],\n \"text\": \"Patient Privacy Consent\"\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898644\",\n \"resource\": {\n \"id\": \"9736898644\",\n \"meta\": {\n \"security\": [\n {\n \"code\": \"U\",\n \"display\": \"unrestricted\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-Confidentiality\"\n },\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ],\n \"versionId\": \"4\"\n },\n \"address\": [\n {\n \"extension\": [\n {\n \"extension\": [\n {\n \"url\": \"type\",\n \"valueCoding\": {\n \"code\": \"PAF\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType\"\n }\n },\n {\n \"url\": \"value\",\n \"valueString\": \"29706100\"\n }\n ],\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey\"\n }\n ],\n \"id\": \"gDmhc\",\n \"line\": [\n \"BRAMBLE COTTAGE\",\n \"OLD VICARAGE PARK\",\n \"SCAWBY\",\n \"BRIGG\",\n \"S HUMBERSIDE\"\n ],\n \"period\": {\n \"start\": \"2021-09-10\"\n },\n \"postalCode\": \"DN20 9RL\",\n \"use\": \"home\"\n }\n ],\n \"birthDate\": \"2015-09-26\",\n \"gender\": \"female\",\n \"generalPractitioner\": [\n {\n \"id\": \"gDHTb\",\n \"identifier\": {\n \"period\": {\n \"start\": \"2018-08-22\"\n },\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A20047\"\n }\n }\n ],\n \"identifier\": [\n {\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"01\",\n \"display\": \"Number present and verified\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\n \"version\": \"1.0.0\"\n }\n ]\n }\n }\n ],\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n ],\n \"name\": [\n {\n \"family\": \"SHEPP\",\n \"given\": [\n \"Ashley\",\n \"Ellen\"\n ],\n \"period\": {\n \"start\": \"2025-08-06\"\n },\n \"prefix\": [\n \"MS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898717\",\n \"resource\": {\n \"id\": \"9736898717\",\n \"meta\": {\n \"security\": [\n {\n \"code\": \"U\",\n \"display\": \"unrestricted\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-Confidentiality\"\n },\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ],\n \"versionId\": \"4\"\n },\n \"address\": [\n {\n \"extension\": [\n {\n \"extension\": [\n {\n \"url\": \"type\",\n \"valueCoding\": {\n \"code\": \"PAF\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType\"\n }\n },\n {\n \"url\": \"value\",\n \"valueString\": \"16654057\"\n }\n ],\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey\"\n }\n ],\n \"id\": \"YoGEf\",\n \"line\": [\n \"GLENVILLE\",\n \"FERRY ROAD\",\n \"GOXHILL\",\n \"BARROW-UPON-HUMBER\",\n \"S HUMBERSIDE\"\n ],\n \"period\": {\n \"start\": \"2016-04-09\"\n },\n \"postalCode\": \"DN19 7JY\",\n \"use\": \"home\"\n }\n ],\n \"birthDate\": \"2010-05-31\",\n \"gender\": \"male\",\n \"generalPractitioner\": [\n {\n \"id\": \"bYoHa\",\n \"identifier\": {\n \"period\": {\n \"start\": \"2016-02-12\"\n },\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A20047\"\n }\n }\n ],\n \"identifier\": [\n {\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"01\",\n \"display\": \"Number present and verified\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\n \"version\": \"1.0.0\"\n }\n ]\n }\n }\n ],\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n ],\n \"name\": [\n {\n \"family\": \"CASH\",\n \"given\": [\n \"Jacob\",\n \"Chas\"\n ],\n \"period\": {\n \"start\": \"2025-07-22\"\n },\n \"prefix\": [\n \"MR\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/ZfgKO\",\n \"resource\": {\n \"id\": \"ZfgKO\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/UwTCq\",\n \"resource\": {\n \"id\": \"UwTCq\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" + }, + { + "name": "Proxy roles returned - Filtered by status 'inactive'", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "some_token;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9736898156&status=inactive", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9736898156" + }, + { + "key": "status", + "value": "inactive" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Date", + "value": "Thu, 04 Dec 2025 11:09:14 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "1888" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "290a4ffd-6021-435c-af76-8d6c80492b72" + }, + { + "key": "x-amz-apigw-id", + "value": "VD3JoHOkrPEFSoA=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-69316bd6-5bd69e7021cf6e4e0696d153" + }, + { + "key": "X-Request-ID", + "value": "8b8298dc-a9a4-4257-a6b9-f99d5ff65983" + }, + { + "key": "X-Correlation-ID", + "value": "5af5dfe2-b247-4624-8268-bb4e78593eb3" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2025-12-04T11:09:14Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9736898156&status=inactive\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/750cb586-eb9b-46c7-a1a5-711307a087af\",\n \"resource\": {\n \"id\": \"750cb586-eb9b-46c7-a1a5-711307a087af\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"Information Access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ],\n \"text\": \"Information Access Consent\"\n }\n ],\n \"dateTime\": \"2025-12-04T10:55:53Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898652\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2025-12-05\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ],\n \"text\": \"Patient Privacy Consent\"\n },\n \"status\": \"inactive\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n }\n ]\n}" + }, + { + "name": "Proxy roles returned - Filtered by status 'active' and include patient and performer details", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "some_token;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9736898156&status=active&_include=Consent:performer&_include=Consent:patient", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9736898156" + }, + { + "key": "status", + "value": "active" + }, + { + "key": "_include", + "value": "Consent:performer" + }, + { + "key": "_include", + "value": "Consent:patient" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Date", + "value": "Thu, 04 Dec 2025 11:09:41 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "4528" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "44c6f0cf-6bdb-4b96-8889-55ebe68b8c60" + }, + { + "key": "x-amz-apigw-id", + "value": "VD3M5FGYrPEFZVg=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-69316beb-f2f5e05791f831ed34fb0afa" + }, + { + "key": "X-Request-ID", + "value": "73bded49-9645-4418-bf08-ebd13d92c2a1" + }, + { + "key": "X-Correlation-ID", + "value": "15b5d9d5-9909-458a-91c5-64ee20e93a01" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2025-12-04T11:09:40Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9736898156&status=active&_include=Consent%3Aperformer&_include=Consent%3Apatient\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40\",\n \"resource\": {\n \"id\": \"4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"Information Access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ],\n \"text\": \"Information Access Consent\"\n }\n ],\n \"dateTime\": \"2025-12-04T11:08:46Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898660\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-12-05\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ],\n \"text\": \"Patient Privacy Consent\"\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898660\",\n \"resource\": {\n \"id\": \"9736898660\",\n \"meta\": {\n \"security\": [\n {\n \"code\": \"U\",\n \"display\": \"unrestricted\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-Confidentiality\"\n },\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ],\n \"versionId\": \"4\"\n },\n \"address\": [\n {\n \"extension\": [\n {\n \"extension\": [\n {\n \"url\": \"type\",\n \"valueCoding\": {\n \"code\": \"PAF\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType\"\n }\n },\n {\n \"url\": \"value\",\n \"valueString\": \"19976537\"\n }\n ],\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey\"\n }\n ],\n \"id\": \"pBQDr\",\n \"line\": [\n \"CARLTON\",\n \"VICARAGE LANE\",\n \"REDBOURNE\",\n \"GAINSBOROUGH\",\n \"LINCS\"\n ],\n \"period\": {\n \"start\": \"2025-07-15\"\n },\n \"postalCode\": \"DN21 4QW\",\n \"use\": \"home\"\n }\n ],\n \"birthDate\": \"2012-04-24\",\n \"gender\": \"female\",\n \"generalPractitioner\": [\n {\n \"id\": \"xSEnH\",\n \"identifier\": {\n \"period\": {\n \"start\": \"2024-11-06\"\n },\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A20047\"\n }\n }\n ],\n \"identifier\": [\n {\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"01\",\n \"display\": \"Number present and verified\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\n \"version\": \"1.0.0\"\n }\n ]\n }\n }\n ],\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898660\"\n }\n ],\n \"name\": [\n {\n \"family\": \"GODREY\",\n \"given\": [\n \"Davina\",\n \"Linda\"\n ],\n \"period\": {\n \"start\": \"2017-04-22\"\n },\n \"prefix\": [\n \"MISS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/nVLgl\",\n \"resource\": {\n \"id\": \"nVLgl\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898660\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" + } + ] + }, + { + "name": "Valid request - NPS - Get proxy roles for patient", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "" + ], + "type": "text/javascript", + "packages": {}, + "requests": {} + } + }, + { + "listen": "test", + "script": { + "exec": [ + "" + ], + "type": "text/javascript", + "packages": {}, + "requests": {} + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "SomeToken;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?patient:identifier=9736898644", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "patient:identifier", + "value": "9736898644" + } + ] + }, + "description": "This request and its examples will only retrieve proxy roles from the National Proxy Store and not directly from GPIT suppliers via NAM.\n\nSee folder level docs for more info.\n\n## Example scenario\n\n**Given** proxy roles exist for a patient in the National Proxy Store (NPS) \n**When** a GET /Consent request is sent with the patient identifier \n**Then** the proxy roles in NPS are returned\n\n## Authorization\n\nPlease see the folder overview for details of how to generate tokens for this endpoint." + }, + "response": [ + { + "name": "Proxy roles returned - No patient or performer details", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "a8fe6a8d-44c5-4451-b8e8-5cf5adc2db03", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "43c2ad8f-43a2-4cfc-8d3a-2b4298ab2b6d", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "some_token;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?patient:identifier=9736898644", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "patient:identifier", + "value": "9736898644" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Date", + "value": "Thu, 04 Dec 2025 11:17:19 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "3484" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "cd84643e-5789-445f-9d2f-eb53fe6b57c5" + }, + { + "key": "x-amz-apigw-id", + "value": "VD4VeEsnLPEFmxA=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-69316dbc-851b7fe822d672bb07d0be6d" + }, + { + "key": "X-Request-ID", + "value": "b7120974-233d-4634-80e2-f404e817f80b" + }, + { + "key": "X-Correlation-ID", + "value": "73e7ab39-f339-4f53-8090-d4320c6a1fc5" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2025-12-04T11:17:19Z\",\n \"total\": 2,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?patient%3Aidentifier=9736898644\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"resource\": {\n \"id\": \"7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"Information Access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ],\n \"text\": \"Information Access Consent\"\n }\n ],\n \"dateTime\": \"2025-12-04T10:46:27Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ],\n \"text\": \"Patient Privacy Consent\"\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"resource\": {\n \"id\": \"553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"Information Access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ],\n \"text\": \"Information Access Consent\"\n }\n ],\n \"dateTime\": \"2025-12-04T11:15:26Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ],\n \"text\": \"Patient Privacy Consent\"\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n }\n ]\n}" + }, + { + "name": "Proxy roles returned - Include performer details", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "some_token;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?patient:identifier=9736898644&_include=Consent:performer", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "patient:identifier", + "value": "9736898644" + }, + { + "key": "_include", + "value": "Consent:performer" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Date", + "value": "Thu, 04 Dec 2025 11:17:45 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "5287" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "d6ea589d-359b-43a5-ac3d-6b570eec9cac" + }, + { + "key": "x-amz-apigw-id", + "value": "VD4YuGlSLPEF7zw=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-69316dd1-47a064ac1a1d588355c13564" + }, + { + "key": "X-Request-ID", + "value": "eb00dad3-5e15-4ade-8ee9-f3597bfab4d3" + }, + { + "key": "X-Correlation-ID", + "value": "a496e8bd-c333-4e87-9927-bbe9ead436a4" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2025-12-04T11:17:45Z\",\n \"total\": 2,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?patient%3Aidentifier=9736898644&_include=Consent%3Aperformer\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"resource\": {\n \"id\": \"7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"Information Access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ],\n \"text\": \"Information Access Consent\"\n }\n ],\n \"dateTime\": \"2025-12-04T10:46:27Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ],\n \"text\": \"Patient Privacy Consent\"\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"resource\": {\n \"id\": \"553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"Information Access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ],\n \"text\": \"Information Access Consent\"\n }\n ],\n \"dateTime\": \"2025-12-04T11:15:26Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ],\n \"text\": \"Patient Privacy Consent\"\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/ZfgKO\",\n \"resource\": {\n \"id\": \"ZfgKO\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/EAONj\",\n \"resource\": {\n \"id\": \"EAONj\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" + }, + { + "name": "Proxy roles returned - Include patient details", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "some_token;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?patient:identifier=9736898644&_include=Consent:patient", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "patient:identifier", + "value": "9736898644" + }, + { + "key": "_include", + "value": "Consent:patient" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Date", + "value": "Thu, 04 Dec 2025 11:18:02 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "5218" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "3a81d012-80ef-4350-8d7b-1f8cda1ef809" + }, + { + "key": "x-amz-apigw-id", + "value": "VD4cPGnErPEFYsw=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-69316de7-bb724d308ffa3272269bfba9" + }, + { + "key": "X-Request-ID", + "value": "ada44c4a-9dcc-4666-a97e-72ebce5630a8" + }, + { + "key": "X-Correlation-ID", + "value": "cfa6112c-4235-41a4-9e58-f4f04d4f7614" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2025-12-04T11:18:02Z\",\n \"total\": 2,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?patient%3Aidentifier=9736898644&_include=Consent%3Apatient\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"resource\": {\n \"id\": \"7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"Information Access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ],\n \"text\": \"Information Access Consent\"\n }\n ],\n \"dateTime\": \"2025-12-04T10:46:27Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ],\n \"text\": \"Patient Privacy Consent\"\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"resource\": {\n \"id\": \"553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"Information Access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ],\n \"text\": \"Information Access Consent\"\n }\n ],\n \"dateTime\": \"2025-12-04T11:15:26Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ],\n \"text\": \"Patient Privacy Consent\"\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898644\",\n \"resource\": {\n \"id\": \"9736898644\",\n \"meta\": {\n \"security\": [\n {\n \"code\": \"U\",\n \"display\": \"unrestricted\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-Confidentiality\"\n },\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ],\n \"versionId\": \"4\"\n },\n \"address\": [\n {\n \"extension\": [\n {\n \"extension\": [\n {\n \"url\": \"type\",\n \"valueCoding\": {\n \"code\": \"PAF\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType\"\n }\n },\n {\n \"url\": \"value\",\n \"valueString\": \"29706100\"\n }\n ],\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey\"\n }\n ],\n \"id\": \"gDmhc\",\n \"line\": [\n \"BRAMBLE COTTAGE\",\n \"OLD VICARAGE PARK\",\n \"SCAWBY\",\n \"BRIGG\",\n \"S HUMBERSIDE\"\n ],\n \"period\": {\n \"start\": \"2021-09-10\"\n },\n \"postalCode\": \"DN20 9RL\",\n \"use\": \"home\"\n }\n ],\n \"birthDate\": \"2015-09-26\",\n \"gender\": \"female\",\n \"generalPractitioner\": [\n {\n \"id\": \"gDHTb\",\n \"identifier\": {\n \"period\": {\n \"start\": \"2018-08-22\"\n },\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A20047\"\n }\n }\n ],\n \"identifier\": [\n {\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"01\",\n \"display\": \"Number present and verified\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\n \"version\": \"1.0.0\"\n }\n ]\n }\n }\n ],\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n ],\n \"name\": [\n {\n \"family\": \"SHEPP\",\n \"given\": [\n \"Ashley\",\n \"Ellen\"\n ],\n \"period\": {\n \"start\": \"2025-08-06\"\n },\n \"prefix\": [\n \"MS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" + }, + { + "name": "Proxy roles returned - Include patient and performer details", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "some_token;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?patient:identifier=9736898644&_include=Consent:performer&_include=Consent:patient", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "patient:identifier", + "value": "9736898644" + }, + { + "key": "_include", + "value": "Consent:performer" + }, + { + "key": "_include", + "value": "Consent:patient" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Date", + "value": "Thu, 04 Dec 2025 11:18:17 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "7021" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "013f49d1-ffbe-4880-bfd6-1b92d13d08a3" + }, + { + "key": "x-amz-apigw-id", + "value": "VD4evE6yLPEFZZA=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-69316df7-175910d69cd894708a0921b9" + }, + { + "key": "X-Request-ID", + "value": "9ce9a6d5-2bd2-4d5e-a984-2c78a457f4d4" + }, + { + "key": "X-Correlation-ID", + "value": "02eabdf7-0a76-4fec-9c99-306273ea8da5" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2025-12-04T11:18:17Z\",\n \"total\": 2,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?patient%3Aidentifier=9736898644&_include=Consent%3Aperformer&_include=Consent%3Apatient\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"resource\": {\n \"id\": \"7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"Information Access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ],\n \"text\": \"Information Access Consent\"\n }\n ],\n \"dateTime\": \"2025-12-04T10:46:27Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ],\n \"text\": \"Patient Privacy Consent\"\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"resource\": {\n \"id\": \"553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"Information Access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ],\n \"text\": \"Information Access Consent\"\n }\n ],\n \"dateTime\": \"2025-12-04T11:15:26Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ],\n \"text\": \"Patient Privacy Consent\"\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898644\",\n \"resource\": {\n \"id\": \"9736898644\",\n \"meta\": {\n \"security\": [\n {\n \"code\": \"U\",\n \"display\": \"unrestricted\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-Confidentiality\"\n },\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ],\n \"versionId\": \"4\"\n },\n \"address\": [\n {\n \"extension\": [\n {\n \"extension\": [\n {\n \"url\": \"type\",\n \"valueCoding\": {\n \"code\": \"PAF\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType\"\n }\n },\n {\n \"url\": \"value\",\n \"valueString\": \"29706100\"\n }\n ],\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey\"\n }\n ],\n \"id\": \"gDmhc\",\n \"line\": [\n \"BRAMBLE COTTAGE\",\n \"OLD VICARAGE PARK\",\n \"SCAWBY\",\n \"BRIGG\",\n \"S HUMBERSIDE\"\n ],\n \"period\": {\n \"start\": \"2021-09-10\"\n },\n \"postalCode\": \"DN20 9RL\",\n \"use\": \"home\"\n }\n ],\n \"birthDate\": \"2015-09-26\",\n \"gender\": \"female\",\n \"generalPractitioner\": [\n {\n \"id\": \"gDHTb\",\n \"identifier\": {\n \"period\": {\n \"start\": \"2018-08-22\"\n },\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A20047\"\n }\n }\n ],\n \"identifier\": [\n {\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"01\",\n \"display\": \"Number present and verified\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\n \"version\": \"1.0.0\"\n }\n ]\n }\n }\n ],\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n ],\n \"name\": [\n {\n \"family\": \"SHEPP\",\n \"given\": [\n \"Ashley\",\n \"Ellen\"\n ],\n \"period\": {\n \"start\": \"2025-08-06\"\n },\n \"prefix\": [\n \"MS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/ZfgKO\",\n \"resource\": {\n \"id\": \"ZfgKO\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/EAONj\",\n \"resource\": {\n \"id\": \"EAONj\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" + }, + { + "name": "Proxy roles returned - Filtered by status 'inactive'", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "some_token;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?patient:identifier=9736898717&status=inactive", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "patient:identifier", + "value": "9736898717" + }, + { + "key": "status", + "value": "inactive" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Date", + "value": "Thu, 04 Dec 2025 11:18:37 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "1886" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "595418c1-5c22-46b6-907c-e799e9fdf609" + }, + { + "key": "x-amz-apigw-id", + "value": "VD4iFHTWLPEFnHA=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-69316e0c-b334c67c9e4d72fd5809672a" + }, + { + "key": "X-Request-ID", + "value": "e6ad06af-45a7-4f98-92c2-88300871c3bc" + }, + { + "key": "X-Correlation-ID", + "value": "8d75c837-bd9e-4784-ac40-84322ee4d188" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2025-12-04T11:18:37Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?patient%3Aidentifier=9736898717&status=inactive\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/cf7bc8e6-f8e0-41c5-8d08-1741eee5a256\",\n \"resource\": {\n \"id\": \"cf7bc8e6-f8e0-41c5-8d08-1741eee5a256\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"Information Access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ],\n \"text\": \"Information Access Consent\"\n }\n ],\n \"dateTime\": \"2025-12-04T11:16:43Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ],\n \"text\": \"Patient Privacy Consent\"\n },\n \"status\": \"inactive\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n }\n ]\n}" + }, + { + "name": "Proxy roles returned - Filtered by status 'active' and include patient and performer details", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "some_token;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?patient:identifier=9736898717&status=active&_include=Consent:performer&_include=Consent:patient", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "patient:identifier", + "value": "9736898717" + }, + { + "key": "status", + "value": "active" + }, + { + "key": "_include", + "value": "Consent:performer" + }, + { + "key": "_include", + "value": "Consent:patient" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Date", + "value": "Thu, 04 Dec 2025 11:18:51 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "4528" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "bd5079fb-1fc3-428c-ab53-5ba1dfacc510" + }, + { + "key": "x-amz-apigw-id", + "value": "VD4kRHuoLPEF-DQ=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-69316e1a-0dc7c19d64d48ad8a86c4518" + }, + { + "key": "X-Request-ID", + "value": "8da5a25e-ef8b-4cec-84c0-81af22e5132f" + }, + { + "key": "X-Correlation-ID", + "value": "ce7840a8-db71-4897-9853-d06c699adca9" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2025-12-04T11:18:51Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?patient%3Aidentifier=9736898717&status=active&_include=Consent%3Aperformer&_include=Consent%3Apatient\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/b22d6068-fe78-40f4-b71a-b916dac48c0b\",\n \"resource\": {\n \"id\": \"b22d6068-fe78-40f4-b71a-b916dac48c0b\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"Information Access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ],\n \"text\": \"Information Access Consent\"\n }\n ],\n \"dateTime\": \"2025-12-04T10:47:43Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ],\n \"text\": \"Patient Privacy Consent\"\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898717\",\n \"resource\": {\n \"id\": \"9736898717\",\n \"meta\": {\n \"security\": [\n {\n \"code\": \"U\",\n \"display\": \"unrestricted\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-Confidentiality\"\n },\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ],\n \"versionId\": \"4\"\n },\n \"address\": [\n {\n \"extension\": [\n {\n \"extension\": [\n {\n \"url\": \"type\",\n \"valueCoding\": {\n \"code\": \"PAF\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType\"\n }\n },\n {\n \"url\": \"value\",\n \"valueString\": \"16654057\"\n }\n ],\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey\"\n }\n ],\n \"id\": \"YoGEf\",\n \"line\": [\n \"GLENVILLE\",\n \"FERRY ROAD\",\n \"GOXHILL\",\n \"BARROW-UPON-HUMBER\",\n \"S HUMBERSIDE\"\n ],\n \"period\": {\n \"start\": \"2016-04-09\"\n },\n \"postalCode\": \"DN19 7JY\",\n \"use\": \"home\"\n }\n ],\n \"birthDate\": \"2010-05-31\",\n \"gender\": \"male\",\n \"generalPractitioner\": [\n {\n \"id\": \"bYoHa\",\n \"identifier\": {\n \"period\": {\n \"start\": \"2016-02-12\"\n },\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A20047\"\n }\n }\n ],\n \"identifier\": [\n {\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"01\",\n \"display\": \"Number present and verified\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\n \"version\": \"1.0.0\"\n }\n ]\n }\n }\n ],\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n ],\n \"name\": [\n {\n \"family\": \"CASH\",\n \"given\": [\n \"Jacob\",\n \"Chas\"\n ],\n \"period\": {\n \"start\": \"2025-07-22\"\n },\n \"prefix\": [\n \"MR\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/UwTCq\",\n \"resource\": {\n \"id\": \"UwTCq\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" + } + ] + }, + { + "name": "Valid request - NPS - Get proxy roles for patient and proxy", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "" + ], + "type": "text/javascript", + "packages": {}, + "requests": {} + } + }, + { + "listen": "test", + "script": { + "exec": [ + "" + ], + "type": "text/javascript", + "packages": {}, + "requests": {} + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "SomeToken;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9736898121&patient:identifier=9736898644", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9736898121" + }, + { + "key": "patient:identifier", + "value": "9736898644" + } + ] + }, + "description": "This request and its examples will only retrieve proxy roles from the National Proxy Store and not directly from GPIT suppliers via NAM.\n\nSee folder level docs for more info.\n\n## Example scenario\n\n**Given** proxy roles exist for a patient in the National Proxy Store (NPS) \n**When** a GET /Consent request is sent with the performer and patient identifier \n**Then** a single proxy role from NPS is returned\n\n## Authorization\n\nPlease see the folder overview for details of how to generate tokens for this endpoint." + }, + "response": [ + { + "name": "Proxy roles returned - No patient or performer details", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "4d896833-170b-4dc9-a455-66db155cb5c1", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "1525b9dd-abde-44c0-a226-c93af7e47d8e", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "some_token;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9736898121&patient:identifier=9736898644", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9736898121" + }, + { + "key": "patient:identifier", + "value": "9736898644" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Date", + "value": "Thu, 04 Dec 2025 11:19:27 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "1902" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "3d56eb4c-4bc0-47d8-bc61-a55b098dfd9c" + }, + { + "key": "x-amz-apigw-id", + "value": "VD4p_GRgrPEFVPA=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-69316e3f-6ddd811fdb997165b9c6a0d5" + }, + { + "key": "X-Request-ID", + "value": "f8ac2f03-2a5f-4ff7-8ada-093f55fb9c38" + }, + { + "key": "X-Correlation-ID", + "value": "8fc4ed98-4b94-41e1-bff0-0065b6058201" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2025-12-04T11:19:27Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9736898121&patient%3Aidentifier=9736898644\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"resource\": {\n \"id\": \"553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"Information Access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ],\n \"text\": \"Information Access Consent\"\n }\n ],\n \"dateTime\": \"2025-12-04T11:15:26Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ],\n \"text\": \"Patient Privacy Consent\"\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n }\n ]\n}" + }, + { + "name": "Proxy roles returned - Include performer details", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "some_token;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9736898121&patient:identifier=9736898644&_include=Consent:performer", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9736898121" + }, + { + "key": "patient:identifier", + "value": "9736898644" + }, + { + "key": "_include", + "value": "Consent:performer" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Date", + "value": "Thu, 04 Dec 2025 11:19:44 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "2818" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "12da5c87-c8eb-4085-ad09-ab9df3923150" + }, + { + "key": "x-amz-apigw-id", + "value": "VD4slFJ5rPEF6Mg=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-69316e50-a15563e078d9633ab0d45fb6" + }, + { + "key": "X-Request-ID", + "value": "51afba5e-eea1-415e-a0c3-bc5d47e884fd" + }, + { + "key": "X-Correlation-ID", + "value": "c31bc807-8bc9-4aa5-b531-f44fbfeeef0c" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2025-12-04T11:19:44Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9736898121&patient%3Aidentifier=9736898644&_include=Consent%3Aperformer\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"resource\": {\n \"id\": \"553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"Information Access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ],\n \"text\": \"Information Access Consent\"\n }\n ],\n \"dateTime\": \"2025-12-04T11:15:26Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ],\n \"text\": \"Patient Privacy Consent\"\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/EAONj\",\n \"resource\": {\n \"id\": \"EAONj\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" + }, + { + "name": "Proxy roles returned - Include patient details", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "some_token;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9736898121&patient:identifier=9736898644&_include=Consent:patient", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9736898121" + }, + { + "key": "patient:identifier", + "value": "9736898644" + }, + { + "key": "_include", + "value": "Consent:patient" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Date", + "value": "Thu, 04 Dec 2025 11:19:57 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "3636" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "341e64dd-974f-4307-a16b-e775c0777fdd" + }, + { + "key": "x-amz-apigw-id", + "value": "VD4uhGhjLPEF8-A=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-69316e5c-16469b05761a5ee0d5ffe220" + }, + { + "key": "X-Request-ID", + "value": "2762b971-bfcc-42c6-be87-b2d2a98cf5b5" + }, + { + "key": "X-Correlation-ID", + "value": "94e42484-2c4d-46fc-8364-027c06a21798" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2025-12-04T11:19:56Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9736898121&patient%3Aidentifier=9736898644&_include=Consent%3Apatient\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"resource\": {\n \"id\": \"553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"Information Access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ],\n \"text\": \"Information Access Consent\"\n }\n ],\n \"dateTime\": \"2025-12-04T11:15:26Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ],\n \"text\": \"Patient Privacy Consent\"\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898644\",\n \"resource\": {\n \"id\": \"9736898644\",\n \"meta\": {\n \"security\": [\n {\n \"code\": \"U\",\n \"display\": \"unrestricted\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-Confidentiality\"\n },\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ],\n \"versionId\": \"4\"\n },\n \"address\": [\n {\n \"extension\": [\n {\n \"extension\": [\n {\n \"url\": \"type\",\n \"valueCoding\": {\n \"code\": \"PAF\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType\"\n }\n },\n {\n \"url\": \"value\",\n \"valueString\": \"29706100\"\n }\n ],\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey\"\n }\n ],\n \"id\": \"gDmhc\",\n \"line\": [\n \"BRAMBLE COTTAGE\",\n \"OLD VICARAGE PARK\",\n \"SCAWBY\",\n \"BRIGG\",\n \"S HUMBERSIDE\"\n ],\n \"period\": {\n \"start\": \"2021-09-10\"\n },\n \"postalCode\": \"DN20 9RL\",\n \"use\": \"home\"\n }\n ],\n \"birthDate\": \"2015-09-26\",\n \"gender\": \"female\",\n \"generalPractitioner\": [\n {\n \"id\": \"gDHTb\",\n \"identifier\": {\n \"period\": {\n \"start\": \"2018-08-22\"\n },\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A20047\"\n }\n }\n ],\n \"identifier\": [\n {\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"01\",\n \"display\": \"Number present and verified\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\n \"version\": \"1.0.0\"\n }\n ]\n }\n }\n ],\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n ],\n \"name\": [\n {\n \"family\": \"SHEPP\",\n \"given\": [\n \"Ashley\",\n \"Ellen\"\n ],\n \"period\": {\n \"start\": \"2025-08-06\"\n },\n \"prefix\": [\n \"MS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" + }, + { + "name": "Proxy roles returned - Include patient and performer details", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "some_token;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9736898121&patient:identifier=9736898644&_include=Consent:performer&_include=Consent:patient", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9736898121" + }, + { + "key": "patient:identifier", + "value": "9736898644" + }, + { + "key": "_include", + "value": "Consent:performer" + }, + { + "key": "_include", + "value": "Consent:patient" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Date", + "value": "Thu, 04 Dec 2025 11:20:24 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "4552" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "306d5243-752e-45e4-9c44-f175a008c1de" + }, + { + "key": "x-amz-apigw-id", + "value": "VD4y2Gg1rPEFcxQ=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-69316e78-df1338116d16a7272e1de2dc" + }, + { + "key": "X-Request-ID", + "value": "b05f7a59-c008-47d8-868c-011cbdf17500" + }, + { + "key": "X-Correlation-ID", + "value": "95f4ebb0-274e-4757-91f3-91a5fc0a3f0f" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2025-12-04T11:20:24Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9736898121&patient%3Aidentifier=9736898644&_include=Consent%3Aperformer&_include=Consent%3Apatient\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"resource\": {\n \"id\": \"553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"Information Access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ],\n \"text\": \"Information Access Consent\"\n }\n ],\n \"dateTime\": \"2025-12-04T11:15:26Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ],\n \"text\": \"Patient Privacy Consent\"\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898644\",\n \"resource\": {\n \"id\": \"9736898644\",\n \"meta\": {\n \"security\": [\n {\n \"code\": \"U\",\n \"display\": \"unrestricted\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-Confidentiality\"\n },\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ],\n \"versionId\": \"4\"\n },\n \"address\": [\n {\n \"extension\": [\n {\n \"extension\": [\n {\n \"url\": \"type\",\n \"valueCoding\": {\n \"code\": \"PAF\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType\"\n }\n },\n {\n \"url\": \"value\",\n \"valueString\": \"29706100\"\n }\n ],\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey\"\n }\n ],\n \"id\": \"gDmhc\",\n \"line\": [\n \"BRAMBLE COTTAGE\",\n \"OLD VICARAGE PARK\",\n \"SCAWBY\",\n \"BRIGG\",\n \"S HUMBERSIDE\"\n ],\n \"period\": {\n \"start\": \"2021-09-10\"\n },\n \"postalCode\": \"DN20 9RL\",\n \"use\": \"home\"\n }\n ],\n \"birthDate\": \"2015-09-26\",\n \"gender\": \"female\",\n \"generalPractitioner\": [\n {\n \"id\": \"gDHTb\",\n \"identifier\": {\n \"period\": {\n \"start\": \"2018-08-22\"\n },\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A20047\"\n }\n }\n ],\n \"identifier\": [\n {\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"01\",\n \"display\": \"Number present and verified\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\n \"version\": \"1.0.0\"\n }\n ]\n }\n }\n ],\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n ],\n \"name\": [\n {\n \"family\": \"SHEPP\",\n \"given\": [\n \"Ashley\",\n \"Ellen\"\n ],\n \"period\": {\n \"start\": \"2025-08-06\"\n },\n \"prefix\": [\n \"MS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/EAONj\",\n \"resource\": {\n \"id\": \"EAONj\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" + }, + { + "name": "Proxy roles returned - Filtered by status 'inactive'", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "some_token;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9736898156&patient:identifier=9736898652&status=inactive", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9736898156" + }, + { + "key": "patient:identifier", + "value": "9736898652" + }, + { + "key": "status", + "value": "inactive" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Date", + "value": "Thu, 04 Dec 2025 11:21:09 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "1920" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "24bfc7a0-5f30-47b4-a751-7534837f5224" + }, + { + "key": "x-amz-apigw-id", + "value": "VD455ErXrPEFuaQ=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-69316ea5-6c272d90a7d3656142da3073" + }, + { + "key": "X-Request-ID", + "value": "67a71930-24b3-4baa-8b13-65f27c413a41" + }, + { + "key": "X-Correlation-ID", + "value": "dd934795-88bf-44a3-a2c3-eff757413bfb" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2025-12-04T11:21:09Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9736898156&patient%3Aidentifier=9736898652&status=inactive\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/750cb586-eb9b-46c7-a1a5-711307a087af\",\n \"resource\": {\n \"id\": \"750cb586-eb9b-46c7-a1a5-711307a087af\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"Information Access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ],\n \"text\": \"Information Access Consent\"\n }\n ],\n \"dateTime\": \"2025-12-04T10:55:53Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898652\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2025-12-05\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ],\n \"text\": \"Patient Privacy Consent\"\n },\n \"status\": \"inactive\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n }\n ]\n}" + }, + { + "name": "Proxy roles returned - Filtered by status 'active' and include patient and performer details", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "some_token;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9736898156&patient:identifier=9736898652&status=active&_include=Consent:performer&_include=Consent:patient", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9736898156" + }, + { + "key": "patient:identifier", + "value": "9736898652" + }, + { + "key": "status", + "value": "active" + }, + { + "key": "_include", + "value": "Consent:performer" + }, + { + "key": "_include", + "value": "Consent:patient" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Date", + "value": "Thu, 04 Dec 2025 11:21:28 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "2038" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "f44b69f0-f814-4e0f-89eb-349f1f7e143d" + }, + { + "key": "x-amz-apigw-id", + "value": "VD48uEKHLPEF67A=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-69316eb7-00b15aebe653e94192bc60ee" + }, + { + "key": "X-Request-ID", + "value": "8f40b74e-99fa-4401-bcf1-def08a63da50" + }, + { + "key": "X-Correlation-ID", + "value": "1460d166-ba8d-4d1c-8822-83394abe1169" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2025-12-04T11:21:27Z\",\n \"total\": 0,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9736898156&patient%3Aidentifier=9736898652&status=active&_include=Consent%3Aperformer&_include=Consent%3Apatient\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898652\",\n \"resource\": {\n \"id\": \"9736898652\",\n \"meta\": {\n \"security\": [\n {\n \"code\": \"U\",\n \"display\": \"unrestricted\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-Confidentiality\"\n },\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ],\n \"versionId\": \"4\"\n },\n \"address\": [\n {\n \"extension\": [\n {\n \"extension\": [\n {\n \"url\": \"type\",\n \"valueCoding\": {\n \"code\": \"PAF\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType\"\n }\n },\n {\n \"url\": \"value\",\n \"valueString\": \"6290975\"\n }\n ],\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey\"\n }\n ],\n \"id\": \"RPnzd\",\n \"line\": [\n \"77 ANGERSTEIN ROAD\",\n \"SCUNTHORPE\",\n \"S HUMBERSIDE\"\n ],\n \"period\": {\n \"start\": \"2019-11-10\"\n },\n \"postalCode\": \"DN17 2NB\",\n \"use\": \"home\"\n }\n ],\n \"birthDate\": \"2013-09-02\",\n \"gender\": \"female\",\n \"generalPractitioner\": [\n {\n \"id\": \"yIjPV\",\n \"identifier\": {\n \"period\": {\n \"start\": \"2021-01-07\"\n },\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A20047\"\n }\n }\n ],\n \"identifier\": [\n {\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"01\",\n \"display\": \"Number present and verified\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\n \"version\": \"1.0.0\"\n }\n ]\n }\n }\n ],\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898652\"\n }\n ],\n \"name\": [\n {\n \"family\": \"CLYDE\",\n \"given\": [\n \"Deanne\",\n \"Tara\"\n ],\n \"period\": {\n \"start\": \"2018-06-16\"\n },\n \"prefix\": [\n \"MS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" + } + ] + }, + { + "name": "Valid request - NAM - Get proxy roles", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "" + ], + "type": "text/javascript", + "packages": {}, + "requests": {} + } + }, + { + "listen": "test", + "script": { + "exec": [ + "" + ], + "type": "text/javascript", + "packages": {}, + "requests": {} + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "{{tpp_9674998535_access_token}};A82648", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=false;nam-cache-enabled=false;nam-enabled=true;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9674998535", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9674998535" + } + ] + }, + "description": "This request and its examples will only retrieve proxy roles directly from GPIT suppliers via NAM and not from the National Proxy Store.\n\nSee folder level docs for more info.\n\n## Example scenario\n\n**Given** proxy roles exist for a patient/performer in a GPIT system \n**And** no proxy roles exist in the National Proxy Store (NPS) for the patient/performer \n**When** a GET /Consent request is sent with the performer/patient identifier \n**Then** the proxy roles from GPIT are returned\n\n## Authorization\n\nPlease see the folder overview for details of how to generate tokens for this endpoint." + }, + "response": [ + { + "name": "No linked profiles returned from NAM - TPP user", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "83892b1a-6369-4657-a0c3-f6071a25e226", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "b496d552-f0c3-4e20-b362-cfc0c80724e3", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "{{tpp_9674998535_access_token}};A82648", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=false;nam-cache-enabled=false;nam-enabled=true;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9674998535&_include=Consent:performer&_include=Consent:patient", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9674998535" + }, + { + "key": "_include", + "value": "Consent:performer" + }, + { + "key": "_include", + "value": "Consent:patient" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Date", + "value": "Thu, 04 Dec 2025 11:22:00 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "5773" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "94465816-7aaa-4d03-81c9-e19156606316" + }, + { + "key": "x-amz-apigw-id", + "value": "VD5BAEGOLPEFVPA=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-69316ed8-af72bfe69942b25c155a4daa" + }, + { + "key": "X-Request-ID", + "value": "ed28025a-9c27-468c-85fd-9b1b8f794198" + }, + { + "key": "X-Correlation-ID", + "value": "fbd025d4-c7e1-4085-8bf8-d11b84652f8d" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2025-12-04T11:22:00Z\",\n \"total\": 2,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9674998535&_include=Consent%3Aperformer&_include=Consent%3Apatient\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/3a86ad92\",\n \"resource\": {\n \"id\": \"3a86ad92\",\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"Information Access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ],\n \"text\": \"Information Access Consent\"\n }\n ],\n \"dateTime\": \"2025-12-04T11:21:58.915488+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9692113736\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998535\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998535\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ],\n \"text\": \"Patient Privacy Consent\"\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/5c0c47d9\",\n \"resource\": {\n \"id\": \"5c0c47d9\",\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"Information Access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ],\n \"text\": \"Information Access Consent\"\n }\n ],\n \"dateTime\": \"2025-12-04T11:21:58.915640+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998454\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998535\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998535\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ],\n \"text\": \"Patient Privacy Consent\"\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/0b36c4e0\",\n \"resource\": {\n \"id\": \"0b36c4e0\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998535\"\n },\n {\n \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",\n \"value\": \"8af3500000000000\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9692113736\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/bd6da0a0\",\n \"resource\": {\n \"id\": \"bd6da0a0\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998535\"\n },\n {\n \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",\n \"value\": \"8af3500000000000\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998454\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/e41dfa63\",\n \"resource\": {\n \"id\": \"e41dfa63\",\n \"meta\": {\n \"profile\": [\n \"https://fhir.hl7.org.uk/StructureDefinition/UKCore-Patient\"\n ],\n \"security\": [\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ]\n },\n \"birthDate\": \"1985-05-29\",\n \"generalPractitioner\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A82648\"\n }\n }\n ],\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9692113736\"\n },\n {\n \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",\n \"value\": \"84df400000000000\"\n }\n ],\n \"name\": [\n {\n \"text\": \"Mr Kevin Barry\",\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/2d10a3d9\",\n \"resource\": {\n \"id\": \"2d10a3d9\",\n \"meta\": {\n \"profile\": [\n \"https://fhir.hl7.org.uk/StructureDefinition/UKCore-Patient\"\n ],\n \"security\": [\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ]\n },\n \"birthDate\": \"1921-10-17\",\n \"generalPractitioner\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A82648\"\n }\n }\n ],\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998454\"\n },\n {\n \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",\n \"value\": \"d024500000000000\"\n }\n ],\n \"name\": [\n {\n \"text\": \"Mr Landon Fahey\",\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" + }, + { + "name": "Linked profiles returned from NAM - TPP user", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "{{tpp_9674998454_access_token}};A82648", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=false;nam-cache-enabled=false;nam-enabled=true;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9674998454&_include=Consent:patient", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9674998454" + }, + { + "key": "_include", + "value": "Consent:patient" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Date", + "value": "Thu, 04 Dec 2025 11:22:15 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "4370" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "1b190446-e56f-4a64-8c54-25688af8f8f7" + }, + { + "key": "x-amz-apigw-id", + "value": "VD5EAFv1rPEF7zw=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-69316ee6-9925773ab605850282f2d18c" + }, + { + "key": "X-Request-ID", + "value": "dfa182c6-8f6a-46e9-bdc1-1ef5a00740c1" + }, + { + "key": "X-Correlation-ID", + "value": "d50ce1da-c025-451c-847e-c405c299115f" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2025-12-04T11:22:15Z\",\n \"total\": 2,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9674998454&_include=Consent%3Apatient\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/92a66114\",\n \"resource\": {\n \"id\": \"92a66114\",\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"Information Access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ],\n \"text\": \"Information Access Consent\"\n }\n ],\n \"dateTime\": \"2025-12-04T11:22:15.290954+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998640\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998454\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998454\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ],\n \"text\": \"Patient Privacy Consent\"\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/0b02be0a\",\n \"resource\": {\n \"id\": \"0b02be0a\",\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"Information Access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ],\n \"text\": \"Information Access Consent\"\n }\n ],\n \"dateTime\": \"2025-12-04T11:22:15.290994+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998543\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998454\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998454\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ],\n \"text\": \"Patient Privacy Consent\"\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/934bfd54\",\n \"resource\": {\n \"id\": \"934bfd54\",\n \"meta\": {\n \"profile\": [\n \"https://fhir.hl7.org.uk/StructureDefinition/UKCore-Patient\"\n ],\n \"security\": [\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ]\n },\n \"birthDate\": \"1998-11-14\",\n \"generalPractitioner\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A82648\"\n }\n }\n ],\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998640\"\n },\n {\n \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",\n \"value\": \"e254500000000000\"\n }\n ],\n \"name\": [\n {\n \"text\": \"Mr Harry Hood\",\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/29b6ab39\",\n \"resource\": {\n \"id\": \"29b6ab39\",\n \"meta\": {\n \"profile\": [\n \"https://fhir.hl7.org.uk/StructureDefinition/UKCore-Patient\"\n ],\n \"security\": [\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ]\n },\n \"birthDate\": \"1930-11-02\",\n \"generalPractitioner\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A82648\"\n }\n }\n ],\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998543\"\n },\n {\n \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",\n \"value\": \"52f3500000000000\"\n }\n ],\n \"name\": [\n {\n \"text\": \"Miss Lisa Hankey\",\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" + }, + { + "name": "No linked profiles returned from NAM - EMIS user", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "{{emis_9692113612_access_token}};A29928", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=false;nam-cache-enabled=false;nam-enabled=true;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9692113612&_include=Consent:patient", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9692113612" + }, + { + "key": "_include", + "value": "Consent:patient" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Date", + "value": "Thu, 04 Dec 2025 11:22:37 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "283" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "15121c1a-99de-4830-86c7-00925d4faf3a" + }, + { + "key": "x-amz-apigw-id", + "value": "VD5HEE6MLPEFz5w=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-69316ef9-58a10d83bc130c381cdb0b44" + }, + { + "key": "X-Request-ID", + "value": "1828501c-86dc-4baf-9a13-e37a822e327f" + }, + { + "key": "X-Correlation-ID", + "value": "b891fe97-7778-4db5-be39-b23c03879d2d" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2025-12-04T11:22:36Z\",\n \"total\": 0,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9692113612&_include=Consent%3Apatient\"\n }\n ],\n \"entry\": []\n}" + }, + { + "name": "Linked profiles returned from NAM - EMIS user", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "{{emis_9692113698_access_token}};A00002", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=false;nam-cache-enabled=false;nam-enabled=true;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9692113698&_include=Consent:performer", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9692113698" + }, + { + "key": "_include", + "value": "Consent:patient", + "disabled": true + }, + { + "key": "_include", + "value": "Consent:performer" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Date", + "value": "Thu, 04 Dec 2025 11:24:08 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "17617" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "739313dc-9917-4df2-9b9d-e59bf36d8c4e" + }, + { + "key": "x-amz-apigw-id", + "value": "VD5U-FHkLPEF0fw=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-69316f52-1205235fe7d41983ba807831" + }, + { + "key": "X-Request-ID", + "value": "2eb98c87-f421-4902-a885-ecc408bd8d89" + }, + { + "key": "X-Correlation-ID", + "value": "4ac19b94-25d4-4de6-9be6-fe5a4a520d15" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2025-12-04T11:24:08Z\",\n \"total\": 9,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9692113698&_include=Consent%3Aperformer\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/2993b769\",\n \"resource\": {\n \"id\": \"2993b769\",\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"Information Access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ],\n \"text\": \"Information Access Consent\"\n }\n ],\n \"dateTime\": \"2025-12-04T11:24:07.874676+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9661034451\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ],\n \"text\": \"Patient Privacy Consent\"\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/c0d48822\",\n \"resource\": {\n \"id\": \"c0d48822\",\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"Information Access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ],\n \"text\": \"Information Access Consent\"\n }\n ],\n \"dateTime\": \"2025-12-04T11:24:07.874715+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998403\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ],\n \"text\": \"Patient Privacy Consent\"\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/75d0c9dc\",\n \"resource\": {\n \"id\": \"75d0c9dc\",\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"Information Access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ],\n \"text\": \"Information Access Consent\"\n }\n ],\n \"dateTime\": \"2025-12-04T11:24:07.874739+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9661034400\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ],\n \"text\": \"Patient Privacy Consent\"\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/2bed6c1e\",\n \"resource\": {\n \"id\": \"2bed6c1e\",\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"Information Access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ],\n \"text\": \"Information Access Consent\"\n }\n ],\n \"dateTime\": \"2025-12-04T11:24:07.874762+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9661034168\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ],\n \"text\": \"Patient Privacy Consent\"\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/ed77c791\",\n \"resource\": {\n \"id\": \"ed77c791\",\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"Information Access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ],\n \"text\": \"Information Access Consent\"\n }\n ],\n \"dateTime\": \"2025-12-04T11:24:07.874785+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9253046414\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ],\n \"text\": \"Patient Privacy Consent\"\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/02e9fe06\",\n \"resource\": {\n \"id\": \"02e9fe06\",\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"Information Access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ],\n \"text\": \"Information Access Consent\"\n }\n ],\n \"dateTime\": \"2025-12-04T11:24:07.874807+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9930725970\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ],\n \"text\": \"Patient Privacy Consent\"\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/70f274ba\",\n \"resource\": {\n \"id\": \"70f274ba\",\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"Information Access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ],\n \"text\": \"Information Access Consent\"\n }\n ],\n \"dateTime\": \"2025-12-04T11:24:07.874830+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9803007025\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ],\n \"text\": \"Patient Privacy Consent\"\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/87501704\",\n \"resource\": {\n \"id\": \"87501704\",\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"Information Access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ],\n \"text\": \"Information Access Consent\"\n }\n ],\n \"dateTime\": \"2025-12-04T11:24:07.874852+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9734615173\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ],\n \"text\": \"Patient Privacy Consent\"\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/022a7290\",\n \"resource\": {\n \"id\": \"022a7290\",\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"Information Access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ],\n \"text\": \"Information Access Consent\"\n }\n ],\n \"dateTime\": \"2025-12-04T11:24:07.874874+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9694154065\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ],\n \"text\": \"Patient Privacy Consent\"\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/4931d7ae\",\n \"resource\": {\n \"id\": \"4931d7ae\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n },\n {\n \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",\n \"value\": \"a6f2b11f-0f96-4487-83b0-bca6c9aae2bd\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9661034451\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/34e6ba88\",\n \"resource\": {\n \"id\": \"34e6ba88\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n },\n {\n \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",\n \"value\": \"a6f2b11f-0f96-4487-83b0-bca6c9aae2bd\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998403\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/1b0f7204\",\n \"resource\": {\n \"id\": \"1b0f7204\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n },\n {\n \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",\n \"value\": \"a6f2b11f-0f96-4487-83b0-bca6c9aae2bd\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9661034400\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/7115d670\",\n \"resource\": {\n \"id\": \"7115d670\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n },\n {\n \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",\n \"value\": \"a6f2b11f-0f96-4487-83b0-bca6c9aae2bd\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9661034168\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/63bd0423\",\n \"resource\": {\n \"id\": \"63bd0423\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n },\n {\n \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",\n \"value\": \"a6f2b11f-0f96-4487-83b0-bca6c9aae2bd\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9253046414\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/04683858\",\n \"resource\": {\n \"id\": \"04683858\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n },\n {\n \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",\n \"value\": \"a6f2b11f-0f96-4487-83b0-bca6c9aae2bd\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9930725970\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/e0cff956\",\n \"resource\": {\n \"id\": \"e0cff956\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n },\n {\n \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",\n \"value\": \"a6f2b11f-0f96-4487-83b0-bca6c9aae2bd\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9803007025\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/a9f54c1c\",\n \"resource\": {\n \"id\": \"a9f54c1c\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n },\n {\n \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",\n \"value\": \"a6f2b11f-0f96-4487-83b0-bca6c9aae2bd\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9734615173\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/8b794ba5\",\n \"resource\": {\n \"id\": \"8b794ba5\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n },\n {\n \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",\n \"value\": \"a6f2b11f-0f96-4487-83b0-bca6c9aae2bd\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9694154065\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" + } + ] + }, + { + "name": "Valid request - No proxy roles returned - Get proxy roles", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "" + ], + "type": "text/javascript", + "packages": {}, + "requests": {} + } + }, + { + "listen": "prerequest", + "script": { + "exec": [ + "" + ], + "type": "text/javascript", + "packages": {}, + "requests": {} + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "SomeToken;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?patient:identifier=9736898199", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "patient:identifier", + "value": "9736898199" + } + ] + }, + "description": "## Example scenario\n\n**Given** no proxy roles exist for a patient/performer in NPS or GPIT systems \n**When** a GET /Consent request is sent with the performer/patient identifier \n**Then** no proxy roles are returned\n\n## Authorization\n\nPlease see the folder overview for details of how to generate tokens for this endpoint." + }, + "response": [ + { + "name": "No roles returned", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "b8b052ae-6841-4b64-bdf0-c969d32d94bd", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "e9920101-1ae7-4644-8ae9-5298f7bdda3b", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "SomeToken;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?patient:identifier=9736898199", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "patient:identifier", + "value": "9736898199" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Thu, 27 Nov 2025 15:20:11 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "254" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "62f7a9ef-477a-4a24-8bba-c3da1f684805" + }, + { + "key": "x-amz-apigw-id", + "value": "UtXWqH7MLPEFkaw=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-69286c2a-60c4f8c5c094e6753e2352ce" + }, + { + "key": "X-Request-ID", + "value": "31683198-4901-4516-8522-baf7a3de343a" + }, + { + "key": "X-Correlation-ID", + "value": "bdc29a81-c2c3-4622-b1cb-6b0d939ef622" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2025-11-27T15:20:11Z\",\n \"total\": 0,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?patient%3Aidentifier=9736898199\"\n }\n ],\n \"entry\": []\n}" + } + ] + }, + { + "name": "Invalid status parameter - Get proxy roles", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "" + ], + "type": "text/javascript", + "packages": {}, + "requests": {} + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "SomeToken;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?patient:identifier=9736898199&status=test", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "patient:identifier", + "value": "9736898199" + }, + { + "key": "status", + "value": "test" + } + ] + }, + "description": "## Example scenario\n\n**Given** proxy roles exist for a patient/performer in NPS or a GPIT system \n**When** a GET /Consent request is sent with an invalid status parameter \n**Then** a 422 error is returned with the detail 'Required parameter(s) are invalid.'\n\n## Authorization\n\nPlease see the folder overview for details of how to generate tokens for this endpoint." + }, + "response": [ + { + "name": "Invalid status parameter error returned", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "dcc26889-b2fe-4794-9531-88c887f7e134", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "91e70db5-6a5d-4382-bfc1-027d2b81bc3c", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "SomeToken;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?patient:identifier=9736898199&status=test", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "patient:identifier", + "value": "9736898199" + }, + { + "key": "status", + "value": "test" + } + ] + } + }, + "status": "Unprocessable Entity (WebDAV) (RFC 4918)", + "code": 422, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Thu, 27 Nov 2025 16:45:57 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "375" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "072d3fa4-9703-4b80-88ba-e679c01b3129" + }, + { + "key": "x-amz-apigw-id", + "value": "Utj6vHGjLPEFvyQ=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-69288044-9a8fa9560202aeb1b9390e51" + }, + { + "key": "X-Request-ID", + "value": "0437a831-fa18-43ca-a376-21b2a8f33900" + }, + { + "key": "X-Correlation-ID", + "value": "8cf2b8d1-d98e-4b93-bb62-34583b31f0ea" + }, + { + "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_PARAMETER\",\n \"display\": \"Required parameter(s) are invalid.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"Invalid request with error - status parameter is invalid.\",\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" + } + ] + }, + { + "name": "Invalid include parameter - Get proxy roles", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "" + ], + "type": "text/javascript", + "packages": {}, + "requests": {} + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "SomeToken;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9736898148&_include=Consent:test", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9736898148" + }, + { + "key": "_include", + "value": "Consent:test" + } + ] + }, + "description": "## Gherkin scenario\n\n**Given** proxy roles exist for a patient/performer in NPS or a GPIT system \n**When** a GET /Consent request is sent with an invalid include parameter \n**Then** a 422 error is returned with the detail 'Required parameter(s) are invalid.'\n\n## Authorization\n\nPlease see the folder overview for details of how to generate tokens for this endpoint." + }, + "response": [ + { + "name": "Invalid include parameter error returned", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "b14c0f0f-ad95-45e4-9b2a-9286fb050453", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "e7e0d226-d580-44a6-8688-2aeb0deedf00", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "SomeToken;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9736898148&_include=Consent:test", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9736898148" + }, + { + "key": "_include", + "value": "Consent:test" + } + ] + } + }, + "status": "Unprocessable Entity (WebDAV) (RFC 4918)", + "code": 422, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Thu, 27 Nov 2025 16:46:36 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "377" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "e9f62008-61ec-417a-8231-506b51d07844" + }, + { + "key": "x-amz-apigw-id", + "value": "UtkBAFkIrPEFuvQ=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-6928806c-3f5337b27e75f90c703fd6b0" + }, + { + "key": "X-Request-ID", + "value": "fb15a103-bf9a-499e-a7b1-24dc6563eb13" + }, + { + "key": "X-Correlation-ID", + "value": "f5ec5ae0-c762-4efb-95e3-317628c5cd80" + }, + { + "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_PARAMETER\",\n \"display\": \"Required parameter(s) are invalid.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"Invalid request with error - _include parameter is invalid.\",\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" + } + ] + }, + { + "name": "Invalid performer identifier - Get proxy roles", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "" + ], + "type": "text/javascript", + "packages": {}, + "requests": {} + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "SomeToken;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=90000000", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "90000000" + } + ] + }, + "description": "## Example scenario\n\n**Given** proxy roles exist for a patient/performer in NPS or a GPIT system \n**When** a GET /Consent request is sent with an invalid performer identifier \n**Then** a 422 error is returned with the detail 'Required parameter(s) are invalid.'\n\n## Authorization\n\nPlease see the folder overview for details of how to generate tokens for this endpoint." + }, + "response": [ + { + "name": "Invalid performer identifier returned", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "6e975672-d1b4-402c-b47d-0994d55e1517", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "268d0936-6ffb-474a-a7bf-f44d4214e36e", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "SomeToken;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=90000000", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "90000000" + } + ] + } + }, + "status": "Unprocessable Entity (WebDAV) (RFC 4918)", + "code": 422, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Thu, 27 Nov 2025 16:47:01 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "428" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "2c57ff69-fe19-498b-8163-00b392e47313" + }, + { + "key": "x-amz-apigw-id", + "value": "UtkE-EaXLPEFV9Q=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-69288085-dfbdd45a57543fb9bb4ebd8b" + }, + { + "key": "X-Request-ID", + "value": "2d274752-140d-49de-ab31-56012d28c2cb" + }, + { + "key": "X-Correlation-ID", + "value": "7187bca7-8d57-4561-b0f2-a5aba91ec94c" + }, + { + "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_IDENTIFIER_VALUE\",\n \"display\": \"Required parameter(s) are invalid.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"Invalid request with error - performer:identifier or patient:identifier parameter is invalid.\",\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" + } + ] + }, + { + "name": "Invalid performer identifier system - Get proxy roles", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "" + ], + "type": "text/javascript", + "packages": {}, + "requests": {} + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "SomeToken;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=invalid|9736898199", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "invalid|9736898199" + } + ] + }, + "description": "## Example scenario\n\n**Given** proxy roles exist for a patient/performer in NPS or a GPIT system \n**When** a GET /Consent request is sent with an invalid performer identifier system \n**Then** a 422 error is returned with the detail 'Required parameter(s) are invalid.'\n\n## Authorization\n\nPlease see the folder overview for details of how to generate tokens for this endpoint." + }, + "response": [ + { + "name": "Invalid performer identifier system error returned", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "995e5222-fce7-40e2-8424-1e920d920491", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "16ec5418-1591-45f7-a84c-e95cbcd5cd67", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "SomeToken;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=invalid|9736898199", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "invalid|9736898199" + } + ] + } + }, + "status": "Unprocessable Entity (WebDAV) (RFC 4918)", + "code": 422, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Thu, 27 Nov 2025 16:47:46 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "426" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "8a8529b6-34ac-46b1-8868-0a6ec0440151" + }, + { + "key": "x-amz-apigw-id", + "value": "UtkL-HDVLPEFVxg=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-692880b2-6286da8b511f08a6d7ccf9db" + }, + { + "key": "X-Request-ID", + "value": "9cc2d0ef-8f7a-46b7-89c9-c884bf61cc3a" + }, + { + "key": "X-Correlation-ID", + "value": "57948f02-5db0-4267-a6b7-cae30485e5eb" + }, + { + "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_IDENTIFIER_SYSTEM\",\n \"display\": \"Required parameter(s) are invalid.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"Invalid request with error - performer:identifier or patient:identifier system parameter is invalid.\",\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" + } + ] + }, + { + "name": "Missing performer identifier value - Get proxy roles", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "" + ], + "type": "text/javascript", + "packages": {}, + "requests": {} + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "SomeToken;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ] + }, + "description": "## Example scenario\n\n**Given** proxy roles exist for a patient/performer in NPS or a GPIT system \n**When** a GET /Consent request is sent with an missing performer identifier value \n**Then** a 400 error is returned with the detail 'Required parameter(s) are missing.'\n\n## Authorization\n\nPlease see the folder overview for details of how to generate tokens for this endpoint." + }, + "response": [ + { + "name": "Missing performer identifier value error returned", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "53b3ca95-ad9d-4cd5-a194-78a42daff0df", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "88aaae3f-7168-4f69-b71a-60641082ab4b", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "SomeToken;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Thu, 27 Nov 2025 16:48:15 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "417" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "4984ba67-d994-4f08-910e-e25024a8ba57" + }, + { + "key": "x-amz-apigw-id", + "value": "UtkQdERvrPEFrBg=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-692880cf-614067cb88aa075eca482015" + }, + { + "key": "X-Request-ID", + "value": "f536a55f-7115-4ab4-a1c9-3049ca919351" + }, + { + "key": "X-Correlation-ID", + "value": "636e5f80-53b3-4bcf-9176-2967325a9e85" + }, + { + "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_IDENTIFIER_VALUE\",\n \"display\": \"Required parameter(s) are missing.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"Invalid request with error - performer:identifier or patient:identifier parameter not found.\",\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" + } + ] + }, + { + "name": "GP practice not found - Get proxy roles", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "" + ], + "type": "text/javascript", + "packages": {}, + "requests": {} + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "SomeToken;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=false;nam-cache-enabled=false;nam-enabled=true;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9736898229", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9736898229" + } + ] + }, + "description": "## Example scenario\n\n**Given** a performer/patient is not registered at a GP \n**And** the performer/patient has no proxy roles in the National Proxy Store \n**When** a GET /Consent request is sent for the performer/patient \n**Then** a 404 error is returned with the detail 'GP Practice could not be found - invalid resources cannot be retrieved'\n\n## Authorization\n\nPlease see the folder overview for details of how to generate tokens for this endpoint." + }, + "response": [ + { + "name": "GP practice not found error returned", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "7c22ece1-b0a0-4067-8ad7-56f8bceced93", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "f1b40261-0aa6-44de-8563-3bfcc5813510", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "SomeToken;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=false;nam-cache-enabled=false;nam-enabled=true;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9736898229", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9736898229" + } + ] + } + }, + "status": "Not Found", + "code": 404, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Thu, 27 Nov 2025 16:48:38 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "391" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "e0bae044-bde7-4def-a600-199f72ea2e50" + }, + { + "key": "x-amz-apigw-id", + "value": "UtkTcEIOLPEF5aQ=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-692880e2-7d058bc8fc71f9ee272f339d" + }, + { + "key": "X-Request-ID", + "value": "c1f8bed5-6729-4b9f-b20c-180b069809ed" + }, + { + "key": "X-Correlation-ID", + "value": "3132cc74-64ef-465d-aac9-502f27c6ac1d" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"issue\": [\n {\n \"code\": \"processing\",\n \"details\": {\n \"coding\": [\n {\n \"code\": \"GP_PRACTICE_NOT_FOUND\",\n \"display\": \"GP Practice could not be found - invalid resources cannot be retrieved\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"GP Practice could not be found\",\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" + } + ] + } + ], + "description": "## Authorization\n\n### Allowed auth methods\n\n- App restricted token\n \n- NHS Login token - Auth with test user `9730675929`\n \n- CIS2 token - Auth with test user `656005750108`\n \n\nSee collection level documentation for info about how to get authorization tokens.\n\n## NPS and NAM routing\n\nYou will notice that there are 'Valid request - NPS' and 'Valid request - NAM' requests and examples within this folder. These are set up to retrieve the proxy roles from different data sources:\n\n- **Valid request - NPS**: Retrieves the roles from the National Proxy Store (NPS) only. Following the eventual migration of all proxy and related person data from GPIT to NPS, this will become the only route for all requests.\n \n- **Valid request - NAM:** Retrives the roles as related person data from the GPIT suppliers via NAM without checking if any exist in NPS first. This requires specific connection parameters to authorise with the GPIT supplier systems\n \n\nThis routing is controlled in the requests by the `X-Test-Routing-Flag` header. This header is used in the VRS pre-prod environments to control where the proxy roles are retrieved from. It is intended to be used for testing purposes only. Omission of this header will cause the default routing settings for the given environment to be followed instead. This is typically for roles to be retrieved from NPS, with NAM used as a fallback if none are found.", + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{consent_app_auth_header_value}}", + "type": "string" + } + ] + }, + "event": [ + { + "listen": "prerequest", + "script": { + "type": "text/javascript", + "packages": {}, + "requests": {}, + "exec": [ + "var uuid = require('uuid');", + "", + "var privateKey = pm.environment.get('vrs_api_private_key') || '';", + "var api_key_value = pm.environment.get('nhs_developer_account_api_key') || '';", + "", + "if (!privateKey) {", + " throw new Error(\"Variable vrs_api_private_key must be set with your private key for signed JWT authentication.\");", + "}", + "", + "// Replace any '/n' new lines with actual new lines", + "privateKey = privateKey.replace(/\\\\n/g, '\\n');", + "", + "if (!api_key_value) {", + " throw new Error(\"Variable nhs_developer_account_app_key must be set with your integration testing application API key.\");", + "}", + "", + "var auth_url = 'https://int.api.service.nhs.uk/oauth2-mock/token';", + "var navigator = {};", + "var window = {};", + "const interval = setTimeout(() => {}, 2147483647);", + "", + "return new Promise((resolve, reject) => { ", + " if (pm.globals.has('jsrsasign-js') && pm.globals.get('jsrsasign-js') !== \"\") {", + " return resolve();", + " }", + "", + " pm.sendRequest(", + " {", + " url: 'https://kjur.github.io/jsrsasign/jsrsasign-all-min.js',", + " method: 'GET'", + " }, function (err, res) {", + " if (err) {", + " return reject(err);", + " }", + "", + " pm.globals.set('jsrsasign-js', res.text()); ", + " return resolve();", + " }", + " );", + "}).then(() => { ", + " eval(pm.globals.get(\"jsrsasign-js\")); ", + "", + " // Set headers for JWT", + " var header = {", + " 'typ': 'JWT',", + " 'alg': 'RS512',", + " 'kid': 'VRS-dev-12-nov-2025'", + " };", + "", + " // Prepare timestamp in seconds", + " var currentTimestamp = Math.floor(Date.now() / 1000)", + " var uuid = require('uuid');", + " var jti_value = uuid.v4();", + " var data = {", + " 'sub': api_key_value,", + " 'iss': api_key_value,", + " 'jti': jti_value,", + " 'aud': auth_url,", + " 'exp': currentTimestamp + 180, // expiry time is 180 seconds from time of creation", + " } ", + "", + " var sJWT = KJUR.jws.JWS.sign(header.alg, JSON.stringify(header), JSON.stringify(data), privateKey); ", + " return new Promise((resolve, reject) => { ", + " pm.sendRequest({", + " url: auth_url,", + " method: \"POST\",", + " header: {", + " \"Content-Type\": \"application/x-www-form-urlencoded\"", + " },", + " body: {", + " mode: \"urlencoded\",", + " urlencoded: [", + " {", + " key: \"grant_type\",", + " value: \"client_credentials\"", + " },", + " {", + " key: \"client_assertion_type\",", + " value: \"urn:ietf:params:oauth:client-assertion-type:jwt-bearer\",", + " },", + " {", + " key: \"client_assertion\",", + " value: sJWT", + " }", + " ]", + " }", + " }, function (err, res) { ", + " if (err) {", + " return reject(err);", + " }", + "", + " //assign the authorization header value", + " pm.environment.set('consent_app_auth_header_value', `${res.json().access_token}`);", + "", + " return resolve();", + " }); ", + " });", + "}).then(() => { ", + " clearTimeout(interval);", + "}).catch((err) => { ", + " console.error(err); ", + " clearTimeout(interval); ", + "});" + ] + } + }, + { + "listen": "test", + "script": { + "type": "text/javascript", + "packages": {}, + "requests": {}, + "exec": [ + "" + ] + } + } + ] + }, + { + "name": "Get proxy role (GET /Consent/{id})", + "item": [ + { + "name": "Valid request - Get proxy role", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "" + ], + "type": "text/javascript", + "packages": {}, + "requests": {} + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent/:consent_id", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent", + ":consent_id" + ], + "variable": [ + { + "key": "consent_id", + "value": "4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40" + } + ] + }, + "description": "## Example scenario\n\n**Given** a proxy role exists between a performer and a patient in the National Proxy Store \n**When** a GET /Consent/{id} request is sent with the consent id of the proxy role \n**Then** the proxy role is returned" + }, + "response": [ + { + "name": "Proxy role returned - No patient or performer details", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "4b1a8cf8-aa7e-4aa2-b465-44a5d25be876", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "b09740bc-b71f-4d04-a597-c89ab3804f90", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent/:consent_id", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent", + ":consent_id" + ], + "variable": [ + { + "key": "consent_id", + "value": "4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Date", + "value": "Thu, 04 Dec 2025 11:28:18 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "1873" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "23636f8d-f5ef-4050-8c67-51e393b47c87" + }, + { + "key": "x-amz-apigw-id", + "value": "VD581F_4LPEFyDg=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-69317051-6384bdf9e3106d26096daa32" + }, + { + "key": "X-Request-ID", + "value": "784fb8d0-37ff-4716-bf77-81a395fd20f8" + }, + { + "key": "X-Correlation-ID", + "value": "ec404ce9-1721-4158-91af-2064ad3e7ea4" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2025-12-04T11:28:18Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40\",\n \"resource\": {\n \"id\": \"4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"Information Access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ],\n \"text\": \"Information Access Consent\"\n }\n ],\n \"dateTime\": \"2025-12-04T11:08:46Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898660\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-12-05\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ],\n \"text\": \"Patient Privacy Consent\"\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n }\n ]\n}" + }, + { + "name": "Proxy role returned - Include performer details", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent/:consent_id?_include=Consent:performer", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent", + ":consent_id" + ], + "query": [ + { + "key": "_include", + "value": "Consent:performer" + } + ], + "variable": [ + { + "key": "consent_id", + "value": "4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Date", + "value": "Thu, 04 Dec 2025 11:28:48 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "2789" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "a1f034c1-6ee8-499e-aa60-eea157ad4bd9" + }, + { + "key": "x-amz-apigw-id", + "value": "VD6AYFQMrPEFgjw=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-69317068-3a18b175fb02b76c68acfce1" + }, + { + "key": "X-Request-ID", + "value": "e8a5dada-5577-4738-abd5-7a09251e8c3b" + }, + { + "key": "X-Correlation-ID", + "value": "5eeb9d78-133f-4132-b121-649162a6bc14" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2025-12-04T11:28:47Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40?_include=Consent%3Aperformer\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40\",\n \"resource\": {\n \"id\": \"4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"Information Access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ],\n \"text\": \"Information Access Consent\"\n }\n ],\n \"dateTime\": \"2025-12-04T11:08:46Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898660\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-12-05\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ],\n \"text\": \"Patient Privacy Consent\"\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/nVLgl\",\n \"resource\": {\n \"id\": \"nVLgl\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898660\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" + }, + { + "name": "Proxy role returned - Include patient details", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent/:consent_id?_include=Consent:patient", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent", + ":consent_id" + ], + "query": [ + { + "key": "_include", + "value": "Consent:patient" + } + ], + "variable": [ + { + "key": "consent_id", + "value": "4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Date", + "value": "Thu, 04 Dec 2025 11:29:08 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "3601" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "b6cb5439-d1a8-4f95-bd3e-9dca7bed9e88" + }, + { + "key": "x-amz-apigw-id", + "value": "VD6ErHoPLPEF1rg=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-69317083-b57a368a7776107b8b3e5f7a" + }, + { + "key": "X-Request-ID", + "value": "22ca0610-1b6e-4e3a-aa1a-ede697da4a1d" + }, + { + "key": "X-Correlation-ID", + "value": "71035b63-936a-4ce4-b036-3d592c764d88" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2025-12-04T11:29:08Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40?_include=Consent%3Apatient\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40\",\n \"resource\": {\n \"id\": \"4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"Information Access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ],\n \"text\": \"Information Access Consent\"\n }\n ],\n \"dateTime\": \"2025-12-04T11:08:46Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898660\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-12-05\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ],\n \"text\": \"Patient Privacy Consent\"\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898660\",\n \"resource\": {\n \"id\": \"9736898660\",\n \"meta\": {\n \"security\": [\n {\n \"code\": \"U\",\n \"display\": \"unrestricted\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-Confidentiality\"\n },\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ],\n \"versionId\": \"4\"\n },\n \"address\": [\n {\n \"extension\": [\n {\n \"extension\": [\n {\n \"url\": \"type\",\n \"valueCoding\": {\n \"code\": \"PAF\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType\"\n }\n },\n {\n \"url\": \"value\",\n \"valueString\": \"19976537\"\n }\n ],\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey\"\n }\n ],\n \"id\": \"pBQDr\",\n \"line\": [\n \"CARLTON\",\n \"VICARAGE LANE\",\n \"REDBOURNE\",\n \"GAINSBOROUGH\",\n \"LINCS\"\n ],\n \"period\": {\n \"start\": \"2025-07-15\"\n },\n \"postalCode\": \"DN21 4QW\",\n \"use\": \"home\"\n }\n ],\n \"birthDate\": \"2012-04-24\",\n \"gender\": \"female\",\n \"generalPractitioner\": [\n {\n \"id\": \"xSEnH\",\n \"identifier\": {\n \"period\": {\n \"start\": \"2024-11-06\"\n },\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A20047\"\n }\n }\n ],\n \"identifier\": [\n {\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"01\",\n \"display\": \"Number present and verified\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\n \"version\": \"1.0.0\"\n }\n ]\n }\n }\n ],\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898660\"\n }\n ],\n \"name\": [\n {\n \"family\": \"GODREY\",\n \"given\": [\n \"Davina\",\n \"Linda\"\n ],\n \"period\": {\n \"start\": \"2017-04-22\"\n },\n \"prefix\": [\n \"MISS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" + }, + { + "name": "Proxy role returned - Include performer and patient details", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent/:consent_id?_include=Consent:patient&_include=Consent:performer", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent", + ":consent_id" + ], + "query": [ + { + "key": "_include", + "value": "Consent:patient" + }, + { + "key": "_include", + "value": "Consent:performer" + } + ], + "variable": [ + { + "key": "consent_id", + "value": "4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Date", + "value": "Thu, 04 Dec 2025 11:29:26 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "4517" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "9db19dac-df92-4494-8f31-076621ab3d1a" + }, + { + "key": "x-amz-apigw-id", + "value": "VD6HkGFkrPEFxmw=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-69317096-6ad930e767f145f7dd07b977" + }, + { + "key": "X-Request-ID", + "value": "5fd5c3dc-1f5c-4ac5-a9b4-018fdd7f1a0b" + }, + { + "key": "X-Correlation-ID", + "value": "fd7368b4-0828-40b0-97fa-6d19fb51a9e0" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2025-12-04T11:29:26Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40?_include=Consent%3Apatient&_include=Consent%3Aperformer\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40\",\n \"resource\": {\n \"id\": \"4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"Information Access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ],\n \"text\": \"Information Access Consent\"\n }\n ],\n \"dateTime\": \"2025-12-04T11:08:46Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898660\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-12-05\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ],\n \"text\": \"Patient Privacy Consent\"\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898660\",\n \"resource\": {\n \"id\": \"9736898660\",\n \"meta\": {\n \"security\": [\n {\n \"code\": \"U\",\n \"display\": \"unrestricted\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-Confidentiality\"\n },\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ],\n \"versionId\": \"4\"\n },\n \"address\": [\n {\n \"extension\": [\n {\n \"extension\": [\n {\n \"url\": \"type\",\n \"valueCoding\": {\n \"code\": \"PAF\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType\"\n }\n },\n {\n \"url\": \"value\",\n \"valueString\": \"19976537\"\n }\n ],\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey\"\n }\n ],\n \"id\": \"pBQDr\",\n \"line\": [\n \"CARLTON\",\n \"VICARAGE LANE\",\n \"REDBOURNE\",\n \"GAINSBOROUGH\",\n \"LINCS\"\n ],\n \"period\": {\n \"start\": \"2025-07-15\"\n },\n \"postalCode\": \"DN21 4QW\",\n \"use\": \"home\"\n }\n ],\n \"birthDate\": \"2012-04-24\",\n \"gender\": \"female\",\n \"generalPractitioner\": [\n {\n \"id\": \"xSEnH\",\n \"identifier\": {\n \"period\": {\n \"start\": \"2024-11-06\"\n },\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A20047\"\n }\n }\n ],\n \"identifier\": [\n {\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"01\",\n \"display\": \"Number present and verified\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\n \"version\": \"1.0.0\"\n }\n ]\n }\n }\n ],\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898660\"\n }\n ],\n \"name\": [\n {\n \"family\": \"GODREY\",\n \"given\": [\n \"Davina\",\n \"Linda\"\n ],\n \"period\": {\n \"start\": \"2017-04-22\"\n },\n \"prefix\": [\n \"MISS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/nVLgl\",\n \"resource\": {\n \"id\": \"nVLgl\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898660\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" + } + ] + }, + { + "name": "Invalid consent id - Get proxy role", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "" + ], + "type": "text/javascript", + "packages": {}, + "requests": {} + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent/:consent_id", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent", + ":consent_id" + ], + "variable": [ + { + "key": "consent_id", + "value": "invalid" + } + ] + }, + "description": "## Example scenario\n\n**Given** a proxy role exists between a performer and a patient in the National Proxy Store \n**When** a GET /Consent/{id} request is sent where the ID is invalid \n**Then** a 400 error is returned with details including 'Required parameter(s) are invalid.'" + }, + "response": [ + { + "name": "Invalid consent id error returned", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "6ada3f0b-6520-4517-a71c-8ee93616f52b", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "ac9c9714-f361-44f2-92be-ea1eb00f9990", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent/:consent_id", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent", + ":consent_id" + ], + "variable": [ + { + "key": "consent_id", + "value": "invalid" + } + ] + } + }, + "status": "Unprocessable Entity (WebDAV) (RFC 4918)", + "code": 422, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Thu, 27 Nov 2025 16:49:51 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "370" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "8bae29b7-2cf9-4f6f-b054-0ff6133092b7" + }, + { + "key": "x-amz-apigw-id", + "value": "UtkfVE6VLPEFmDg=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-6928812e-f15d362bb65b30e32885ea32" + }, + { + "key": "X-Request-ID", + "value": "51f1c948-51e0-4719-8307-fd1f987809a1" + }, + { + "key": "X-Correlation-ID", + "value": "cf91adbc-f994-4a56-9d6b-2b324c0af196" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"issue\": [\n {\n \"code\": \"invalid\",\n \"diagnostics\": \"Invalid request with error - ID must be a valid UUID.\",\n \"details\": {\n \"coding\": [\n {\n \"code\": \"INVALID_ID_VALUE\",\n \"display\": \"Required parameter(s) are invalid.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" + } + ] + }, + { + "name": "Invalid include parameter - Get proxy role", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "" + ], + "type": "text/javascript", + "packages": {}, + "requests": {} + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent/:consent_id?_include=Consent:invalid", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent", + ":consent_id" + ], + "query": [ + { + "key": "_include", + "value": "Consent:invalid" + } + ], + "variable": [ + { + "key": "consent_id", + "value": "77363c92-8c33-490f-b5c9-9ef81c2cf16f" + } + ] + }, + "description": "## Example scenario\n\n**Given** a proxy role exists between a performer and a patient in the National Proxy Store \n**When** a GET /Consent/{id} request is sent with an invalid include parameter \n**Then** a 422 error is returned with details including 'Required parameter(s) are invalid.'" + }, + "response": [ + { + "name": "Invalid include parameter error returned", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "b6656a79-4fde-4def-b9ae-5cb1d5667d8f", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "7ae117a4-5b43-4aac-aa00-5fcc0c460fac", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent/:consent_id?_include=Consent:invalid", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent", + ":consent_id" + ], + "query": [ + { + "key": "_include", + "value": "Consent:invalid" + } + ], + "variable": [ + { + "key": "consent_id", + "value": "77363c92-8c33-490f-b5c9-9ef81c2cf16f" + } + ] + } + }, + "status": "Unprocessable Entity (WebDAV) (RFC 4918)", + "code": 422, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Thu, 27 Nov 2025 16:50:07 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "377" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "6da48428-7512-4d8b-9856-b2cc37713381" + }, + { + "key": "x-amz-apigw-id", + "value": "Utkh9GPDLPEF3pw=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-6928813f-6ca71472e425ed45ed5bd0a5" + }, + { + "key": "X-Request-ID", + "value": "2dbb0b8c-a6c8-4bf2-9005-ec19ff68f5b2" + }, + { + "key": "X-Correlation-ID", + "value": "ec9a3692-5922-491d-8df1-da17fe8e473b" + }, + { + "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_PARAMETER\",\n \"display\": \"Required parameter(s) are invalid.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"Invalid request with error - _include parameter is invalid.\",\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" + } + ] + }, + { + "name": "Proxy role not found - Get proxy role", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "" + ], + "type": "text/javascript", + "packages": {}, + "requests": {} + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent/:consent_id", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent", + ":consent_id" + ], + "variable": [ + { + "key": "consent_id", + "value": "4cfccac1-673c-4fea-9b73-54b1a605c9a0" + } + ] + }, + "description": "## Example scenario\n\n**Given** a proxy role does not exist between a performer and a patient in the National Proxy Store \n**When** a GET /Consent/{id} request is sent \n**Then** a 404 error is returned with details including 'Resource that has been marked as invalid was requested - invalid resources cannot be retrieved'" + }, + "response": [ + { + "name": "Proxy role not found error response", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "ed862755-76fc-47b5-9381-9578062418e3", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "5095096c-4f78-4544-b812-ba9a4b21d08d", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent/:consent_id", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent", + ":consent_id" + ], + "variable": [ + { + "key": "consent_id", + "value": "4cfccac1-673c-4fea-9b73-54b1a605c9a0" + } + ] + } + }, + "status": "Not Found", + "code": 404, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Thu, 27 Nov 2025 16:50:22 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "478" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "ece32b72-4d4a-43c9-b42a-e47b729e04da" + }, + { + "key": "x-amz-apigw-id", + "value": "UtkkIHJprPEFiYw=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-6928814d-5023dcb7c8009889ccde4f3d" + }, + { + "key": "X-Request-ID", + "value": "3ec49ee6-c56c-4df9-aa7a-f54bb6b3e795" + }, + { + "key": "X-Correlation-ID", + "value": "74eb5dd5-2d74-4b3a-a482-5480e1ad6464" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"issue\": [\n {\n \"code\": \"processing\",\n \"details\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\",\n \"code\": \"INVALIDATED_RESOURCE\",\n \"display\": \"Resource that has been marked as invalid was requested - invalid resources cannot be retrieved\"\n }\n ]\n },\n \"diagnostics\": \"Resource that has been marked as invalid was requested - invalid resources cannot be retrieved\",\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" + } + ] + }, + { + "name": "Missing consent id value - Get proxy role", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "" + ], + "type": "text/javascript", + "packages": {}, + "requests": {} + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent/", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent", + "" + ] + }, + "description": "## Example scenario\n\n**Given** a proxy role exists between a performer and a patient in the National Proxy Store \n**When** a GET /Consent/{id} request is sent with the ID value missing \n**Then** a 400 error is returned with details including 'Required parameter(s) are missing.'" + }, + "response": [ + { + "name": "Missing consent id value error returned", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "7c50dc2d-fc25-4bed-8ce8-d58b4811f58c", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "210ede12-efec-4195-b2cd-1a04d1827a81", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent/", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent", + "" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Thu, 27 Nov 2025 16:51:00 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "417" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "c4a3d99b-0ea1-40de-82bf-5cd2fa60afd6" + }, + { + "key": "x-amz-apigw-id", + "value": "UtkqLGF_rPEFcMw=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-69288173-c5d997b9110a61bf7b655fe7" + }, + { + "key": "X-Request-ID", + "value": "de0e2e5b-1f1b-4448-a7ee-42d0236b88a6" + }, + { + "key": "X-Correlation-ID", + "value": "6f458de2-64c6-4764-9044-34a5617d3d43" + }, + { + "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_IDENTIFIER_VALUE\",\n \"display\": \"Required parameter(s) are missing.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"Invalid request with error - performer:identifier or patient:identifier parameter not found.\",\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" + } + ] + } + ], + "description": "## Allowed auth methods\n\n- NHS Login token - Auth with test user `9730675929`\n \n- CIS2 token - Auth with test user `656005750108`\n \n\nSee collection level documentation for info about how to get authorization tokens.", + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{cis2_token}}", + "type": "string" + } + ] + }, + "event": [ + { + "listen": "prerequest", + "script": { + "type": "text/javascript", + "packages": {}, + "requests": {}, + "exec": [ + "" + ] + } + }, + { + "listen": "test", + "script": { + "type": "text/javascript", + "packages": {}, + "requests": {}, + "exec": [ + "" + ] + } + } + ] + }, + { + "name": "Create a new access request (POST /QuestionnaireResponse)", + "item": [ + { + "name": "Valid request - Proxy applicant - New adult to adult access request", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/fhir+json", + "type": "text" + }, + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Use-National-Proxy-Store", + "value": "False", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"resourceType\": \"QuestionnaireResponse\",\n \"status\": \"completed\",\n \"authored\": \"{{$isoTimestamp}}\",\n \"source\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9730675929\"\n }\n },\n \"subject\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898202\"\n }\n },\n \"questionnaire\": \"Questionnaire/{{$randomUUID}}\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson\",\n \"text\": \"relatedPerson\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_identifier\",\n \"text\": \"NHS Number\",\n \"answer\": [\n {\n \"valueString\": \"9730675929\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name\",\n \"text\": \"relatedPerson_name\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_name_first\",\n \"text\": \"First name.\",\n \"answer\": [\n {\n \"valueString\": \"Betty\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name_family\",\n \"text\": \"Family name (often called Surname).\",\n \"answer\": [\n {\n \"valueString\": \"MORLEY\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_birthDate\",\n \"text\": \"Date of Birth\",\n \"answer\": [\n {\n \"valueDate\": \"2005-01-20\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_basisForAccess\",\n \"text\": \"Basis For Access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_relationship\",\n \"text\": \"Relationship\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient\",\n \"text\": \"patient\",\n \"item\": [\n {\n \"linkId\": \"patient_identifier\",\n \"text\": \"NHS Number\",\n \"answer\": [\n {\n \"valueString\": \"9736898202\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name\",\n \"text\": \"patient_name\",\n \"item\": [\n {\n \"linkId\": \"patient_name_first\",\n \"text\": \"First name.\",\n \"answer\": [\n {\n \"valueString\": \"URIEL\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name_family\",\n \"text\": \"Family name (often called Surname).\",\n \"answer\": [\n {\n \"valueString\": \"ROTH\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient_birthDate\",\n \"text\": \"Date of Birth\",\n \"answer\": [\n {\n \"valueDate\": \"1988-11-10\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess\",\n \"text\": \"requestedAccess\",\n \"item\": [\n {\n \"linkId\": \"requestedAccess_accessLevel\",\n \"text\": \"Requested access level\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"APPT\",\n \"display\": \"Appointment Booking\"\n }\n },\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"VACC\",\n \"display\": \"Vaccination Records\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccess\",\n \"text\": \"Reason for access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-ReasonForAccess\",\n \"code\": \"COMB\",\n \"display\": \"Communication Barriers\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccessMoreinfo\",\n \"text\": \"Reason for access - further information\",\n \"answer\": [\n {\n \"valueString\": \"No internet connection\"\n }\n ]\n }\n ]\n }\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{api_base_url}}/QuestionnaireResponse", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "QuestionnaireResponse" + ] + }, + "description": "## Example scenario\n\n**Given** no proxy role exists between two adults \n**When** a valid access request is sent with the proxy as the applicant \n**Then** a 201 response is returned" + }, + "response": [ + { + "name": "A2A proxy applicant access request created", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/fhir+json", + "type": "text" + }, + { + "key": "X-Request-ID", + "value": "5ef96245-493a-468c-9936-06fb46e387af", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "15ace5c8-dc43-435f-baf8-3437b76ffdbf", + "type": "text" + }, + { + "key": "X-Use-National-Proxy-Store", + "value": "False", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"resourceType\": \"QuestionnaireResponse\",\n \"status\": \"completed\",\n \"authored\": \"2026-01-12T15:09:45.790Z\",\n \"source\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9730675929\"\n }\n },\n \"subject\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898202\"\n }\n },\n \"questionnaire\": \"Questionnaire/2e61ba16-f2ee-4e16-8526-194873d63f24\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson\",\n \"text\": \"relatedPerson\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_identifier\",\n \"text\": \"NHS Number\",\n \"answer\": [\n {\n \"valueString\": \"9730675929\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name\",\n \"text\": \"relatedPerson_name\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_name_first\",\n \"text\": \"First name.\",\n \"answer\": [\n {\n \"valueString\": \"Betty\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name_family\",\n \"text\": \"Family name (often called Surname).\",\n \"answer\": [\n {\n \"valueString\": \"MORLEY\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_birthDate\",\n \"text\": \"Date of Birth\",\n \"answer\": [\n {\n \"valueDate\": \"2005-01-20\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_basisForAccess\",\n \"text\": \"Basis For Access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_relationship\",\n \"text\": \"Relationship\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient\",\n \"text\": \"patient\",\n \"item\": [\n {\n \"linkId\": \"patient_identifier\",\n \"text\": \"NHS Number\",\n \"answer\": [\n {\n \"valueString\": \"9736898202\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name\",\n \"text\": \"patient_name\",\n \"item\": [\n {\n \"linkId\": \"patient_name_first\",\n \"text\": \"First name.\",\n \"answer\": [\n {\n \"valueString\": \"URIEL\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name_family\",\n \"text\": \"Family name (often called Surname).\",\n \"answer\": [\n {\n \"valueString\": \"ROTH\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient_birthDate\",\n \"text\": \"Date of Birth\",\n \"answer\": [\n {\n \"valueDate\": \"1988-11-10\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess\",\n \"text\": \"requestedAccess\",\n \"item\": [\n {\n \"linkId\": \"requestedAccess_accessLevel\",\n \"text\": \"Requested access level\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"APPT\",\n \"display\": \"Appointment Booking\"\n }\n },\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"VACC\",\n \"display\": \"Vaccination Records\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccess\",\n \"text\": \"Reason for access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-ReasonForAccess\",\n \"code\": \"COMB\",\n \"display\": \"Communication Barriers\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccessMoreinfo\",\n \"text\": \"Reason for access - further information\",\n \"answer\": [\n {\n \"valueString\": \"No internet connection\"\n }\n ]\n }\n ]\n }\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{api_base_url}}/QuestionnaireResponse", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "QuestionnaireResponse" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Mon, 01 Dec 2025 16:09:01 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "186" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "720499ae-68fe-495a-8485-862105f276a9" + }, + { + "key": "x-amz-apigw-id", + "value": "U6qQkGxVrPEFeoA=" + }, + { + "key": "location", + "value": "https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/QuestionnaireResponse/e185e5e3-901e-4b6a-bfe2-f9adb0b311a4" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-692dbd9c-999e6478f9613be345a68c77" + }, + { + "key": "X-Request-ID", + "value": "687bfc1b-b7a7-4681-a7bf-01ac6e7dd97a" + }, + { + "key": "X-Correlation-ID", + "value": "6adda3bb-aacf-4e4f-a459-a2a0fe6d34be" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"OperationOutcome\",\n \"issue\": [\n {\n \"severity\": \"information\",\n \"code\": \"informational\",\n \"details\": {\n \"coding\": [\n {\n \"code\": \"19C01XB6WC\",\n \"display\": \"19C01XB6WC\"\n }\n ]\n }\n }\n ]\n}" + } + ] + }, + { + "name": "Valid request - Patient applicant - New adult to adult access request", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/fhir+json", + "type": "text" + }, + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Use-National-Proxy-Store", + "value": "False", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"resourceType\": \"QuestionnaireResponse\",\n \"status\": \"completed\",\n \"authored\": \"{{$isoTimestamp}}\",\n \"source\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9730675929\"\n }\n },\n \"subject\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9730675929\"\n }\n },\n \"questionnaire\": \"Questionnaire/{{$randomUUID}}\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson\",\n \"text\": \"relatedPerson\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_identifier\",\n \"text\": \"NHS Number\",\n \"answer\": [\n {\n \"valueString\": \"9736898164\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name\",\n \"text\": \"relatedPerson_name\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_name_first\",\n \"text\": \"First name.\",\n \"answer\": [\n {\n \"valueString\": \"Heidi\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name_family\",\n \"text\": \"Family name (often called Surname).\",\n \"answer\": [\n {\n \"valueString\": \"LAW\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_birthDate\",\n \"text\": \"Date of Birth\",\n \"answer\": [\n {\n \"valueDate\": \"1997-09-15\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_basisForAccess\",\n \"text\": \"Basis For Access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_relationship\",\n \"text\": \"Relationship\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient\",\n \"text\": \"patient\",\n \"item\": [\n {\n \"linkId\": \"patient_identifier\",\n \"text\": \"NHS Number\",\n \"answer\": [\n {\n \"valueString\": \"9730675929\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name\",\n \"text\": \"patient_name\",\n \"item\": [\n {\n \"linkId\": \"patient_name_first\",\n \"text\": \"First name.\",\n \"answer\": [\n {\n \"valueString\": \"Betty\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name_family\",\n \"text\": \"Family name (often called Surname).\",\n \"answer\": [\n {\n \"valueString\": \"MORLEY\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient_birthDate\",\n \"text\": \"Date of Birth\",\n \"answer\": [\n {\n \"valueDate\": \"2005-01-20\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess\",\n \"text\": \"requestedAccess\",\n \"item\": [\n {\n \"linkId\": \"requestedAccess_accessLevel\",\n \"text\": \"Requested access level\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"APPT\",\n \"display\": \"Appointment Booking\"\n }\n },\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"VACC\",\n \"display\": \"Vaccination Records\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccess\",\n \"text\": \"Reason for access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-ReasonForAccess\",\n \"code\": \"COMB\",\n \"display\": \"Communication Barriers\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccessMoreinfo\",\n \"text\": \"Reason for access - further information\",\n \"answer\": [\n {\n \"valueString\": \"No internet connection\"\n }\n ]\n }\n ]\n }\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{api_base_url}}/QuestionnaireResponse", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "QuestionnaireResponse" + ] + }, + "description": "## Example scenario\n\n**Given** no proxy role exists between two adults \n**When** a valid access request is sent with the patient as the applicant \n**Then** a 201 response is returned" + }, + "response": [ + { + "name": "A2A patient applicant access request created", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/fhir+json", + "type": "text" + }, + { + "key": "X-Request-ID", + "value": "8af428cd-7e1e-4ed3-b127-0b751d6ae98d", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "e5cc0a6d-ea0d-433b-9307-30c988926969", + "type": "text" + }, + { + "key": "X-Use-National-Proxy-Store", + "value": "False", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"resourceType\": \"QuestionnaireResponse\",\n \"status\": \"completed\",\n \"authored\": \"2026-01-12T15:09:46.233Z\",\n \"source\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9730675929\"\n }\n },\n \"subject\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9730675929\"\n }\n },\n \"questionnaire\": \"Questionnaire/aa952e3f-3657-4ec3-bec0-25d881ed2e20\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson\",\n \"text\": \"relatedPerson\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_identifier\",\n \"text\": \"NHS Number\",\n \"answer\": [\n {\n \"valueString\": \"9736898164\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name\",\n \"text\": \"relatedPerson_name\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_name_first\",\n \"text\": \"First name.\",\n \"answer\": [\n {\n \"valueString\": \"Heidi\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name_family\",\n \"text\": \"Family name (often called Surname).\",\n \"answer\": [\n {\n \"valueString\": \"LAW\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_birthDate\",\n \"text\": \"Date of Birth\",\n \"answer\": [\n {\n \"valueDate\": \"1997-09-15\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_basisForAccess\",\n \"text\": \"Basis For Access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_relationship\",\n \"text\": \"Relationship\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient\",\n \"text\": \"patient\",\n \"item\": [\n {\n \"linkId\": \"patient_identifier\",\n \"text\": \"NHS Number\",\n \"answer\": [\n {\n \"valueString\": \"9730675929\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name\",\n \"text\": \"patient_name\",\n \"item\": [\n {\n \"linkId\": \"patient_name_first\",\n \"text\": \"First name.\",\n \"answer\": [\n {\n \"valueString\": \"Betty\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name_family\",\n \"text\": \"Family name (often called Surname).\",\n \"answer\": [\n {\n \"valueString\": \"MORLEY\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient_birthDate\",\n \"text\": \"Date of Birth\",\n \"answer\": [\n {\n \"valueDate\": \"2005-01-20\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess\",\n \"text\": \"requestedAccess\",\n \"item\": [\n {\n \"linkId\": \"requestedAccess_accessLevel\",\n \"text\": \"Requested access level\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"APPT\",\n \"display\": \"Appointment Booking\"\n }\n },\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"VACC\",\n \"display\": \"Vaccination Records\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccess\",\n \"text\": \"Reason for access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-ReasonForAccess\",\n \"code\": \"COMB\",\n \"display\": \"Communication Barriers\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccessMoreinfo\",\n \"text\": \"Reason for access - further information\",\n \"answer\": [\n {\n \"valueString\": \"No internet connection\"\n }\n ]\n }\n ]\n }\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{api_base_url}}/QuestionnaireResponse", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "QuestionnaireResponse" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Mon, 01 Dec 2025 16:10:22 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "186" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "d15e2ba0-3698-4fcf-80fe-d73279dd89a8" + }, + { + "key": "x-amz-apigw-id", + "value": "U6qdWHFfLPEFoUA=" + }, + { + "key": "location", + "value": "https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/QuestionnaireResponse/bdbba534-6e11-4491-aa3a-1631b0009628" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-692dbdee-08b18875f6f85ab2a7353bd4" + }, + { + "key": "X-Request-ID", + "value": "82cb14a5-09d0-41d4-8f73-2936794c32de" + }, + { + "key": "X-Correlation-ID", + "value": "73873b5d-1e2e-4a42-9dc3-83f1292f944b" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"OperationOutcome\",\n \"issue\": [\n {\n \"severity\": \"information\",\n \"code\": \"informational\",\n \"details\": {\n \"coding\": [\n {\n \"code\": \"19C0177GRI\",\n \"display\": \"19C0177GRI\"\n }\n ]\n }\n }\n ]\n}" + } + ] + }, + { + "name": "Valid request - New adult to child access request", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/fhir+json", + "type": "text" + }, + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Use-National-Proxy-Store", + "value": "False", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"resourceType\": \"QuestionnaireResponse\",\n \"status\": \"completed\",\n \"authored\": \"{{$isoTimestamp}}\",\n \"source\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9730675929\"\n }\n },\n \"subject\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898245\"\n }\n },\n \"questionnaire\": \"Questionnaire/01dc6813-3421-4d14-948d-a4888241add1\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson\",\n \"text\": \"relatedPerson\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_identifier\",\n \"text\": \"NHS Number\",\n \"answer\": [\n {\n \"valueString\": \"9730675929\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name\",\n \"text\": \"relatedPerson_name\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_name_first\",\n \"text\": \"First name.\",\n \"answer\": [\n {\n \"valueString\": \"Betty\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name_family\",\n \"text\": \"Family name (often called Surname).\",\n \"answer\": [\n {\n \"valueString\": \"MORLEY\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_birthDate\",\n \"text\": \"Date of Birth\",\n \"answer\": [\n {\n \"valueDate\": \"2005-01-20\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_basisForAccess\",\n \"text\": \"Basis For Access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_relationship\",\n \"text\": \"Relationship\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails\",\n \"text\": \"parentalApplicationSupplementaryDetails\",\n \"item\": [\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_evidenceOfResponsibility\",\n \"text\": \"Evidence of parental responsibility\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-EvidenceOfResponsibility\",\n \"code\": \"BRTH\",\n \"display\": \"Birth certificate\"\n }\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_evidenceOfResponsibilityMoreinfo\",\n \"text\": \"Evidence of responsibility - Further Information\",\n \"answer\": [\n {\n \"valueString\": \"Birth Certificate is original\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_isCurrentAddressConfirmed\",\n \"text\": \"Is current address confirmed?\",\n \"answer\": [\n {\n \"valueString\": \"Yes\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_newAddress\",\n \"text\": \"parentalApplicationSupplementaryDetails_newAddress\",\n \"item\": [\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_line1\",\n \"text\": \"Address Line 1\",\n \"answer\": [\n {\n \"valueString\": \"101 MESSINGHAM ROAD\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_line2\",\n \"text\": \"Address Line 2\",\n \"answer\": [\n {\n \"valueString\": \"\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_line3\",\n \"text\": \"Address Line 3\",\n \"answer\": [\n {\n \"valueString\": \"\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_city\",\n \"text\": \"Town / City\",\n \"answer\": [\n {\n \"valueString\": \"SCUNTHORPE\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_district\",\n \"text\": \"County\",\n \"answer\": [\n {\n \"valueString\": \"S HUMBERSIDE\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_postalCode\",\n \"text\": \"Postcode\",\n \"answer\": [\n {\n \"valueString\": \"DN17 2LN\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_liveAtSameAddress\",\n \"text\": \"Do the adult and child live at the same address?\",\n \"answer\": [\n {\n \"valueString\": \"Yes\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_canChildConsent\",\n \"text\": \"Can the child consent?\",\n \"answer\": [\n {\n \"valueString\": \"No\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_reasonNoChildConsent\",\n \"text\": \"Reason the child cannot consent\",\n \"answer\": [\n {\n \"valueString\": \"Child is too young\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient\",\n \"text\": \"patient\",\n \"item\": [\n {\n \"linkId\": \"patient_identifier\",\n \"text\": \"NHS Number\",\n \"answer\": [\n {\n \"valueString\": \"9736898245\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name\",\n \"text\": \"patient_name\",\n \"item\": [\n {\n \"linkId\": \"patient_name_first\",\n \"text\": \"First name.\",\n \"answer\": [\n {\n \"valueString\": \"Amber\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name_family\",\n \"text\": \"Family name (often called Surname).\",\n \"answer\": [\n {\n \"valueString\": \"TUCKER\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient_birthDate\",\n \"text\": \"Date of Birth\",\n \"answer\": [\n {\n \"valueDate\": \"2017-06-09\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess\",\n \"text\": \"requestedAccess\",\n \"item\": [\n {\n \"linkId\": \"requestedAccess_accessLevel\",\n \"text\": \"Requested access level\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"APPT\",\n \"display\": \"Appointment Booking\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccess\",\n \"text\": \"Reason for access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-ReasonForAccess\",\n \"code\": \"COMB\",\n \"display\": \"Communication Barriers\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccessMoreinfo\",\n \"text\": \"Reason for access - further information\",\n \"answer\": [\n {\n \"valueString\": \"No internet connection\"\n }\n ]\n }\n ]\n }\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{api_base_url}}/QuestionnaireResponse", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "QuestionnaireResponse" + ] + }, + "description": "## Example scenario\n\n**Given** no proxy role exists between an adult and child \n**When** a valid access request is sent with the proxy as the applicant \n**Then** a 201 response is returned" + }, + "response": [ + { + "name": "A2C access request created", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/fhir+json", + "type": "text" + }, + { + "key": "X-Request-ID", + "value": "d6f3b8fe-0041-4c34-aeb4-eac71020170d", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "46efa85e-d5c4-403b-a38a-1945f33bac2c", + "type": "text" + }, + { + "key": "X-Use-National-Proxy-Store", + "value": "False", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"resourceType\": \"QuestionnaireResponse\",\n \"status\": \"completed\",\n \"authored\": \"2026-01-12T15:09:46.453Z\",\n \"source\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9730675929\"\n }\n },\n \"subject\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898245\"\n }\n },\n \"questionnaire\": \"Questionnaire/01dc6813-3421-4d14-948d-a4888241add1\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson\",\n \"text\": \"relatedPerson\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_identifier\",\n \"text\": \"NHS Number\",\n \"answer\": [\n {\n \"valueString\": \"9730675929\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name\",\n \"text\": \"relatedPerson_name\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_name_first\",\n \"text\": \"First name.\",\n \"answer\": [\n {\n \"valueString\": \"Betty\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name_family\",\n \"text\": \"Family name (often called Surname).\",\n \"answer\": [\n {\n \"valueString\": \"MORLEY\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_birthDate\",\n \"text\": \"Date of Birth\",\n \"answer\": [\n {\n \"valueDate\": \"2005-01-20\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_basisForAccess\",\n \"text\": \"Basis For Access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_relationship\",\n \"text\": \"Relationship\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails\",\n \"text\": \"parentalApplicationSupplementaryDetails\",\n \"item\": [\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_evidenceOfResponsibility\",\n \"text\": \"Evidence of parental responsibility\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-EvidenceOfResponsibility\",\n \"code\": \"BRTH\",\n \"display\": \"Birth certificate\"\n }\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_evidenceOfResponsibilityMoreinfo\",\n \"text\": \"Evidence of responsibility - Further Information\",\n \"answer\": [\n {\n \"valueString\": \"Birth Certificate is original\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_isCurrentAddressConfirmed\",\n \"text\": \"Is current address confirmed?\",\n \"answer\": [\n {\n \"valueString\": \"Yes\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_newAddress\",\n \"text\": \"parentalApplicationSupplementaryDetails_newAddress\",\n \"item\": [\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_line1\",\n \"text\": \"Address Line 1\",\n \"answer\": [\n {\n \"valueString\": \"101 MESSINGHAM ROAD\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_line2\",\n \"text\": \"Address Line 2\",\n \"answer\": [\n {\n \"valueString\": \"\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_line3\",\n \"text\": \"Address Line 3\",\n \"answer\": [\n {\n \"valueString\": \"\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_city\",\n \"text\": \"Town / City\",\n \"answer\": [\n {\n \"valueString\": \"SCUNTHORPE\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_district\",\n \"text\": \"County\",\n \"answer\": [\n {\n \"valueString\": \"S HUMBERSIDE\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_postalCode\",\n \"text\": \"Postcode\",\n \"answer\": [\n {\n \"valueString\": \"DN17 2LN\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_liveAtSameAddress\",\n \"text\": \"Do the adult and child live at the same address?\",\n \"answer\": [\n {\n \"valueString\": \"Yes\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_canChildConsent\",\n \"text\": \"Can the child consent?\",\n \"answer\": [\n {\n \"valueString\": \"No\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_reasonNoChildConsent\",\n \"text\": \"Reason the child cannot consent\",\n \"answer\": [\n {\n \"valueString\": \"Child is too young\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient\",\n \"text\": \"patient\",\n \"item\": [\n {\n \"linkId\": \"patient_identifier\",\n \"text\": \"NHS Number\",\n \"answer\": [\n {\n \"valueString\": \"9736898245\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name\",\n \"text\": \"patient_name\",\n \"item\": [\n {\n \"linkId\": \"patient_name_first\",\n \"text\": \"First name.\",\n \"answer\": [\n {\n \"valueString\": \"Amber\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name_family\",\n \"text\": \"Family name (often called Surname).\",\n \"answer\": [\n {\n \"valueString\": \"TUCKER\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient_birthDate\",\n \"text\": \"Date of Birth\",\n \"answer\": [\n {\n \"valueDate\": \"2017-06-09\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess\",\n \"text\": \"requestedAccess\",\n \"item\": [\n {\n \"linkId\": \"requestedAccess_accessLevel\",\n \"text\": \"Requested access level\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"APPT\",\n \"display\": \"Appointment Booking\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccess\",\n \"text\": \"Reason for access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-ReasonForAccess\",\n \"code\": \"COMB\",\n \"display\": \"Communication Barriers\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccessMoreinfo\",\n \"text\": \"Reason for access - further information\",\n \"answer\": [\n {\n \"valueString\": \"No internet connection\"\n }\n ]\n }\n ]\n }\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{api_base_url}}/QuestionnaireResponse", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "QuestionnaireResponse" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Mon, 01 Dec 2025 16:11:33 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "186" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "4eba2237-3c13-4bab-afb1-1261b5ac6a19" + }, + { + "key": "x-amz-apigw-id", + "value": "U6qoVF-JLPEFXqQ=" + }, + { + "key": "location", + "value": "https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/QuestionnaireResponse/29a7f71a-2554-4e53-87de-07553d40d5ec" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-692dbe34-f306ba0e1a55aba127add964" + }, + { + "key": "X-Request-ID", + "value": "848e592d-a42e-4fee-b529-8ac484fd459c" + }, + { + "key": "X-Correlation-ID", + "value": "73de9aa5-5951-4d30-8f2d-e64482fb1990" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"OperationOutcome\",\n \"issue\": [\n {\n \"severity\": \"information\",\n \"code\": \"informational\",\n \"details\": {\n \"coding\": [\n {\n \"code\": \"19C01N8Q37\",\n \"display\": \"19C01N8Q37\"\n }\n ]\n }\n }\n ]\n}" + }, + { + "name": "A2C access request created - Verified relationship", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/fhir+json", + "type": "text" + }, + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Use-National-Proxy-Store", + "value": "False", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"resourceType\": \"QuestionnaireResponse\",\n \"status\": \"completed\",\n \"authored\": \"{{$isoTimestamp}}\",\n \"source\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9730675929\"\n }\n },\n \"subject\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9730675422\"\n }\n },\n \"questionnaire\": \"Questionnaire/01dc6813-3421-4d14-948d-a4888241add1\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson\",\n \"text\": \"relatedPerson\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_identifier\",\n \"text\": \"NHS Number\",\n \"answer\": [\n {\n \"valueString\": \"9730675929\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name\",\n \"text\": \"relatedPerson_name\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_name_first\",\n \"text\": \"First name.\",\n \"answer\": [\n {\n \"valueString\": \"Betty\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name_family\",\n \"text\": \"Family name (often called Surname).\",\n \"answer\": [\n {\n \"valueString\": \"MORLEY\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_birthDate\",\n \"text\": \"Date of Birth\",\n \"answer\": [\n {\n \"valueDate\": \"2005-01-20\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_basisForAccess\",\n \"text\": \"Basis For Access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_relationship\",\n \"text\": \"Relationship\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails\",\n \"text\": \"parentalApplicationSupplementaryDetails\",\n \"item\": [\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_evidenceOfResponsibility\",\n \"text\": \"Evidence of parental responsibility\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-EvidenceOfResponsibility\",\n \"code\": \"BRTH\",\n \"display\": \"Birth certificate\"\n }\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_evidenceOfResponsibilityMoreinfo\",\n \"text\": \"Evidence of responsibility - Further Information\",\n \"answer\": [\n {\n \"valueString\": \"Birth Certificate is original\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_isCurrentAddressConfirmed\",\n \"text\": \"Is current address confirmed?\",\n \"answer\": [\n {\n \"valueString\": \"Yes\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_newAddress\",\n \"text\": \"parentalApplicationSupplementaryDetails_newAddress\",\n \"item\": [\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_line1\",\n \"text\": \"Address Line 1\",\n \"answer\": [\n {\n \"valueString\": \"101 MESSINGHAM ROAD\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_line2\",\n \"text\": \"Address Line 2\",\n \"answer\": [\n {\n \"valueString\": \"\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_line3\",\n \"text\": \"Address Line 3\",\n \"answer\": [\n {\n \"valueString\": \"\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_city\",\n \"text\": \"Town / City\",\n \"answer\": [\n {\n \"valueString\": \"SCUNTHORPE\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_district\",\n \"text\": \"County\",\n \"answer\": [\n {\n \"valueString\": \"S HUMBERSIDE\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_postalCode\",\n \"text\": \"Postcode\",\n \"answer\": [\n {\n \"valueString\": \"DN17 2LN\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_liveAtSameAddress\",\n \"text\": \"Do the adult and child live at the same address?\",\n \"answer\": [\n {\n \"valueString\": \"Yes\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_canChildConsent\",\n \"text\": \"Can the child consent?\",\n \"answer\": [\n {\n \"valueString\": \"No\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_reasonNoChildConsent\",\n \"text\": \"Reason the child cannot consent\",\n \"answer\": [\n {\n \"valueString\": \"Child is too young\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient\",\n \"text\": \"patient\",\n \"item\": [\n {\n \"linkId\": \"patient_identifier\",\n \"text\": \"NHS Number\",\n \"answer\": [\n {\n \"valueString\": \"9730675422\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name\",\n \"text\": \"patient_name\",\n \"item\": [\n {\n \"linkId\": \"patient_name_first\",\n \"text\": \"First name.\",\n \"answer\": [\n {\n \"valueString\": \"Rowena\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name_family\",\n \"text\": \"Family name (often called Surname).\",\n \"answer\": [\n {\n \"valueString\": \"HIRST\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient_birthDate\",\n \"text\": \"Date of Birth\",\n \"answer\": [\n {\n \"valueDate\": \"2015-08-09\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess\",\n \"text\": \"requestedAccess\",\n \"item\": [\n {\n \"linkId\": \"requestedAccess_accessLevel\",\n \"text\": \"Requested access level\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"APPT\",\n \"display\": \"Appointment Booking\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccess\",\n \"text\": \"Reason for access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-ReasonForAccess\",\n \"code\": \"COMB\",\n \"display\": \"Communication Barriers\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccessMoreinfo\",\n \"text\": \"Reason for access - further information\",\n \"answer\": [\n {\n \"valueString\": \"No internet connection\"\n }\n ]\n }\n ]\n }\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{api_base_url}}/QuestionnaireResponse", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "QuestionnaireResponse" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Mon, 01 Dec 2025 16:11:33 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "186" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "4eba2237-3c13-4bab-afb1-1261b5ac6a19" + }, + { + "key": "x-amz-apigw-id", + "value": "U6qoVF-JLPEFXqQ=" + }, + { + "key": "location", + "value": "https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/QuestionnaireResponse/29a7f71a-2554-4e53-87de-07553d40d5ec" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-692dbe34-f306ba0e1a55aba127add964" + }, + { + "key": "X-Request-ID", + "value": "848e592d-a42e-4fee-b529-8ac484fd459c" + }, + { + "key": "X-Correlation-ID", + "value": "73de9aa5-5951-4d30-8f2d-e64482fb1990" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"OperationOutcome\",\n \"issue\": [\n {\n \"severity\": \"information\",\n \"code\": \"informational\",\n \"details\": {\n \"coding\": [\n {\n \"code\": \"19C01N8Q37\",\n \"display\": \"19C01N8Q37\"\n }\n ]\n }\n }\n ]\n}" + } + ] + }, + { + "name": "Invalid request body - New adult to adult access request", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/fhir+json", + "type": "text" + }, + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Use-National-Proxy-Store", + "value": "False", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{api_base_url}}/QuestionnaireResponse", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "QuestionnaireResponse" + ] + }, + "description": "## Example scenario\n\n**Given** no proxy role exists between two adults \n**When** a access request is sent with invalid body \n**Then** a 400 error response is returned with code 'INVALID_VALUE'" + }, + "response": [ + { + "name": "Invalid request body error response", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/fhir+json", + "type": "text" + }, + { + "key": "X-Request-ID", + "value": "94d7227f-f801-465f-b04c-8dd7494faf5f", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "7f829c8e-bec6-4cbe-8ed0-d71bf981095b", + "type": "text" + }, + { + "key": "X-Use-National-Proxy-Store", + "value": "False", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{api_base_url}}/QuestionnaireResponse", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "QuestionnaireResponse" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Mon, 01 Dec 2025 16:13:37 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "377" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "28073546-4513-47c5-9d2e-17caeb920a78" + }, + { + "key": "x-amz-apigw-id", + "value": "U6q7zHXFLPEF3Bg=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-692dbeb1-7dd1e1125d0b5422386cffe9" + }, + { + "key": "X-Request-ID", + "value": "d82f5db5-1c08-4251-a94b-50684ea1a06b" + }, + { + "key": "X-Correlation-ID", + "value": "7eeca365-bf2b-4859-9e2c-b5c7731bbe1b" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"issue\": [\n {\n \"code\": \"invalid\",\n \"details\": {\n \"coding\": [\n {\n \"code\": \"BAD_REQUEST\",\n \"display\": \"The request could not be processed.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"The supplied input is not a valid FHIR QuestionnaireResponse.\",\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" + } + ] + } + ], + "description": "## Allowed auth methods\n\n- NHS Login token - Auth with test user `9730675929`\n \n\nSee collection level documentation for info about how to get authorization tokens.", + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{login_token}}", + "type": "string" + } + ] + }, + "event": [ + { + "listen": "prerequest", + "script": { + "type": "text/javascript", + "packages": {}, + "requests": {}, + "exec": [ + "" + ] + } + }, + { + "listen": "test", + "script": { + "type": "text/javascript", + "packages": {}, + "requests": {}, + "exec": [ + "" + ] + } + } + ] + }, + { + "name": "Get access request (GET /QuestionnaireResponse/{id})", + "item": [ + { + "name": "Valid request - Get access request", + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/QuestionnaireResponse/:access_request_id", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "QuestionnaireResponse", + ":access_request_id" + ], + "variable": [ + { + "key": "access_request_id", + "value": "32a5cc78-eb64-4367-abea-cfdb6e9fa2e4" + } + ] + }, + "description": "## Example scenario\n\n**Given** a valid access request has been sent to VRS \n**When** a GET /QuestionnaireResponse/{id} request is sent with the access request UUID \n**Then** the access request is returned" + }, + "response": [] + }, + { + "name": "No access request found - Get access request", + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/QuestionnaireResponse/:access_request_id", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "QuestionnaireResponse", + ":access_request_id" + ], + "variable": [ + { + "key": "access_request_id", + "value": "32a5cc78-eb64-4367-abea-cfdb6e9fa2e4" + } + ] + }, + "description": "## Example scenario\n\n**Given** a valid access request has been sent to VRS \n**When** a GET /QuestionnaireResponse/{id} request is sent with a random UUID \n**Then** a 404 error is returned with message 'QUESTIONNAIRE_RESPONSE_NOT_FOUND'" + }, + "response": [ + { + "name": "No access request found error returned", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "074b07d8-104e-4574-abd7-bdc5181280da", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "f47a9a68-34a5-4a11-881b-8b45695f2e76", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/QuestionnaireResponse/:access_request_id", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "QuestionnaireResponse", + ":access_request_id" + ], + "variable": [ + { + "key": "access_request_id", + "value": "32a5cc78-eb64-4367-abea-cfdb6e9fa2e4" + } + ] + } + }, + "status": "Not Found", + "code": 404, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Mon, 01 Dec 2025 14:37:04 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "400" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "64959769-f136-4d27-9369-b4e01224c066" + }, + { + "key": "x-amz-apigw-id", + "value": "U6cyYE4brPEFXvw=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-692da80e-520fcf28565fe1ea77ceb7fc" + }, + { + "key": "X-Request-ID", + "value": "f6fe610a-d80b-4436-b727-67960c9687a1" + }, + { + "key": "X-Correlation-ID", + "value": "076421a4-1c56-43e4-95a9-6139434516a7" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"OperationOutcome\",\n \"issue\": [\n {\n \"severity\": \"error\",\n \"code\": \"not-found\",\n \"details\": {\n \"coding\": [\n {\n \"code\": \"QUESTIONNAIRE_RESPONSE_NOT_FOUND\",\n \"display\": \"Questionnaire response not found\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\"\n }\n ]\n },\n \"diagnostics\": \"The Questionnaire response could not be found using the provided access request ID.\"\n }\n ]\n}" + } + ] + }, + { + "name": "No access request UUID - Get access request", + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/QuestionnaireResponse/", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "QuestionnaireResponse", + "" + ] + }, + "description": "## Example scenario\n\n**Given** a valid access request has been sent to VRS \n**When** a GET /QuestionnaireResponse/{id} request is sent without a UUID \n**Then** a 400 error is returned with message 'METHOD_NOT_ALLOWED'" + }, + "response": [ + { + "name": "No access request UUID invalid response", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "6e763c1c-b24b-4ffe-8598-e2983ae5e3cf", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "87ed4d25-05d6-4ab6-985e-a254cdd26339", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/QuestionnaireResponse/", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "QuestionnaireResponse", + "" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Mon, 01 Dec 2025 15:15:37 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "370" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "42e98c18-f152-4e8f-8cd2-fc0ba2bcc590" + }, + { + "key": "x-amz-apigw-id", + "value": "U6ibrGjDrPEFgRQ=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-692db117-2a87f1ac0c50e6702fcbc5ce" + }, + { + "key": "X-Request-ID", + "value": "4270ae5f-3cc9-418e-a6f8-aab43372486a" + }, + { + "key": "X-Correlation-ID", + "value": "a23d9c20-bcf2-4e03-ba6b-092a703947f3" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"issue\": [\n {\n \"code\": \"not-supported\",\n \"details\": {\n \"coding\": [\n {\n \"code\": \"METHOD_NOT_ALLOWED\",\n \"display\": \"The method is not allowed.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"The method is not allowed for the requested resource.\",\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" + } + ] + }, + { + "name": "Invalid access request UUID - Get access request", + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/QuestionnaireResponse/invalid", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "QuestionnaireResponse", + "invalid" + ] + }, + "description": "## Example scenario\n\n**Given** a valid access request has been sent to VRS \n**When** a GET /QuestionnaireResponse/{id} request is sent with an invalid UUID \n**Then** a 400 error is returned with message 'INVALID_IDENTIFIER_VALUE'" + }, + "response": [ + { + "name": "Invalid access request UUID invalid response", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "30e863b4-b90b-439e-a757-06eadf3cae48", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "79bc7284-1f65-407a-bc5e-1e5bd8d0496b", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/QuestionnaireResponse/invalid", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "QuestionnaireResponse", + "invalid" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Mon, 01 Dec 2025 15:15:37 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "370" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "42e98c18-f152-4e8f-8cd2-fc0ba2bcc590" + }, + { + "key": "x-amz-apigw-id", + "value": "U6ibrGjDrPEFgRQ=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-692db117-2a87f1ac0c50e6702fcbc5ce" + }, + { + "key": "X-Request-ID", + "value": "4270ae5f-3cc9-418e-a6f8-aab43372486a" + }, + { + "key": "X-Correlation-ID", + "value": "a23d9c20-bcf2-4e03-ba6b-092a703947f3" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"OperationOutcome\",\n \"issue\": [\n {\n \"severity\": \"error\",\n \"code\": \"invalid\",\n \"details\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/STU3/CodeSystem/Spine-ErrorOrWarningCode-1\",\n \"code\": \"INVALID_IDENTIFIER_VALUE\",\n \"display\": \"Invalid identifier value\"\n }\n ]\n },\n \"diagnostics\": \"The specified access request ID is invalid. Access request IDs must be a valid UUID.\"\n }\n ]\n}" + } + ] + } + ], + "description": "## Allowed auth methods\n\n- CIS2 token - Auth with test user `656005750108`\n \n- NHS Login token - Auth with test user `9730675929`\n \n\nSee collection level documentation for info about how to get authorization tokens.", + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{cis2_token}}", + "type": "string" + } + ] + }, + "event": [ + { + "listen": "prerequest", + "script": { + "type": "text/javascript", + "packages": {}, + "requests": {}, + "exec": [ + "" + ] + } + }, + { + "listen": "test", + "script": { + "type": "text/javascript", + "packages": {}, + "requests": {}, + "exec": [ + "" + ] + } + } + ] + }, + { + "name": "Create a new proxy role (POST /Consent)", + "item": [ + { + "name": "Valid request - New proxy role", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{cis2_token}}", + "type": "string" + } + ] + }, + "method": "POST", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "Content-Type", + "value": "application/fhir+json", + "type": "text" + } + ], + "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\": \"{{$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 from scratch by GP\"\n }\n ],\n \"text\": \"Some text\"\n }\n }\n ]\n}\n", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{api_base_url}}/Consent", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ] + }, + "description": "## Important - duplicates\n\nWe cannot currently accept duplicate proxy role requests for testing purposes.\n\nThis may lead to you experiencing 409 errors on the 'valid request' scenarios if the same request has already been sent.\n\n## 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 \n**Then** a 201 success response is returned" + }, + "response": [ + { + "name": "Adult to child - New proxy role created", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "X-Request-ID", + "value": "df29a1cb-3861-4d7f-918d-3bcf6f5ef362", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "0b7ed233-3055-48ac-93ef-c71922ccc577", + "type": "text" + }, + { + "key": "Content-Type", + "value": "application/fhir+json", + "type": "text" + } + ], + "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.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 from scratch by GP\"\n }\n ]\n }\n }\n ]\n}\n", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{api_base_url}}/Consent", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Fri, 28 Nov 2025 15:14:39 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "101" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "bf6bc3d8-1829-4a81-9433-c0b1c21376d6" + }, + { + "key": "x-amz-apigw-id", + "value": "Uwpe7FCjrPEF5aQ=" + }, + { + "key": "location", + "value": "https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/4f15f399-d381-4949-a744-25f9cbfecfb3" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-6929bc5f-f6012c539553033b0859994a" + }, + { + "key": "X-Request-ID", + "value": "46baf4c8-5bb5-4a6e-9bd4-264452817dab" + }, + { + "key": "X-Correlation-ID", + "value": "65bdf903-1cb2-4722-a291-d5056c44e712" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"OperationOutcome\",\n \"issue\": [\n {\n \"severity\": \"information\",\n \"code\": \"informational\"\n }\n ]\n}" + }, + { + "name": "Adult to adult - New proxy role created", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "Content-Type", + "value": "application/fhir+json", + "type": "text" + } + ], + "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\": \"9736898202\"\n }\n },\n \"dateTime\": \"{{$isoTimestamp}}\",\n \"performer\": [\n {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898164\"\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\": \"9736898164\"\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 from scratch by GP\"\n }\n ]\n }\n }\n ]\n}\n", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{api_base_url}}/Consent", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Fri, 28 Nov 2025 15:14:39 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "101" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "bf6bc3d8-1829-4a81-9433-c0b1c21376d6" + }, + { + "key": "x-amz-apigw-id", + "value": "Uwpe7FCjrPEF5aQ=" + }, + { + "key": "location", + "value": "https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/4f15f399-d381-4949-a744-25f9cbfecfb3" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-6929bc5f-f6012c539553033b0859994a" + }, + { + "key": "X-Request-ID", + "value": "46baf4c8-5bb5-4a6e-9bd4-264452817dab" + }, + { + "key": "X-Correlation-ID", + "value": "65bdf903-1cb2-4722-a291-d5056c44e712" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"OperationOutcome\",\n \"issue\": [\n {\n \"severity\": \"information\",\n \"code\": \"informational\"\n }\n ]\n}" + } + ] + }, + { + "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": {}, + "requests": {} + } + } + ], + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{cis2_token}}", + "type": "string" + } + ] + }, + "method": "POST", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "Content-Type", + "value": "application/fhir+json", + "type": "text" + } + ], + "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\": \"{{$isoTimestamp}}\",\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.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" + } + } + }, + "url": { + "raw": "{{api_base_url}}/Consent", + "host": [ + "{{api_base_url}}" + ], + "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 identifier value error returned", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "X-Request-ID", + "value": "fa822d40-196d-4112-8c87-b46631ba7463", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "13f1ba14-20e9-48c8-b1ef-7f2c34d9bab3", + "type": "text" + }, + { + "key": "Content-Type", + "value": "application/fhir+json", + "type": "text" + } + ], + "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.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" + } + } + }, + "url": { + "raw": "{{api_base_url}}/Consent", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ] + } + }, + "status": "Unprocessable Entity (WebDAV) (RFC 4918)", + "code": 422, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Fri, 28 Nov 2025 12:46:09 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "402" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "369c4598-e093-44d1-8d27-015c1e1f8a40" + }, + { + "key": "x-amz-apigw-id", + "value": "UwTu1FORLPEFh3Q=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-69299991-27f38de5fa687e1e7d4659b3" + }, + { + "key": "X-Request-ID", + "value": "70591ef1-fbe0-442b-bd9a-545fb5713859" + }, + { + "key": "X-Correlation-ID", + "value": "037cf36b-1014-4177-bcc6-c1cd647aae42" + }, + { + "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_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}" + } + ] + }, + { + "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": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "Content-Type", + "value": "application/fhir+json", + "type": "text" + } + ], + "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.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",\n \"code\": \"OTHER\",\n \"display\": \"Other\"\n }\n ]\n }\n }\n ]\n}\n", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{api_base_url}}/Consent", + "host": [ + "{{api_base_url}}" + ], + "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": "Missing free text code error returned", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "Content-Type", + "value": "application/fhir+json", + "type": "text" + } + ], + "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.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",\n \"code\": \"OTHER\",\n \"display\": \"Other\"\n }\n ]\n }\n }\n ]\n}\n", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{api_base_url}}/Consent", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ] + } + }, + "status": "Unprocessable Entity (WebDAV) (RFC 4918)", + "code": 422, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Fri, 28 Nov 2025 12:46:09 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "402" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "369c4598-e093-44d1-8d27-015c1e1f8a40" + }, + { + "key": "x-amz-apigw-id", + "value": "UwTu1FORLPEFh3Q=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-69299991-27f38de5fa687e1e7d4659b3" + }, + { + "key": "X-Request-ID", + "value": "70591ef1-fbe0-442b-bd9a-545fb5713859" + }, + { + "key": "X-Correlation-ID", + "value": "037cf36b-1014-4177-bcc6-c1cd647aae42" + }, + { + "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_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": "Duplicate role - New proxy role", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{cis2_token}}", + "type": "string" + } + ] + }, + "method": "POST", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "Content-Type", + "value": "application/fhir+json", + "type": "text" + } + ], + "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\": \"9736898148\"\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 from scratch by GP\"\n }\n ],\n \"text\": \"Some text\"\n }\n }\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{api_base_url}}/Consent", + "host": [ + "{{api_base_url}}" + ], + "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", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "X-Request-ID", + "value": "8616edc0-f04b-4d56-ac54-4c5dd8930d87", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "42cf4c55-e180-4b8f-abe3-60acd1780311", + "type": "text" + }, + { + "key": "Content-Type", + "value": "application/fhir+json", + "type": "text" + } + ], + "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\": \"9736898148\"\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 from scratch by GP\"\n }\n ],\n \"text\": \"Some text\"\n }\n }\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{api_base_url}}/Consent", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ] + } + }, + "status": "Conflict", + "code": 409, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Fri, 28 Nov 2025 12:41:31 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "352" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "de65a534-5cee-45c1-845e-023e9ffab375" + }, + { + "key": "x-amz-apigw-id", + "value": "UwTC8H42LPEFggg=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-69299878-54ea0e3b7bd5d7e836eaea8f" + }, + { + "key": "X-Request-ID", + "value": "dd90c863-82e3-4ef8-9568-3e68a64de1e0" + }, + { + "key": "X-Correlation-ID", + "value": "b08cd6b6-96fc-410c-84a9-e52732fcbc09" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "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}" + } + ] + }, + { + "name": "Missing scope - New proxy role", + "request": { + "method": "POST", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "Content-Type", + "value": "application/fhir+json", + "type": "text" + } + ], + "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 \"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\": \"{{$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" + } + } + }, + "url": { + "raw": "{{api_base_url}}/Consent", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ] + } + }, + "response": [ + { + "name": "Missing scope error returned", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "X-Request-ID", + "value": "2aa3293e-ad0e-4389-a466-d3209ebbfa4e", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "425ca0da-e10c-4010-86b4-93ca9bf737eb", + "type": "text" + }, + { + "key": "Content-Type", + "value": "application/fhir+json", + "type": "text" + } + ], + "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 \"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:50.676Z\",\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" + } + } + }, + "url": { + "raw": "{{api_base_url}}/Consent", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Fri, 28 Nov 2025 15:18:49 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "353" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "75bfd563-8f97-4b8a-8d50-a08643917d89" + }, + { + "key": "x-amz-apigw-id", + "value": "UwqGBE7MLPEFySQ=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-6929bd59-918cef993de61bcebe339d3e" + }, + { + "key": "X-Request-ID", + "value": "2ca06d13-2568-4f70-b06c-077af0f57137" + }, + { + "key": "X-Correlation-ID", + "value": "8c8ffb79-cc4c-4cb0-a62e-31dc1310a387" + }, + { + "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_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": "Invalid status - New proxy role", + "request": { + "method": "POST", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "Content-Type", + "value": "application/fhir+json", + "type": "text" + } + ], + "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 \"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\": \"{{$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" + } + } + }, + "url": { + "raw": "{{api_base_url}}/Consent", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ] + } + }, + "response": [ + { + "name": "Invalid status - New proxy role", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "X-Request-ID", + "value": "1e0a0136-6025-4190-8450-5676ada97c3c", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "bc404ec3-52fa-465c-9401-2b70484989bc", + "type": "text" + }, + { + "key": "Content-Type", + "value": "application/fhir+json", + "type": "text" + } + ], + "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 \"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:50.953Z\",\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" + } + } + }, + "url": { + "raw": "{{api_base_url}}/Consent", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ] + } + }, + "status": "Unprocessable Entity (WebDAV) (RFC 4918)", + "code": 422, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Fri, 28 Nov 2025 15:27:32 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "339" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "47dd1183-4b49-44f1-a524-79fe459589a9" + }, + { + "key": "x-amz-apigw-id", + "value": "UwrXkFOZrPEF1ZA=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-6929bf63-31132bda7b3f654ea3534f15" + }, + { + "key": "X-Request-ID", + "value": "e23fbdd1-027c-4281-b37d-094691df9fc7" + }, + { + "key": "X-Correlation-ID", + "value": "226277b1-9d7c-411a-b3fd-3a4a70a4d90e" + }, + { + "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_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 code - Missing free text for Other", + "request": { + "method": "POST", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "Content-Type", + "value": "application/fhir+json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"resourceType\": \"Consent\",\n \"status\": \"blah\",\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\": \"2025-02-11T14:30:00Z\",\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 from scratch by GP\"\n }\n ],\n \"text\": \"Some text\"\n }\n }\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{api_base_url}}/Consent", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ] + } + }, + "response": [ + { + "name": "Invalid status - New proxy role", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "X-Request-ID", + "value": "5209f087-7de5-4070-9964-16b26334d147", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "f6571cd8-1edf-4827-aa8a-be6dac5a7620", + "type": "text" + }, + { + "key": "Content-Type", + "value": "application/fhir+json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"resourceType\": \"Consent\",\n \"status\": \"blah\",\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\": \"2025-02-11T14:30:00Z\",\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 from scratch by GP\"\n }\n ],\n \"text\": \"Some text\"\n }\n }\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{api_base_url}}/Consent", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ] + } + }, + "status": "Unprocessable Entity (WebDAV) (RFC 4918)", + "code": 422, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Fri, 28 Nov 2025 15:27:32 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "339" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "47dd1183-4b49-44f1-a524-79fe459589a9" + }, + { + "key": "x-amz-apigw-id", + "value": "UwrXkFOZrPEF1ZA=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-6929bf63-31132bda7b3f654ea3534f15" + }, + { + "key": "X-Request-ID", + "value": "e23fbdd1-027c-4281-b37d-094691df9fc7" + }, + { + "key": "X-Correlation-ID", + "value": "226277b1-9d7c-411a-b3fd-3a4a70a4d90e" + }, + { + "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_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 identifer system - New proxy role", + "request": { + "method": "POST", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "Content-Type", + "value": "application/fhir+json", + "type": "text" + } + ], + "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/invalid\",\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/invalid\",\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" + } + } + }, + "url": { + "raw": "{{api_base_url}}/Consent", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ] + } + }, + "response": [ + { + "name": "Invalid status error returned", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "X-Request-ID", + "value": "004491e4-b270-4882-99c8-af4e387a505f", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "5f51e084-afd4-442b-b229-5470a750de52", + "type": "text" + }, + { + "key": "Content-Type", + "value": "application/fhir+json", + "type": "text" + } + ], + "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/invalid\",\n \"value\": \"9736898717\"\n }\n },\n \"dateTime\": \"2026-01-12T15:10:06.762Z\",\n \"performer\": [\n {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number/invalid\",\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" + } + } + }, + "url": { + "raw": "{{api_base_url}}/Consent", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ] + } + }, + "status": "Unprocessable Entity (WebDAV) (RFC 4918)", + "code": 422, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Fri, 28 Nov 2025 15:29:32 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "399" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "9ca19fe7-0a06-4da0-9b72-9e6135da40f1" + }, + { + "key": "x-amz-apigw-id", + "value": "UwrqcGPaLPEFWkg=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-6929bfdc-4e9f2ada8f5faf65f1630c1c" + }, + { + "key": "X-Request-ID", + "value": "21cc43ac-e531-477d-bc97-3e77e9657b52" + }, + { + "key": "X-Correlation-ID", + "value": "aeeaa71d-0a78-4e83-8c81-3b2884371ae9" + }, + { + "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_IDENTIFIER_SYSTEM\",\n \"display\": \"Invalid identifier system.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"Patient identifier system is invalid\",\n \"expression\": [\n \"patient.identifier.system\"\n ],\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" + } + ] + } + ], + "description": "## Allowed auth methods\n\n- CIS2 token - Auth with test user `656005750108`\n \n\nSee collection level documentation for info about how to get authorization tokens.", + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{cis2_token}}", + "type": "string" + } + ] + }, + "event": [ + { + "listen": "prerequest", + "script": { + "type": "text/javascript", + "packages": {}, + "requests": {}, + "exec": [ + "" + ] + } + }, + { + "listen": "test", + "script": { + "type": "text/javascript", + "packages": {}, + "requests": {}, + "exec": [ + "" + ] + } + } + ] + }, + { + "name": "Update proxy role (PATCH /Consent/{id})", + "item": [ + { + "name": "Valid request - Single update - Update proxy role", + "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 {\"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 patients request\"\n }\n ]\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": "Proxy role updated to 'inactive' status", + "originalRequest": { + "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 {\"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 patients request\"\n }\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" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Fri, 28 Nov 2025 16:23:31 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "101" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "5b03d759-c55a-462d-ba3c-e2dbf92d031a" + }, + { + "key": "x-amz-apigw-id", + "value": "UwzkUE0urPEFqHg=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-6929cc81-0d146fcdbc79baf5a5279c3d" + }, + { + "key": "X-Request-ID", + "value": "4555113e-aa4d-409d-bac0-41b0ed91cfc2" + }, + { + "key": "X-Correlation-ID", + "value": "b8c69a60-667d-4b0f-89c7-9de6d4e289a4" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"OperationOutcome\",\n \"issue\": [\n {\n \"severity\": \"information\",\n \"code\": \"informational\"\n }\n ]\n}" + }, + { + "name": "Proxy role end date updated", + "originalRequest": { + "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\": \"/provision/period/end\",\n \"value\": \"2026-12-31\"\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" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Date", + "value": "Thu, 04 Dec 2025 15:48:46 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "101" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "eb0a2130-76e5-41a0-9916-e7c8aa25a4ea" + }, + { + "key": "x-amz-apigw-id", + "value": "VEgG2Hh6LPEFXRQ=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-6931ad5e-d4506ade6d4f3410b20618b9" + }, + { + "key": "X-Request-ID", + "value": "90a9a964-db4c-4ec7-9498-76087f979bb5" + }, + { + "key": "X-Correlation-ID", + "value": "2aa6936b-c5ba-437d-898e-c58794601a01" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"OperationOutcome\",\n \"issue\": [\n {\n \"severity\": \"information\",\n \"code\": \"informational\"\n }\n ]\n}" + }, + { + "name": "Proxy role legal basis updated", + "originalRequest": { + "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\": \"/provision/actor\",\n \"value\": [\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]", + "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" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Date", + "value": "Thu, 04 Dec 2025 15:54:54 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "101" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "63072889-896c-43b1-aff1-0e4eceb2b4d4" + }, + { + "key": "x-amz-apigw-id", + "value": "VEg_9FQxLPEF1mA=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-6931aecc-d571f76cb8f3900088a01c45" + }, + { + "key": "X-Request-ID", + "value": "e436ebda-5011-431a-9de3-1d0749c6f45e" + }, + { + "key": "X-Correlation-ID", + "value": "930a58a1-7ca9-4a89-ac33-a24f5277b1d9" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"OperationOutcome\",\n \"issue\": [\n {\n \"severity\": \"information\",\n \"code\": \"informational\"\n }\n ]\n}" + } + ] + }, + { + "name": "Valid request - Multiple updates - Update proxy role", + "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 {\"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 patients request\"\n }\n ]\n }\n }\n ]\n },\n {\n \"op\": \"replace\",\n \"path\": \"/provision/period/end\",\n \"value\": \"2026-12-31\"\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 with multiple updates for the proxy role \n**Then** a 200 response is returned and the role is updated" + }, + "response": [ + { + "name": "Proxy role status updated with end date", + "originalRequest": { + "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 {\"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 patients request\"\n }\n ]\n }\n }\n ]\n },\n {\n \"op\": \"replace\",\n \"path\": \"/provision/period/end\",\n \"value\": \"2026-12-31\"\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" + } + ] + } + }, + "status": "Not Found", + "code": 404, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Date", + "value": "Thu, 04 Dec 2025 15:56:16 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "348" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "fbb23fc6-d143-4ad4-ab95-fef1276bf7d0" + }, + { + "key": "x-amz-apigw-id", + "value": "VEhNJE2VrPEFXkA=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-6931af20-0cc7e03b708f8949fc05bdfa" + }, + { + "key": "X-Request-ID", + "value": "0aa389b6-9542-428f-9e1c-b5411ff0a531" + }, + { + "key": "X-Correlation-ID", + "value": "e3845975-3d6b-4185-81cb-22a80f7ed0da" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"OperationOutcome\",\n \"issue\": [\n {\n \"severity\": \"information\",\n \"code\": \"informational\"\n }\n ]\n}" + } + ] + }, + { + "name": "Resource not found - Update proxy role", + "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 {\"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 patients request\"\n }\n ]\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": "{{$randomUUID}}" + } + ] + }, + "description": "## Example scenario\n\n**Given** a proxy role exists in the National Proxy Store for a given UUID \n**When** a PATCH /Consent request is sent using the UUID \n**Then** a 404 error is returned with code 'RESOURCE_NOT_FOUND'" + }, + "response": [ + { + "name": "Resource not found error response", + "originalRequest": { + "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 {\"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 patients request\"\n }\n ]\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": "{{$randomUUID}}" + } + ] + } + }, + "status": "Not Found", + "code": 404, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Fri, 28 Nov 2025 16:51:31 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "348" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "5940dd45-0b04-4e71-8fce-6a69665b256e" + }, + { + "key": "x-amz-apigw-id", + "value": "Uw3q4HTZrPEFxLQ=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-6929d312-f383a46c595faa9361bb8326" + }, + { + "key": "X-Request-ID", + "value": "4cfc1e62-1d97-47b2-825e-2f72eed5e29e" + }, + { + "key": "X-Correlation-ID", + "value": "db86232d-68a5-492d-96e3-02613a3cf6bf" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"issue\": [\n {\n \"code\": \"invalid\",\n \"diagnostics\": \"Proxy role not found.\",\n \"details\": {\n \"coding\": [\n {\n \"code\": \"RESOURCE_NOT_FOUND\",\n \"display\": \"Request must be for a existing proxy role.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" + } + ] + }, + { + "name": "Invalid status code - Update proxy role", + "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 {\"op\": \"replace\", \"path\": \"/status\", \"value\": \"invalid_status\"},\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 patients request\"\n }\n ]\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 for a given UUID \n**When** a PATCH /Consent request is sent using the UUID \n**Then** a 404 error is returned with code 'RESOURCE_NOT_FOUND'" + }, + "response": [ + { + "name": "Invalid status code error returned", + "originalRequest": { + "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 {\"op\": \"replace\", \"path\": \"/status\", \"value\": \"invalid_status\"},\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 patients request\"\n }\n ]\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": "aa58f9b7-2a02-45a2-9cb4-0d6fefe07a02" + } + ] + } + }, + "status": "Unprocessable Entity (WebDAV) (RFC 4918)", + "code": 422, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Fri, 28 Nov 2025 16:56:26 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "329" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "557c0652-9a38-434c-99c1-f979920055bf" + }, + { + "key": "x-amz-apigw-id", + "value": "Uw4ZOEOOLPEFggg=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-6929d43a-6c636f683c11b4ac83776aa6" + }, + { + "key": "X-Request-ID", + "value": "1a4ee8bf-0d2b-4398-950f-b3fd9332e7d3" + }, + { + "key": "X-Correlation-ID", + "value": "986fe591-c2f0-422d-9e1e-c99628e9a1df" + }, + { + "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_STATUS_CODE\",\n \"display\": \"Status code is invalid.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"Invalid status code.\",\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" + } + ] + }, + { + "name": "Invalid state transition - Update proxy role", + "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 {\"op\": \"replace\", \"path\": \"/status\", \"value\": \"proposed\"},\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\": \"APPLICATION_RESUBMITTED\",\n \"display\": \"Application re-submitted online after previously rejected\"\n }\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 for a given UUID \n**When** a PATCH /Consent request is sent using the UUID \n**Then** a 404 error is returned with code 'RESOURCE_NOT_FOUND'" + }, + "response": [ + { + "name": "Invalid status code error returned", + "originalRequest": { + "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\": \"someinvalidcode\"\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": "aa58f9b7-2a02-45a2-9cb4-0d6fefe07a02" + } + ] + } + }, + "status": "Unprocessable Entity (WebDAV) (RFC 4918)", + "code": 422, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Fri, 28 Nov 2025 16:56:26 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "329" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "557c0652-9a38-434c-99c1-f979920055bf" + }, + { + "key": "x-amz-apigw-id", + "value": "Uw4ZOEOOLPEFggg=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-6929d43a-6c636f683c11b4ac83776aa6" + }, + { + "key": "X-Request-ID", + "value": "1a4ee8bf-0d2b-4398-950f-b3fd9332e7d3" + }, + { + "key": "X-Correlation-ID", + "value": "986fe591-c2f0-422d-9e1e-c99628e9a1df" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"issue\": [\n {\n \"code\": \"invalid\",\n \"diagnostics\": \"Patch attempting invalid status change.\",\n \"details\": {\n \"coding\": [\n {\n \"code\": \"INVALID_STATE_TRANSITION\",\n \"display\": \"Status change is invalid.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" + } + ] + }, + { + "name": "Invalid path - Update proxy role", + "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\": \"/someotherpath\",\n \"value\": \"active\"\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 for a given UUID \n**When** a PATCH /Consent request with an invalid path is sent using the UUID \n**Then** a 400 error is returned with code 'INVALID_PATCH_PATH'" + }, + "response": [ + { + "name": "Invalid path error returned", + "originalRequest": { + "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\": \"/someotherpath\",\n \"value\": \"active\"\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": "aa58f9b7-2a02-45a2-9cb4-0d6fefe07a02" + } + ] + } + }, + "status": "Unprocessable Entity (WebDAV) (RFC 4918)", + "code": 422, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Fri, 28 Nov 2025 16:58:39 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "346" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "9c37f3a0-d1af-4a9d-8664-20edf45bd111" + }, + { + "key": "x-amz-apigw-id", + "value": "Uw4t7HzBrPEFTsw=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-6929d4bf-e038f4c128983e6e945b14ad" + }, + { + "key": "X-Request-ID", + "value": "3e5e943f-2647-4a09-b216-7d3551a637e7" + }, + { + "key": "X-Correlation-ID", + "value": "65dc6940-bcb3-466d-b25d-0a10ab98d7e6" + }, + { + "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_PATCH_PATH\",\n \"display\": \"Patch target is invalid.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"Patch targeting non-existent element.\",\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" + } + ] + }, + { + "name": "Missing free text for Other", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "" + ], + "type": "text/javascript", + "packages": {}, + "requests": {} + } + } + ], + "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 {\"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\": \"OTHER\",\n \"display\": \"Other\"\n }\n ]\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 for a given UUID \n**When** a PATCH /Consent request with a missing free text and status reason of 'Other' is sent using the UUID \n**Then** a 400 error is returned with code 'MISSING_FREE_TEXT_FOR_OTHER'" + }, + "response": [ + { + "name": "Missing free text error", + "originalRequest": { + "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 {\"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\": \"OTHER\",\n \"display\": \"Other\"\n }\n ]\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" + } + ] + } + }, + "status": "Unprocessable Entity (WebDAV) (RFC 4918)", + "code": 422, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Fri, 28 Nov 2025 16:58:39 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "346" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "9c37f3a0-d1af-4a9d-8664-20edf45bd111" + }, + { + "key": "x-amz-apigw-id", + "value": "Uw4t7HzBrPEFTsw=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-6929d4bf-e038f4c128983e6e945b14ad" + }, + { + "key": "X-Request-ID", + "value": "3e5e943f-2647-4a09-b216-7d3551a637e7" + }, + { + "key": "X-Correlation-ID", + "value": "65dc6940-bcb3-466d-b25d-0a10ab98d7e6" + }, + { + "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_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}" + } + ] + } + ], + "description": "## Allowed auth methods\n\n- CIS2 token - Auth with test user `656005750108`\n \n- NHS Login token - Auth with test user `9730675929`\n \n\nSee collection level documentation for info about how to get authorization tokens." + }, + { + "name": "Get verified candidate relationships (GET /RelatedPerson)", + "item": [ + { + "name": "Valid request - Get verified candidate relationships", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "" + ], + "type": "text/javascript", + "packages": {}, + "requests": {} + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/RelatedPerson?identifier=9736898121", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "RelatedPerson" + ], + "query": [ + { + "key": "identifier", + "value": "9736898121", + "description": "NHS number of the user to retrieve verified relationships for" + } + ] + }, + "description": "## Example scenario\n\n**Given** an NHS user has multiple related person relationships in PDS \n**When** a GET /RelatedPerson request is sent for the user \n**Then** the relationships are returned" + }, + "response": [ + { + "name": "Candidate relationship returned", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/RelatedPerson?identifier=9736898148", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "RelatedPerson" + ], + "query": [ + { + "key": "identifier", + "value": "9736898148", + "description": "NHS number of the user to retrieve verified relationships for" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Fri, 28 Nov 2025 17:10:29 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "927" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "3c77c3f5-2f94-4718-b4df-a994b49a9c8d" + }, + { + "key": "x-amz-apigw-id", + "value": "Uw6coGWKLPEFyvQ=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-6929d783-8368a433a0eae3395c7136cb" + }, + { + "key": "X-Request-ID", + "value": "e464b1c8-ad9b-41a2-9de3-2dd0e34d0fce" + }, + { + "key": "X-Correlation-ID", + "value": "056c8f1f-9d95-44b2-a4f7-582554f53387" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/IyKYB\",\n \"resource\": {\n \"id\": \"IyKYB\",\n \"birthDate\": \"2015-09-26\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n ],\n \"name\": [\n {\n \"family\": \"SHEPP\",\n \"given\": [\n \"Ashley\",\n \"Ellen\"\n ],\n \"period\": {\n \"start\": \"2025-08-06\"\n },\n \"prefix\": [\n \"MS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"MTH\",\n \"display\": \"mother\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n }\n ],\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson?identifier=9736898148\"\n }\n ],\n \"timestamp\": \"2025-11-28T17:10:29.231159+00:00\",\n \"total\": 1,\n \"type\": \"searchset\",\n \"resourceType\": \"Bundle\"\n}" + }, + { + "name": "Candidate relationship returned with patient details", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/RelatedPerson?identifier=9736898148&_include=RelatedPerson:patient", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "RelatedPerson" + ], + "query": [ + { + "key": "identifier", + "value": "9736898148", + "description": "NHS number of the user to retrieve verified relationships for" + }, + { + "key": "_include", + "value": "RelatedPerson:patient" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Date", + "value": "Fri, 28 Nov 2025 17:13:27 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "1395" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "a34914f5-c757-4a7c-b8e6-2061793de970" + }, + { + "key": "x-amz-apigw-id", + "value": "Uw63LFuCLPEFtfA=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-6929d82d-7210a91047b09608692e6ff6" + }, + { + "key": "X-Request-ID", + "value": "c46487fa-a7a9-4adb-82ec-dc7702fa66d4" + }, + { + "key": "X-Correlation-ID", + "value": "755116de-f4ef-406b-8088-1af14dd85c8d" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898644\",\n \"resource\": {\n \"id\": \"9736898644\",\n \"birthDate\": \"2015-09-26\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n ],\n \"name\": [\n {\n \"family\": \"SHEPP\",\n \"given\": [\n \"Ashley\",\n \"Ellen\"\n ],\n \"period\": {\n \"start\": \"2025-08-06\"\n },\n \"prefix\": [\n \"MS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/IyKYB\",\n \"resource\": {\n \"id\": \"IyKYB\",\n \"birthDate\": \"2015-09-26\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n ],\n \"name\": [\n {\n \"family\": \"SHEPP\",\n \"given\": [\n \"Ashley\",\n \"Ellen\"\n ],\n \"period\": {\n \"start\": \"2025-08-06\"\n },\n \"prefix\": [\n \"MS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"MTH\",\n \"display\": \"mother\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n }\n ],\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson?identifier=9736898148&_include=RelatedPerson%3Apatient\"\n }\n ],\n \"timestamp\": \"2025-11-28T17:13:27.630813+00:00\",\n \"total\": 1,\n \"type\": \"searchset\",\n \"resourceType\": \"Bundle\"\n}" + } + ] + }, + { + "name": "Valid request - No relationships returned - Get verified candidate relationships", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "" + ], + "type": "text/javascript", + "packages": {}, + "requests": {} + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/RelatedPerson?identifier=9736898199", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "RelatedPerson" + ], + "query": [ + { + "key": "identifier", + "value": "9736898199", + "description": "NHS number of the user to retrieve verified relationships for" + } + ] + }, + "description": "## Example scenario\n\n**Given** an NHS user has no related person relationships in PDS \n**When** a GET /RelatedPerson request is sent for the user \n**Then** no relationships are returned" + }, + "response": [ + { + "name": "No relationships returned", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/RelatedPerson?identifier=9736898199", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "RelatedPerson" + ], + "query": [ + { + "key": "identifier", + "value": "9736898199", + "description": "NHS number of the user to retrieve verified relationships for" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Fri, 28 Nov 2025 17:15:06 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "249" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "9305e61b-2b8b-4a0c-84dd-0be9c4e1ce72" + }, + { + "key": "x-amz-apigw-id", + "value": "Uw7IDHSxrPEF7gg=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-6929d899-c345d4868005c5dc5999d598" + }, + { + "key": "X-Request-ID", + "value": "189b9dd8-722e-4e1b-b76b-75d2dd05fd00" + }, + { + "key": "X-Correlation-ID", + "value": "38045e59-8b2a-4f52-a1a5-834c91c25a9f" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson?identifier=9736898199\"\n }\n ],\n \"timestamp\": \"2025-11-28T17:15:05.994606+00:00\",\n \"total\": 0,\n \"type\": \"searchset\",\n \"resourceType\": \"Bundle\"\n}" + } + ] + }, + { + "name": "Valid request - Verify relationship - Get verified candidate relationships", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "" + ], + "type": "text/javascript", + "packages": {}, + "requests": {} + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/RelatedPerson?identifier=9736898148&patient:identifier=9736898644", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "RelatedPerson" + ], + "query": [ + { + "key": "identifier", + "value": "9736898148", + "description": "NHS number of the user to retrieve verified relationships for" + }, + { + "key": "patient:identifier", + "value": "9736898644" + } + ] + }, + "description": "## Example scenario\n\n**Given** a proxy has a related person relationship in PDS \n**When** a GET /RelatedPerson request is sent for the proxy and the patient \n**Then** the relationship is returned" + }, + "response": [ + { + "name": "Verified relationship returned", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/RelatedPerson?identifier=9736898148&patient:identifier=9736898644", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "RelatedPerson" + ], + "query": [ + { + "key": "identifier", + "value": "9736898148", + "description": "NHS number of the user to retrieve verified relationships for" + }, + { + "key": "patient:identifier", + "value": "9736898644" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Fri, 28 Nov 2025 17:19:37 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "959" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "2ac409be-e9ce-4d73-a4b4-3c8a791aa51e" + }, + { + "key": "x-amz-apigw-id", + "value": "Uw7x4HIMrPEF-Fg=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-6929d9a5-d9df4059c3c602feabe873fc" + }, + { + "key": "X-Request-ID", + "value": "88367407-4953-4b64-9da0-6308c007b120" + }, + { + "key": "X-Correlation-ID", + "value": "8b55ca15-93fb-4ce9-be1b-eb0eb5e728fa" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/IyKYB\",\n \"resource\": {\n \"id\": \"IyKYB\",\n \"birthDate\": \"2015-09-26\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n ],\n \"name\": [\n {\n \"family\": \"SHEPP\",\n \"given\": [\n \"Ashley\",\n \"Ellen\"\n ],\n \"period\": {\n \"start\": \"2025-08-06\"\n },\n \"prefix\": [\n \"MS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"MTH\",\n \"display\": \"mother\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n }\n ],\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson?identifier=9736898148&patient%3Aidentifier=9736898644\"\n }\n ],\n \"timestamp\": \"2025-11-28T17:19:37.300736+00:00\",\n \"total\": 1,\n \"type\": \"searchset\",\n \"resourceType\": \"Bundle\"\n}" + }, + { + "name": "Verified relationship returned with patient details", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/RelatedPerson?identifier=9736898148&patient:identifier=9736898644&_include=RelatedPerson:patient", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "RelatedPerson" + ], + "query": [ + { + "key": "identifier", + "value": "9736898148", + "description": "NHS number of the user to retrieve verified relationships for" + }, + { + "key": "patient:identifier", + "value": "9736898644" + }, + { + "key": "_include", + "value": "RelatedPerson:patient" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Fri, 28 Nov 2025 17:19:37 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "959" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "2ac409be-e9ce-4d73-a4b4-3c8a791aa51e" + }, + { + "key": "x-amz-apigw-id", + "value": "Uw7x4HIMrPEF-Fg=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-6929d9a5-d9df4059c3c602feabe873fc" + }, + { + "key": "X-Request-ID", + "value": "88367407-4953-4b64-9da0-6308c007b120" + }, + { + "key": "X-Correlation-ID", + "value": "8b55ca15-93fb-4ce9-be1b-eb0eb5e728fa" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/IyKYB\",\n \"resource\": {\n \"id\": \"IyKYB\",\n \"birthDate\": \"2015-09-26\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n ],\n \"name\": [\n {\n \"family\": \"SHEPP\",\n \"given\": [\n \"Ashley\",\n \"Ellen\"\n ],\n \"period\": {\n \"start\": \"2025-08-06\"\n },\n \"prefix\": [\n \"MS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"MTH\",\n \"display\": \"mother\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n }\n ],\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson?identifier=9736898148&patient%3Aidentifier=9736898644\"\n }\n ],\n \"timestamp\": \"2025-11-28T17:19:37.300736+00:00\",\n \"total\": 1,\n \"type\": \"searchset\",\n \"resourceType\": \"Bundle\"\n}" + } + ] + }, + { + "name": "Missing identifier value - Get verified candidate relationships", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "" + ], + "type": "text/javascript", + "packages": {}, + "requests": {} + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/RelatedPerson", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "RelatedPerson" + ] + }, + "description": "## Example scenario\n\n**Given** a proxy has a related person relationship in PDS \n**When** a GET /RelatedPerson request is sent with no identifier \n**Then** a 400 error is returned with code 'MISSING_IDENTIFIER_VALUE'" + }, + "response": [ + { + "name": "Missing identifier value error returned", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/RelatedPerson", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "RelatedPerson" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Fri, 28 Nov 2025 17:45:09 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "362" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "f524a29e-b0e9-45b0-af70-ad23fd87158c" + }, + { + "key": "x-amz-apigw-id", + "value": "Uw_h7GQFrPEF8xw=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-6929dfa5-ca879ed8f2a8b5c139182a8b" + }, + { + "key": "X-Request-ID", + "value": "28dbd904-517c-4e42-a3f6-37772b2da578" + }, + { + "key": "X-Correlation-ID", + "value": "e1229f7b-b14f-4858-b4fd-dcb3c9151a99" + }, + { + "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_IDENTIFIER_VALUE\",\n \"display\": \"Missing RelatedPerson NHS number.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"The 'identifier' parameter is required\",\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" + } + ] + }, + { + "name": "Invalid identifier value - Get verified candidate relationships", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "" + ], + "type": "text/javascript", + "packages": {}, + "requests": {} + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/RelatedPerson?identifier=invalid", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "RelatedPerson" + ], + "query": [ + { + "key": "identifier", + "value": "invalid" + } + ] + }, + "description": "## Example scenario\n\n**Given** a proxy has a related person relationship in PDS \n**When** a GET /RelatedPerson request is sent with an invalid identifier \n**Then** a 400 error is returned with code 'INVALID_IDENTIFIER_VALUE'" + }, + "response": [ + { + "name": "Invalid identifier value error returned", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/RelatedPerson?identifier=invalid", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "RelatedPerson" + ], + "query": [ + { + "key": "identifier", + "value": "invalid" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Fri, 28 Nov 2025 17:47:15 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "422" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "7a627dc1-8fe7-4a07-9a17-5e8a7c77963b" + }, + { + "key": "x-amz-apigw-id", + "value": "Uw_1hFJWLPEFbKQ=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-6929e022-4dc5c06769a0b866a6456227" + }, + { + "key": "X-Request-ID", + "value": "c695d77b-b94e-4e04-9e2b-f7e34ef2e414" + }, + { + "key": "X-Correlation-ID", + "value": "46db2d38-e52b-4fcc-a8cf-2617fec4557a" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"issue\": [\n {\n \"code\": \"invalid\",\n \"diagnostics\": \"Not a valid NHS Number provided for the 'identifier' parameter\",\n \"expression\": [\n \"RelatedPerson.identifier\"\n ],\n \"details\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\",\n \"code\": \"INVALID_IDENTIFIER_VALUE\",\n \"display\": \"Provided value is invalid\"\n }\n ]\n },\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" + } + ] + }, + { + "name": "Invalid identifier system - Get verified candidate relationships", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "" + ], + "type": "text/javascript", + "packages": {}, + "requests": {} + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/RelatedPerson?identifier=https://fhir.nhs.uk/Id/nhs-number/invalid|730675929", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "RelatedPerson" + ], + "query": [ + { + "key": "identifier", + "value": "https://fhir.nhs.uk/Id/nhs-number/invalid|730675929" + } + ] + }, + "description": "## Example scenario\n\n**Given** a proxy has a related person relationship in PDS \n**When** a GET /RelatedPerson request is sent with an invalid identifier \n**Then** a 400 error is returned with code 'INVALID_IDENTIFIER_VALUE'" + }, + "response": [ + { + "name": "Invalid identifier value error returned", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/RelatedPerson?identifier=https://fhir.nhs.uk/Id/nhs-number/invalid|730675929", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "RelatedPerson" + ], + "query": [ + { + "key": "identifier", + "value": "https://fhir.nhs.uk/Id/nhs-number/invalid|730675929" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Fri, 28 Nov 2025 17:48:42 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "352" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "66e70023-f78b-48aa-a29f-3df08e3e895c" + }, + { + "key": "x-amz-apigw-id", + "value": "UxADKEqiLPEFbWw=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-6929e07a-ade89162a2d0b573830554ca" + }, + { + "key": "X-Request-ID", + "value": "a6c275c6-3964-4d18-8860-fcf25e510f14" + }, + { + "key": "X-Correlation-ID", + "value": "1d7ecfb8-29fb-461a-9904-e28216b510f8" + }, + { + "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_IDENTIFIER_SYSTEM\",\n \"display\": \"Invalid identifier system\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"The identifier system is not valid.\",\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" + } + ] + } + ], + "description": "## Allowed auth methods\n\n- NHS Login token - Auth with test user `9730675929`\n \n- CIS2 token - Auth with test user `656005750108`\n \n\nSee collection level documentation for info about how to get authorization tokens.", + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{cis2_token}}", + "type": "string" + } + ] + }, + "event": [ + { + "listen": "prerequest", + "script": { + "type": "text/javascript", + "packages": {}, + "requests": {}, + "exec": [ + "" + ] + } + }, + { + "listen": "test", + "script": { + "type": "text/javascript", + "packages": {}, + "requests": {}, + "exec": [ + "" + ] + } + } + ] + } + ], + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{authorization_header_value}}", + "type": "string" + } + ] + }, + "event": [ + { + "listen": "prerequest", + "script": { + "type": "text/javascript", + "packages": {}, + "requests": {}, + "exec": [ + "" + ] + } + }, + { + "listen": "test", + "script": { + "type": "text/javascript", + "packages": {}, + "requests": {}, + "exec": [ + "" + ] + } + } + ], + "variable": [ + { + "key": "nps_enabled", + "value": "", + "description": "Boolean to determine whether the National Proxy Store should be used when fulfilling the request" + }, + { + "key": "nam_cache_enabled", + "value": "", + "description": "Boolean to determine if cached data from NAM should be used when fulfilling the request" + }, + { + "key": "nam_enabled", + "value": "", + "description": "Boolean to determine whether NAM should be called when fulfilling the request" + }, + { + "key": "use_nam_mock", + "value": "", + "description": "Boolean to determine whether the NAM mock should be used when fulfilling the request" + } + ] } \ No newline at end of file diff --git a/postman/validated_relationship_service.sandbox.postman_collection.json b/postman/validated_relationship_service.sandbox.postman_collection.json index 85fa9f33..a0224c2e 100644 --- a/postman/validated_relationship_service.sandbox.postman_collection.json +++ b/postman/validated_relationship_service.sandbox.postman_collection.json @@ -1,4 +1,5 @@ { +<<<<<<< HEAD "info": { "_postman_id": "76b8235d-7f30-43d3-a767-38e1c39061cf", "name": "Validated Relationship Service Sandbox 21/01/26", @@ -11162,4 +11163,11253 @@ "value": "https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4" } ] +======= + "info": { + "_postman_id": "c1ed4947-1510-40ca-999f-083313d60603", + "name": "Validated Relationship Service Sandbox 21/01/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": "50770159" + }, + "item": [ + { + "name": "Get a proxy access request (Questionnaire Response)", + "item": [ + { + "name": "Adult to adult with capacity", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"resourceType\": \"QuestionnaireResponse\",", + " \"status\": \"completed\",", + " \"authored\": \"2024-07-15T09:43:03.280Z\",", + " \"id\": \"156e1560-e532-4e2a-85ad-5aeff03dc43e\",", + " \"identifier\": {", + " \"value\": \"19318ZGLAB\"", + " },", + " \"source\": {", + " \"type\": \"RelatedPerson\",", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000005\"", + " }", + " },", + " \"subject\": {", + " \"type\": \"Patient\",", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000006\"", + " }", + " },", + " \"questionnaire\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Questionnaire/01dc6813-3421-4d14-948d-a4888241add1\",", + " \"item\": [", + " {", + " \"linkId\": \"relatedPerson\",", + " \"text\": \"Proxy details\",", + " \"item\": [", + " {", + " \"linkId\": \"relatedPerson_identifier\",", + " \"text\": \"NHS number\",", + " \"answer\": [", + " {", + " \"valueString\": \"9000000005\"", + " }", + " ]", + " },", + " {", + " \"linkId\": \"relatedPerson_name\",", + " \"text\": \"Name\",", + " \"item\": [", + " {", + " \"linkId\": \"relatedPerson_name_first\",", + " \"text\": \"First name\",", + " \"answer\": [", + " {", + " \"valueString\": \"Jack\"", + " }", + " ]", + " },", + " {", + " \"linkId\": \"relatedPerson_name_family\",", + " \"text\": \"Last name\",", + " \"answer\": [", + " {", + " \"valueString\": \"Jones\"", + " }", + " ]", + " }", + " ]", + " },", + " {", + " \"linkId\": \"relatedPerson_birthDate\",", + " \"text\": \"Date of birth\",", + " \"answer\": [", + " {", + " \"valueDate\": \"1970-02-15\"", + " }", + " ]", + " },", + " {", + " \"linkId\": \"relatedPerson_basisForAccess\",", + " \"text\": \"Basis for Access\",", + " \"answer\": [", + " {", + " \"valueCoding\": {", + " \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\",", + " \"code\": \"PRN\",", + " \"display\": \"Parent\"", + " }", + " }", + " ]", + " },", + " {", + " \"linkId\": \"relatedPerson_relationship\",", + " \"text\": \"Relationship\",", + " \"answer\": [", + " {", + " \"valueCoding\": {", + " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", + " \"code\": \"PRN\",", + " \"display\": \"Parent\"", + " }", + " }", + " ]", + " }", + " ]", + " },", + " {", + " \"linkId\": \"patient\",", + " \"text\": \"Patient details\",", + " \"item\": [", + " {", + " \"linkId\": \"patient_identifier\",", + " \"text\": \"NHS number\",", + " \"answer\": [", + " {", + " \"valueString\": \"9000000006\"", + " }", + " ]", + " },", + " {", + " \"linkId\": \"patient_name\",", + " \"text\": \"Name\",", + " \"item\": [", + " {", + " \"linkId\": \"patient_name_first\",", + " \"text\": \"First name\",", + " \"answer\": [", + " {", + " \"valueString\": \"Jill\"", + " }", + " ]", + " },", + " {", + " \"linkId\": \"patient_name_family\",", + " \"text\": \"Last name\",", + " \"answer\": [", + " {", + " \"valueString\": \"Jones\"", + " }", + " ]", + " }", + " ]", + " },", + " {", + " \"linkId\": \"patient_birthDate\",", + " \"text\": \"Date of birth\",", + " \"answer\": [", + " {", + " \"valueDate\": \"1965-01-01\"", + " }", + " ]", + " }", + " ]", + " },", + " {", + " \"linkId\": \"requestedAccess\",", + " \"text\": \"Requested access\",", + " \"item\": [", + " {", + " \"linkId\": \"requestedAccess_accessLevel\",", + " \"text\": \"Requested access level\",", + " \"answer\": [", + " {", + " \"valueCoding\": {", + " \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",", + " \"code\": \"APPT\",", + " \"display\": \"Appointment Booking\"", + " }", + " },", + " {", + " \"valueCoding\": {", + " \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",", + " \"code\": \"VACC\",", + " \"display\": \"Vaccination Records\"", + " }", + " }", + " ]", + " },", + " {", + " \"linkId\": \"requestedAccess_reasonsForAccess\",", + " \"text\": \"Reason for access\",", + " \"answer\": [", + " {", + " \"valueCoding\": {", + " \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-ReasonForAccess\",", + " \"code\": \"PRAC\",", + " \"display\": \"Practical Reasons\"", + " }", + " }", + " ]", + " }", + " ]", + " }", + " ]", + "};", + "", + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " const responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "d967f4c9-8e83-4930-97ab-ae4e122d8ca5", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "8717c840-c222-4f84-a880-45bc129f8382", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/QuestionnaireResponse/156e1560-e532-4e2a-85ad-5aeff03dc43e", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "QuestionnaireResponse", + "156e1560-e532-4e2a-85ad-5aeff03dc43e" + ] + }, + "description": "Example of Questionnaire Response that will be returned" + }, + "response": [] + }, + { + "name": "Missing Access Request UUID", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"issue\": [", + " {", + " \"code\": \"not-supported\",", + " \"details\": {", + " \"coding\": [", + " {", + " \"code\": \"METHOD_NOT_ALLOWED\",", + " \"display\": \"The method is not allowed.\",", + " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", + " \"version\": \"1\"", + " }", + " ]", + " },", + " \"diagnostics\": \"The method is not allowed for the requested resource.\",", + " \"severity\": \"error\"", + " }", + " ],", + " \"resourceType\": \"OperationOutcome\"", + "};", + "", + "pm.test(\"Status code is 405\", function () {", + " pm.response.to.have.status(405);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " const responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "d967f4c9-8e83-4930-97ab-ae4e122d8ca5", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "8717c840-c222-4f84-a880-45bc129f8382", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/QuestionnaireResponse/", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "QuestionnaireResponse", + "" + ] + }, + "description": "Example of an error response when reference code is missing from request" + }, + "response": [] + }, + { + "name": "Invalid Access Request UUID", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"resourceType\": \"OperationOutcome\",", + " \"issue\": [", + " {", + " \"severity\": \"error\",", + " \"code\": \"invalid\",", + " \"details\": {", + " \"coding\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/STU3/CodeSystem/Spine-ErrorOrWarningCode-1\",", + " \"code\": \"INVALID_IDENTIFIER_VALUE\",", + " \"display\": \"Invalid identifier value\",", + " }", + " ]", + " },", + " \"diagnostics\": \"The specified access request ID is invalid. Access request IDs must be a valid UUID.\",", + " }", + " ],", + " };", + "", + "pm.test(\"Status code is 400\", function () {", + " pm.response.to.have.status(400);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " const responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "d967f4c9-8e83-4930-97ab-ae4e122d8ca5", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "8717c840-c222-4f84-a880-45bc129f8382", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/QuestionnaireResponse/INVALID", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "QuestionnaireResponse", + "INVALID" + ] + }, + "description": "Example of an error response when reference code is invalid" + }, + "response": [] + }, + { + "name": "Access Request UUID Not Found", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"resourceType\": \"OperationOutcome\",", + " \"issue\": [", + " {", + " \"severity\": \"error\",", + " \"code\": \"not-found\",", + " \"details\": {", + " \"coding\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/STU3/CodeSystem/Spine-ErrorOrWarningCode-1\",", + " \"code\": \"QUESTIONNAIRE_RESPONSE_NOT_FOUND\",", + " \"display\": \"Questionnaire response not found\"", + " }", + " ]", + " },", + " \"diagnostics\": \"The Questionnaire response could not be found using the provided access request ID.\"", + " }", + " ]", + "};", + "", + "pm.test(\"Status code is 404\", function () {", + " pm.response.to.have.status(404);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " const responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "d967f4c9-8e83-4930-97ab-ae4e122d8ca5", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "8717c840-c222-4f84-a880-45bc129f8382", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/QuestionnaireResponse/60d09b82-f4bb-41f9-b41e-767999b4ac9b", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "QuestionnaireResponse", + "60d09b82-f4bb-41f9-b41e-767999b4ac9b" + ] + }, + "description": "Example of an error response when reference code is not found in database" + }, + "response": [] + } + ], + "description": "The GET Questionnaire Response endpoint is used to retrieve a Questionnaire Response using its unique reference code. This endpoint returns the full Questionnaire Response document that was previously submitted.\n\nThis folder contains requests covering different scenarios of valid and invalid requests.\n\nFor more details, please refer to the [GET Questionnaire Response OAS page for the Validated Relationship Service on the NHS England website.](https://digital.nhs.uk/developer/api-catalogue/validated-relationship-service#get-/QuestionnaireResponse)" + }, + { + "name": "New access request (Questionnaire Response)", + "item": [ + { + "name": "Adult to child access request", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"resourceType\": \"OperationOutcome\",", + " \"issue\": [", + " {", + " \"severity\": \"information\",", + " \"code\": \"informational\",", + " \"details\": {", + " \"coding\": [", + " {", + " \"code\": \"19318ZGLAB\",", + " \"display\": \"19318ZGLAB\"", + " }", + " ]", + " }", + " }", + " ]", + "};", + "", + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Response has the correct body\", () => {", + " const responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});", + "", + "pm.test(\"Location header is returned\", () => {", + " pm.response.to.have.header(\"Location\", \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/QuestionnaireResponse?ID=156e1560-e532-4e2a-85ad-5aeff03dc43e\")", + "})" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/fhir+json", + "type": "text" + }, + { + "key": "X-Request-ID", + "value": "d967f4c9-8e83-4930-97ab-ae4e122d8ca5", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "8717c840-c222-4f84-a880-45bc129f8382", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"resourceType\": \"QuestionnaireResponse\",\n \"status\": \"completed\",\n \"authored\": \"2024-07-15T09:43:03.280Z\",\n \"source\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000009\"\n }\n },\n \"subject\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000017\"\n }\n },\n \"questionnaire\": \"Questionnaire/01dc6813-3421-4d14-948d-a4888241add1\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson\",\n \"text\": \"relatedPerson\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_identifier\",\n \"text\": \"NHS Number\",\n \"answer\": [\n {\n \"valueString\": \"9000000009\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name\",\n \"text\": \"relatedPerson_name\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_name_first\",\n \"text\": \"First name.\",\n \"answer\": [\n {\n \"valueString\": \"Sharon\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name_family\",\n \"text\": \"Family name (often called Surname).\",\n \"answer\": [\n {\n \"valueString\": \"Smith\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_birthDate\",\n \"text\": \"Date of Birth\",\n \"answer\": [\n {\n \"valueDate\": \"1994-03-21\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_basisForAccess\",\n \"text\": \"Basis For Access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_relationship\",\n \"text\": \"Relationship\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails\",\n \"text\": \"parentalApplicationSupplementaryDetails\",\n \"item\": [\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_evidenceOfResponsibility\",\n \"text\": \"Evidence of parental responsibility\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-EvidenceOfResponsibility\",\n \"code\": \"BRTH\",\n \"display\": \"Birth certificate\"\n }\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_evidenceOfResponsibilityMoreinfo\",\n \"text\": \"Evidence of responsibility - Further Information\",\n \"answer\": [\n {\n \"valueString\": \"Birth Certificate is original\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_isCurrentAddressConfirmed\",\n \"text\": \"Is current address confirmed?\",\n \"answer\": [\n {\n \"valueString\": \"Yes\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_newAddress\",\n \"text\": \"parentalApplicationSupplementaryDetails_newAddress\",\n \"item\": [\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_line1\",\n \"text\": \"Address Line 1\",\n \"answer\": [\n {\n \"valueString\": \"24 Hoves Edge\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_line2\",\n \"text\": \"Address Line 2\",\n \"answer\": [\n {\n \"valueString\": \"Remington\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_line3\",\n \"text\": \"Address Line 3\",\n \"answer\": [\n {\n \"valueString\": \"Boroughbridge\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_city\",\n \"text\": \"Town / City\",\n \"answer\": [\n {\n \"valueString\": \"Leeds\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_district\",\n \"text\": \"County\",\n \"answer\": [\n {\n \"valueString\": \"West Yorkshire\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_postalCode\",\n \"text\": \"Postcode\",\n \"answer\": [\n {\n \"valueString\": \"LS1 1DW\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_liveAtSameAddress\",\n \"text\": \"Do the adult and child live at the same address?\",\n \"answer\": [\n {\n \"valueString\": \"Yes\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_canChildConsent\",\n \"text\": \"Can the child consent?\",\n \"answer\": [\n {\n \"valueString\": \"No\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_reasonNoChildConsent\",\n \"text\": \"Reason the child cannot consent\",\n \"answer\": [\n {\n \"valueString\": \"Child is too young\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient\",\n \"text\": \"patient\",\n \"item\": [\n {\n \"linkId\": \"patient_identifier\",\n \"text\": \"NHS Number\",\n \"answer\": [\n {\n \"valueString\": \"9000000017\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name\",\n \"text\": \"patient_name\",\n \"item\": [\n {\n \"linkId\": \"patient_name_first\",\n \"text\": \"First name.\",\n \"answer\": [\n {\n \"valueString\": \"Jane\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name_family\",\n \"text\": \"Family name (often called Surname).\",\n \"answer\": [\n {\n \"valueString\": \"Smith\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient_birthDate\",\n \"text\": \"Date of Birth\",\n \"answer\": [\n {\n \"valueDate\": \"2020-10-22\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess\",\n \"text\": \"requestedAccess\",\n \"item\": [\n {\n \"linkId\": \"requestedAccess_accessLevel\",\n \"text\": \"Requested access level\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"APPT\",\n \"display\": \"Appointment Booking\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccess\",\n \"text\": \"Reason for access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-ReasonForAccess\",\n \"code\": \"COMB\",\n \"display\": \"Communication Barriers\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccessMoreinfo\",\n \"text\": \"Reason for access - further information\",\n \"answer\": [\n {\n \"valueString\": \"No internet connection\"\n }\n ]\n }\n ]\n }\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{api_base_url}}/QuestionnaireResponse", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "QuestionnaireResponse" + ] + }, + "description": "Example of an adult to child access request with the reference code returned" + }, + "response": [] + }, + { + "name": "Adult to adult with ability to consent access request", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"resourceType\": \"OperationOutcome\",", + " \"issue\": [", + " {", + " \"severity\": \"information\",", + " \"code\": \"informational\",", + " \"details\": {", + " \"coding\": [", + " {", + " \"code\": \"19318ZGLAB\",", + " \"display\": \"19318ZGLAB\"", + " }", + " ]", + " }", + " }", + " ]", + "};", + "", + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Response has the correct body\", () => {", + " const responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});", + "", + "pm.test(\"Location header is returned\", () => {", + " pm.response.to.have.header(\"Location\", \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/QuestionnaireResponse?ID=156e1560-e532-4e2a-85ad-5aeff03dc43e\")", + "})" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "X-Request-ID", + "value": "d967f4c9-8e83-4930-97ab-ae4e122d8ca5", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "8717c840-c222-4f84-a880-45bc129f8382", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"resourceType\": \"QuestionnaireResponse\",\n \"status\": \"completed\",\n \"authored\": \"2024-07-15T09:43:03.280Z\",\n \"source\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000009\"\n }\n },\n \"subject\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000017\"\n }\n },\n \"questionnaire\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Questionnaire/01dc6813-3421-4d14-948d-a4888241add1\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson\",\n \"text\": \"Proxy details\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_identifier\",\n \"text\": \"NHS number\",\n \"answer\": [\n {\n \"valueString\": \"9000000005\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_basisForAccess\",\n \"text\": \"Basis for Access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\",\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\"\n }\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_relationship\",\n \"text\": \"Relationship\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"SPS\",\n \"display\": \"Spouse\"\n }\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient\",\n \"text\": \"Patient details\",\n \"item\": [\n {\n \"linkId\": \"patient_identifier\",\n \"text\": \"NHS number\",\n \"answer\": [\n {\n \"valueString\": \"9000000017\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name\",\n \"text\": \"Name\",\n \"item\": [\n {\n \"linkId\": \"patient_name_first\",\n \"text\": \"First name\",\n \"answer\": [\n {\n \"valueString\": \"Jill\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name_family\",\n \"text\": \"Last name\",\n \"answer\": [\n {\n \"valueString\": \"Jones\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient_birthDate\",\n \"text\": \"Date of birth\",\n \"answer\": [\n {\n \"valueDate\": \"1965-01-01\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess\",\n \"text\": \"Requested access\",\n \"item\": [\n {\n \"linkId\": \"requestedAccess_accessLevel\",\n \"text\": \"Requested access level\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"APPT\",\n \"display\": \"Appointment Booking\"\n }\n },\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"VACC\",\n \"display\": \"Vaccination Records\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccess\",\n \"text\": \"Reason for access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-ReasonForAccess\",\n \"code\": \"PRAC\",\n \"display\": \"Practical Reasons\"\n }\n }\n ]\n }\n ]\n }\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{api_base_url}}/QuestionnaireResponse", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "QuestionnaireResponse" + ] + }, + "description": "Example of an adult to adult access request where the patient can consent with the reference code returned" + }, + "response": [] + }, + { + "name": "Duplicate relationship", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"issue\": [", + " {", + " \"code\": \"invalid\",", + " \"diagnostics\": \"Proxy role already exists.\",", + " \"details\": {", + " \"coding\": [", + " {", + " \"code\": \"DUPLICATE_RELATIONSHIP\",", + " \"display\": \"Request must be for a new proxy role.\",", + " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", + " \"version\": \"1\"", + " }", + " ]", + " },", + " \"severity\": \"error\"", + " }", + " ],", + " \"resourceType\": \"OperationOutcome\"", + "}", + "", + "pm.test(\"Status code is 409\", function () {", + " pm.response.to.have.status(409);", + "});", + "", + "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\": \"QuestionnaireResponse\",\n \"status\": \"completed\",\n \"authored\": \"2024-07-15T09:43:03.280Z\",\n \"source\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000049\"\n }\n },\n \"subject\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000006\"\n }\n },\n \"questionnaire\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Questionnaire/01dc6813-3421-4d14-948d-a4888241add1\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson\",\n \"text\": \"Proxy details\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_identifier\",\n \"text\": \"NHS number\",\n \"answer\": [\n {\n \"valueString\": \"9000000049\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_basisForAccess\",\n \"text\": \"Basis for Access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\",\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\"\n }\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_relationship\",\n \"text\": \"Relationship\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"SPS\",\n \"display\": \"Spouse\"\n }\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient\",\n \"text\": \"Patient details\",\n \"item\": [\n {\n \"linkId\": \"patient_identifier\",\n \"text\": \"NHS number\",\n \"answer\": [\n {\n \"valueString\": \"9000000006\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name\",\n \"text\": \"Name\",\n \"item\": [\n {\n \"linkId\": \"patient_name_first\",\n \"text\": \"First name\",\n \"answer\": [\n {\n \"valueString\": \"Jill\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name_family\",\n \"text\": \"Last name\",\n \"answer\": [\n {\n \"valueString\": \"Jones\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient_birthDate\",\n \"text\": \"Date of birth\",\n \"answer\": [\n {\n \"valueDate\": \"1965-01-01\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess\",\n \"text\": \"Requested access\",\n \"item\": [\n {\n \"linkId\": \"requestedAccess_accessLevel\",\n \"text\": \"Requested access level\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"APPT\",\n \"display\": \"Appointment Booking\"\n }\n },\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"VACC\",\n \"display\": \"Vaccination Records\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccess\",\n \"text\": \"Reason for access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-ReasonForAccess\",\n \"code\": \"PRAC\",\n \"display\": \"Practical Reasons\"\n }\n }\n ]\n }\n ]\n }\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{api_base_url}}/QuestionnaireResponse", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "QuestionnaireResponse" + ] + } + }, + "response": [] + }, + { + "name": "Adult to adult without ability to consent access request", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"resourceType\": \"OperationOutcome\",", + " \"issue\": [", + " {", + " \"severity\": \"information\",", + " \"code\": \"informational\",", + " \"details\": {", + " \"coding\": [", + " {", + " \"code\": \"19318ZGLAB\",", + " \"display\": \"19318ZGLAB\"", + " }", + " ]", + " }", + " }", + " ]", + "};", + "", + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Response has the correct body\", () => {", + " const responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});", + "", + "pm.test(\"Location header is returned\", () => {", + " pm.response.to.have.header(\"Location\", \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/QuestionnaireResponse?ID=156e1560-e532-4e2a-85ad-5aeff03dc43e\")", + "})" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "X-Request-ID", + "value": "d967f4c9-8e83-4930-97ab-ae4e122d8ca5", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "8717c840-c222-4f84-a880-45bc129f8382", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"resourceType\": \"QuestionnaireResponse\",\n \"status\": \"completed\",\n \"authored\": \"2024-07-15T09:43:03.280Z\",\n \"source\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000017\"\n }\n },\n \"subject\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000009\"\n }\n },\n \"questionnaire\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Questionnaire/01dc6813-3421-4d14-948d-a4888241add1\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson\",\n \"text\": \"Proxy details\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_identifier\",\n \"text\": \"NHS number\",\n \"answer\": [\n {\n \"valueString\": \"9000000017\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_basisForAccess\",\n \"text\": \"Basis for Access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/STU3/CodeSystem/RARecord-ProxyRole-1\",\n \"code\": \"002\",\n \"display\": \"Best interest decision made on behalf of the patient (Mental Capacity Act 2005)\"\n }\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_relationship\",\n \"text\": \"Relationship\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"CHILD\",\n \"display\": \"Child\"\n }\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient\",\n \"text\": \"Patient details\",\n \"item\": [\n {\n \"linkId\": \"patient_identifier\",\n \"text\": \"NHS number\",\n \"answer\": [\n {\n \"valueString\": \"9000000009\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name\",\n \"text\": \"Name\",\n \"item\": [\n {\n \"linkId\": \"patient_name_first\",\n \"text\": \"First name\",\n \"answer\": [\n {\n \"valueString\": \"Florence\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name_family\",\n \"text\": \"Last name\",\n \"answer\": [\n {\n \"valueString\": \"Smith\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient_birthDate\",\n \"text\": \"Date of birth\",\n \"answer\": [\n {\n \"valueDate\": \"1935-01-02\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess\",\n \"text\": \"Requested access\",\n \"item\": [\n {\n \"linkId\": \"requestedAccess_accessLevel\",\n \"text\": \"Requested access level\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"APPT\",\n \"display\": \"Appointment Booking\"\n }\n },\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"VACC\",\n \"display\": \"Vaccination Records\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccess\",\n \"text\": \"Reason for access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-ReasonForAccess\",\n \"code\": \"TECH\",\n \"display\": \"Technical Barriers\"\n }\n }\n ]\n }\n ]\n }\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{api_base_url}}/QuestionnaireResponse", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "QuestionnaireResponse" + ] + }, + "description": "Example of an adult to adult access request where the patient cannot consent with the reference code returned" + }, + "response": [] + }, + { + "name": "Adult nominates adult access request", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"resourceType\": \"OperationOutcome\",", + " \"issue\": [", + " {", + " \"severity\": \"information\",", + " \"code\": \"informational\",", + " \"details\": {", + " \"coding\": [", + " {", + " \"code\": \"19318ZGLAB\",", + " \"display\": \"19318ZGLAB\"", + " }", + " ]", + " }", + " }", + " ]", + "};", + "", + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Response has the correct body\", () => {", + " const responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});", + "", + "pm.test(\"Location header is returned\", () => {", + " pm.response.to.have.header(\"Location\", \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/QuestionnaireResponse?ID=156e1560-e532-4e2a-85ad-5aeff03dc43e\")", + "})" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "X-Request-ID", + "value": "d967f4c9-8e83-4930-97ab-ae4e122d8ca5", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "8717c840-c222-4f84-a880-45bc129f8382", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"resourceType\": \"QuestionnaireResponse\",\n \"status\": \"completed\",\n \"authored\": \"2024-07-15T09:43:03.280Z\",\n \"source\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000009\"\n }\n },\n \"subject\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000009\"\n }\n },\n \"questionnaire\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Questionnaire/01dc6813-3421-4d14-948d-a4888241add1\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson\",\n \"text\": \"Proxy details\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_identifier\",\n \"text\": \"NHS number\",\n \"answer\": [\n {\n \"valueString\": \"9000000017\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name\",\n \"text\": \"Name\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_name_first\",\n \"text\": \"First name\",\n \"answer\": [\n {\n \"valueString\": \"Tom\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name_family\",\n \"text\": \"Last name\",\n \"answer\": [\n {\n \"valueString\": \"Jones\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_birthDate\",\n \"text\": \"Date of birth\",\n \"answer\": [\n {\n \"valueDate\": \"1970-07-12\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_basisForAccess\",\n \"text\": \"Basis for Access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\",\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\"\n }\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_relationship\",\n \"text\": \"Relationship\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"SPS\",\n \"display\": \"Spouse\"\n }\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient\",\n \"text\": \"Patient details\",\n \"item\": [\n {\n \"linkId\": \"patient_identifier\",\n \"text\": \"NHS number\",\n \"answer\": [\n {\n \"valueString\": \"9000000009\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess\",\n \"text\": \"Requested access\",\n \"item\": [\n {\n \"linkId\": \"requestedAccess_accessLevel\",\n \"text\": \"Requested access level\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"APPT\",\n \"display\": \"Appointment Booking\"\n }\n },\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"VACC\",\n \"display\": \"Vaccination Records\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccess\",\n \"text\": \"Reason for access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-ReasonForAccess\",\n \"code\": \"PRAC\",\n \"display\": \"Practical Reasons\"\n }\n }\n ]\n }\n ]\n }\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{api_base_url}}/QuestionnaireResponse", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "QuestionnaireResponse" + ] + }, + "description": "Example of an adult to adult access request where the patient is the applicant with the reference code returned" + }, + "response": [] + } + ], + "description": "The POST Questionnaire Response endpoint is used to submit a proxy access request for a given performer and patient.\n\nIt is indended to be used by user facing service e.g. Proxy Access Service, who will collect the necessary information from the user and submit it to VRS as a QuestionnaireResponse.\n\nThis folder contains requests covering different scenarios of valid and invalid requests.\n\nFor more details, please refer to the [POST Questionnaire Response OAS page for the Validated Relationship Service on the NHS England website.](https://digital.nhs.uk/developer/api-catalogue/validated-relationship-service#post-/QuestionnaireResponse)", + "event": [ + { + "listen": "prerequest", + "script": { + "type": "text/javascript", + "exec": [ + "" + ] + } + }, + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "" + ] + } + } + ] + }, + { + "name": "Get verified candidate relationship (Related Person)", + "item": [ + { + "name": "List relationship", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"entry\": [", + " {", + " \"fullUrl\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/BE974742\",", + " \"resource\": {", + " \"id\": \"BE974742\",", + " \"birthDate\": \"2017-09-23\",", + " \"identifier\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000017\"", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000009\"", + " }", + " },", + " \"name\": [", + " {", + " \"family\": \"MOGAJI\",", + " \"given\": [", + " \"GADIL\"", + " ],", + " \"period\": {", + " \"start\": \"2021-07-08\"", + " },", + " \"prefix\": [", + " \"MR\"", + " ],", + " \"use\": \"usual\"", + " }", + " ],", + " \"relationship\": [", + " {", + " \"coding\": [", + " {", + " \"code\": \"MTH\",", + " \"display\": \"mother\",", + " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\"", + " }", + " ]", + " }", + " ],", + " \"resourceType\": \"RelatedPerson\"", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/A3CC67E2\",", + " \"resource\": {", + " \"id\": \"A3CC67E2\",", + " \"birthDate\": \"2018-04-27\",", + " \"identifier\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000017\"", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000025\"", + " }", + " },", + " \"name\": [", + " {", + " \"family\": \"FEARON\",", + " \"given\": [", + " \"Daren\"", + " ],", + " \"period\": {", + " \"start\": \"2018-09-21\"", + " },", + " \"prefix\": [", + " \"MR\"", + " ],", + " \"use\": \"usual\"", + " }", + " ],", + " \"relationship\": [", + " {", + " \"coding\": [", + " {", + " \"code\": \"MTH\",", + " \"display\": \"mother\",", + " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\"", + " }", + " ]", + " }", + " ],", + " \"resourceType\": \"RelatedPerson\"", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " }", + " ],", + " \"link\": [", + " {", + " \"relation\": \"self\",", + " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson?identifier=9000000017\"", + " }", + " ],", + " \"resourceType\": \"Bundle\",", + " \"timestamp\": \"2024-01-01T00:00:00+00:00\",", + " \"total\": 2,", + " \"type\": \"searchset\"", + "};", + "", + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " const responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "d967f4c9-8e83-4930-97ab-ae4e122d8ca5", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "8717c840-c222-4f84-a880-45bc129f8382", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/RelatedPerson?identifier=9000000017", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "RelatedPerson" + ], + "query": [ + { + "key": "identifier", + "value": "9000000017" + } + ] + }, + "description": "Retrieves a list of validated relationships for a given NHS number." + }, + "response": [] + }, + { + "name": "List relationship and include patient's details", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"entry\": [", + " {", + " \"fullUrl\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9000000009\",", + " \"resource\": {", + " \"birthDate\": \"2017-09-23\",", + " \"id\": \"9000000009\",", + " \"identifier\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000009\"", + " }", + " ],", + " \"name\": [", + " {", + " \"family\": \"MOGAJI\",", + " \"given\": [", + " \"GADIL\"", + " ],", + " \"period\": {", + " \"start\": \"2021-07-08\"", + " },", + " \"prefix\": [", + " \"MR\"", + " ],", + " \"use\": \"usual\"", + " }", + " ],", + " \"resourceType\": \"Patient\"", + " },", + " \"search\": {", + " \"mode\": \"include\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/BE974742\",", + " \"resource\": {", + " \"id\": \"BE974742\",", + " \"birthDate\": \"2017-09-23\",", + " \"identifier\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000017\"", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000009\"", + " }", + " },", + " \"name\": [", + " {", + " \"family\": \"MOGAJI\",", + " \"given\": [", + " \"GADIL\"", + " ],", + " \"period\": {", + " \"start\": \"2021-07-08\"", + " },", + " \"prefix\": [", + " \"MR\"", + " ],", + " \"use\": \"usual\"", + " }", + " ],", + " \"relationship\": [", + " {", + " \"coding\": [", + " {", + " \"code\": \"MTH\",", + " \"display\": \"mother\",", + " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\"", + " }", + " ]", + " }", + " ],", + " \"resourceType\": \"RelatedPerson\"", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9000000025\",", + " \"resource\": {", + " \"birthDate\": \"2018-04-27\",", + " \"id\": \"9000000025\",", + " \"identifier\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000025\"", + " }", + " ],", + " \"name\": [", + " {", + " \"family\": \"FEARON\",", + " \"given\": [", + " \"Daren\"", + " ],", + " \"period\": {", + " \"start\": \"2018-09-21\"", + " },", + " \"prefix\": [", + " \"MR\"", + " ],", + " \"use\": \"usual\"", + " }", + " ],", + " \"resourceType\": \"Patient\"", + " },", + " \"search\": {", + " \"mode\": \"include\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/A3CC67E2\",", + " \"resource\": {", + " \"id\": \"A3CC67E2\",", + " \"birthDate\": \"2018-04-27\",", + " \"identifier\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000017\"", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000025\"", + " }", + " },", + " \"name\": [", + " {", + " \"family\": \"FEARON\",", + " \"given\": [", + " \"Daren\"", + " ],", + " \"period\": {", + " \"start\": \"2018-09-21\"", + " },", + " \"prefix\": [", + " \"MR\"", + " ],", + " \"use\": \"usual\"", + " }", + " ],", + " \"relationship\": [", + " {", + " \"coding\": [", + " {", + " \"code\": \"MTH\",", + " \"display\": \"mother\",", + " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\"", + " }", + " ]", + " }", + " ],", + " \"resourceType\": \"RelatedPerson\"", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " }", + " ],", + " \"link\": [", + " {", + " \"relation\": \"self\",", + " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson?identifier=9000000017&_include=RelatedPerson:patient\"", + " }", + " ],", + " \"resourceType\": \"Bundle\",", + " \"timestamp\": \"2024-01-01T00:00:00+00:00\",", + " \"total\": 2,", + " \"type\": \"searchset\"", + "};", + "", + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " const responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "d967f4c9-8e83-4930-97ab-ae4e122d8ca5", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "8717c840-c222-4f84-a880-45bc129f8382", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/RelatedPerson?identifier=9000000017&_include=RelatedPerson:patient", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "RelatedPerson" + ], + "query": [ + { + "key": "identifier", + "value": "9000000017" + }, + { + "key": "_include", + "value": "RelatedPerson:patient" + } + ] + }, + "description": "Retrieves a list of validated relationships for a given NHS number with additional patient information." + }, + "response": [] + }, + { + "name": "List Relationship and no relationships returned", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"link\": [", + " {", + " \"relation\": \"self\",", + " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships-service-api/FHIR/R4/RelatedPerson?identifier=9000000033\"", + " }", + " ],", + " \"timestamp\": \"2024-01-01T00:00:00+00:00\",", + " \"total\": 0,", + " \"type\": \"searchset\",", + " \"resourceType\": \"Bundle\"", + "};", + "", + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " const responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "d967f4c9-8e83-4930-97ab-ae4e122d8ca5", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "8717c840-c222-4f84-a880-45bc129f8382", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/RelatedPerson?identifier=9000000033", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "RelatedPerson" + ], + "query": [ + { + "key": "identifier", + "value": "9000000033" + } + ] + }, + "description": "Example of a response where the given NHS numbers do not have a relationship." + }, + "response": [] + }, + { + "name": "Verify relationship between proxy and patient", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"resourceType\": \"Bundle\",", + " \"timestamp\": \"2024-01-01T00:00:00+00:00\",", + " \"total\": 1,", + " \"type\": \"searchset\",", + " \"entry\": [", + " {", + " \"fullUrl\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/BE974742\",", + " \"resource\": {", + " \"id\": \"BE974742\",", + " \"birthDate\": \"2017-09-23\",", + " \"identifier\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000009\"", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000017\"", + " }", + " },", + " \"name\": [", + " {", + " \"family\": \"MOGAJI\",", + " \"given\": [", + " \"GADIL\"", + " ],", + " \"period\": {", + " \"start\": \"2021-07-08\"", + " },", + " \"prefix\": [", + " \"MR\"", + " ],", + " \"use\": \"usual\"", + " }", + " ],", + " \"relationship\": [", + " {", + " \"coding\": [", + " {", + " \"code\": \"MTH\",", + " \"display\": \"mother\",", + " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\"", + " }", + " ]", + " }", + " ],", + " \"resourceType\": \"RelatedPerson\"", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " }", + " ],", + " \"link\": [", + " {", + " \"relation\": \"self\",", + " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson?patient:identifier=9000000009&identifier=9000000017\"", + " }", + " ]", + "};", + "", + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " const responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "d967f4c9-8e83-4930-97ab-ae4e122d8ca5", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "8717c840-c222-4f84-a880-45bc129f8382", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/RelatedPerson?identifier=9000000017&patient:identifier=9000000009", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "RelatedPerson" + ], + "query": [ + { + "key": "identifier", + "value": "9000000017" + }, + { + "key": "patient:identifier", + "value": "9000000009" + } + ] + }, + "description": "Retrieves information about the relationship between the given NHS numbers" + }, + "response": [] + }, + { + "name": "Verify relationship between proxy and patient and include patient's details", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"resourceType\": \"Bundle\",", + " \"timestamp\": \"2024-01-01T00:00:00+00:00\",", + " \"total\": 1,", + " \"type\": \"searchset\",", + " \"link\": [", + " {", + " \"relation\": \"self\",", + " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson?patient:identifier=9000000009&identifier=9000000017&_include=RelatedPerson:patient\"", + " }", + " ],", + " \"entry\": [", + " {", + " \"fullUrl\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9000000009\",", + " \"resource\": {", + " \"birthDate\": \"2017-09-23\",", + " \"id\": \"9000000009\",", + " \"identifier\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000009\"", + " }", + " ],", + " \"name\": [", + " {", + " \"family\": \"MOGAJI\",", + " \"given\": [", + " \"GADIL\"", + " ],", + " \"period\": {", + " \"start\": \"2021-07-08\"", + " },", + " \"prefix\": [", + " \"MR\"", + " ],", + " \"use\": \"usual\"", + " }", + " ],", + " \"resourceType\": \"Patient\"", + " },", + " \"search\": {", + " \"mode\": \"include\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/BE974742\",", + " \"resource\": {", + " \"id\": \"BE974742\",", + " \"birthDate\": \"2017-09-23\",", + " \"identifier\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000009\"", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000017\"", + " }", + " },", + " \"name\": [", + " {", + " \"family\": \"MOGAJI\",", + " \"given\": [", + " \"GADIL\"", + " ],", + " \"period\": {", + " \"start\": \"2021-07-08\"", + " },", + " \"prefix\": [", + " \"MR\"", + " ],", + " \"use\": \"usual\"", + " }", + " ],", + " \"relationship\": [", + " {", + " \"coding\": [", + " {", + " \"code\": \"MTH\",", + " \"display\": \"mother\",", + " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\"", + " }", + " ]", + " }", + " ],", + " \"resourceType\": \"RelatedPerson\"", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " }", + " ]", + "};", + "", + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " const responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "d967f4c9-8e83-4930-97ab-ae4e122d8ca5", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "8717c840-c222-4f84-a880-45bc129f8382", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/RelatedPerson?identifier=9000000017&patient:identifier=9000000009&_include=RelatedPerson:patient", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "RelatedPerson" + ], + "query": [ + { + "key": "identifier", + "value": "9000000017" + }, + { + "key": "patient:identifier", + "value": "9000000009" + }, + { + "key": "_include", + "value": "RelatedPerson:patient" + } + ] + }, + "description": "Retrieves information about the relationship between the given NHS numbers including the patient details" + }, + "response": [] + }, + { + "name": "Missing identifier", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"issue\": [", + " {", + " \"code\": \"invalid\",", + " \"details\": {", + " \"coding\": [", + " {", + " \"code\": \"MISSING_IDENTIFIER_VALUE\",", + " \"display\": \"Missing RelatedPerson NHS number.\",", + " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", + " \"version\": \"1\"", + " }", + " ]", + " },", + " \"diagnostics\": \"The 'identifier' parameter is required\",", + " \"severity\": \"error\"", + " }", + " ],", + " \"resourceType\": \"OperationOutcome\"", + "};", + "", + "const responseJson = pm.response.json();", + "", + "pm.test(\"Status code is 400\", function () {", + " pm.response.to.have.status(400);", + "});", + "", + "pm.test(\"Should have correct error response\", () => {", + " pm.expect(responseJson.issue[0].details.coding[0].code).to.eql(\"MISSING_IDENTIFIER_VALUE\");", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " const responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "d967f4c9-8e83-4930-97ab-ae4e122d8ca5", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "8717c840-c222-4f84-a880-45bc129f8382", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/RelatedPerson", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "RelatedPerson" + ] + }, + "description": "Example of an error response when the NHS number is missing" + }, + "response": [] + }, + { + "name": "Invalid identifier", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "var expectedResponseBody = {", + " \"issue\": [", + " {", + " \"code\": \"invalid\",", + " \"details\": {", + " \"coding\": [", + " {", + " \"code\": \"INVALID_IDENTIFIER_VALUE\",", + " \"display\": \"Provided value is invalid\",", + " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", + " \"version\": \"1\"", + " }", + " ]", + " },", + " \"diagnostics\": \"Not a valid NHS Number provided for the 'identifier' parameter\",", + " \"expression\": [", + " \"RelatedPerson.identifier\"", + " ],", + " \"severity\": \"error\"", + " }", + " ],", + " \"resourceType\": \"OperationOutcome\"", + "}", + "", + "const responseJson = pm.response.json();", + "", + "pm.test(\"Status code is 400\", function () {", + " pm.response.to.have.status(400);", + "});", + "", + "pm.test(\"Should have correct error response\", () => {", + " pm.expect(responseJson.issue[0].details.coding[0].code).to.eql(\"INVALID_IDENTIFIER_VALUE\");", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "d967f4c9-8e83-4930-97ab-ae4e122d8ca5", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "8717c840-c222-4f84-a880-45bc129f8382", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/RelatedPerson?identifier=900000000", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "RelatedPerson" + ], + "query": [ + { + "key": "identifier", + "value": "900000000" + } + ] + }, + "description": "Example of an error raised when the specified NHS number is not valid." + }, + "response": [] + }, + { + "name": "Invalid identifier system", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "var expectedResponseBody = {", + " \"issue\": [", + " {", + " \"code\": \"invalid\",", + " \"details\": {", + " \"coding\": [", + " {", + " \"code\": \"INVALID_IDENTIFIER_SYSTEM\",", + " \"display\": \"Invalid identifier system.\",", + " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", + " \"version\": \"1\"", + " }", + " ]", + " },", + " \"diagnostics\": \"The identifier system is not valid.\",", + " \"severity\": \"error\"", + " }", + " ],", + " \"resourceType\": \"OperationOutcome\"", + "}", + "", + "const responseJson = pm.response.json();", + "", + "pm.test(\"Status code is 400\", function () {", + " pm.response.to.have.status(400);", + "});", + "", + "pm.test(\"Should have correct error response\", () => {", + " pm.expect(responseJson.issue[0].details.coding[0].code).to.eql(\"INVALID_IDENTIFIER_SYSTEM\");", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "d967f4c9-8e83-4930-97ab-ae4e122d8ca5", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "8717c840-c222-4f84-a880-45bc129f8382", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/RelatedPerson?identifier=https://fhir.nhs.uk/Id/nhs-number|A730675929", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "RelatedPerson" + ], + "query": [ + { + "key": "identifier", + "value": "https://fhir.nhs.uk/Id/nhs-number|A730675929" + } + ] + }, + "description": "Example of an error response when the given NHS number uses a different identifier system" + }, + "response": [] + }, + { + "name": "Identifier not supported", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"issue\": [", + " {", + " \"code\": \"processing\",", + " \"details\": {", + " \"coding\": [", + " {", + " \"code\": \"INVALIDATED_RESOURCE\",", + " \"display\": \"Resource that has been marked as invalid was requested - invalid resources cannot be retrieved\",", + " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", + " \"version\": \"1\"", + " }", + " ]", + " },", + " \"diagnostics\": \"Resource that has been marked as invalid was requested - invalid resources cannot be retrieved\",", + " \"severity\": \"error\"", + " }", + " ],", + " \"resourceType\": \"OperationOutcome\"", + "};", + "", + "const responseJson = pm.response.json();", + "", + "pm.test(\"Status code is 404\", function () {", + " pm.response.to.have.status(404);", + "});", + "", + "pm.test(\"Should have correct error response\", () => {", + " pm.expect(responseJson.issue[0].details.coding[0].code).to.eql(\"INVALIDATED_RESOURCE\");", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "d967f4c9-8e83-4930-97ab-ae4e122d8ca5", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "8717c840-c222-4f84-a880-45bc129f8382", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/RelatedPerson?identifier=1000000001", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "RelatedPerson" + ], + "query": [ + { + "key": "identifier", + "value": "1000000001" + } + ] + }, + "description": "Example of an error response when the given NHS number is not supported by the sandbox" + }, + "response": [] + }, + { + "name": "No matching record", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"issue\": [", + " {", + " \"code\": \"processing\",", + " \"details\": {", + " \"coding\": [", + " {", + " \"code\": \"INVALIDATED_RESOURCE\",", + " \"display\": \"Resource that has been marked as invalid was requested - invalid resources cannot be retrieved\",", + " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", + " \"version\": \"1\"", + " }", + " ]", + " },", + " \"diagnostics\": \"Resource that has been marked as invalid was requested - invalid resources cannot be retrieved\",", + " \"severity\": \"error\"", + " }", + " ],", + " \"resourceType\": \"OperationOutcome\"", + "};", + "", + "const responseJson = pm.response.json();", + "", + "pm.test(\"Status code is 404\", function () {", + " pm.response.to.have.status(404);", + "});", + "", + "pm.test(\"Should have correct error response\", () => {", + " pm.expect(responseJson.issue[0].details.coding[0].code).to.eql(\"INVALIDATED_RESOURCE\");", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "d967f4c9-8e83-4930-97ab-ae4e122d8ca5", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "8717c840-c222-4f84-a880-45bc129f8382", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/RelatedPerson?identifier=9000000041", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "RelatedPerson" + ], + "query": [ + { + "key": "identifier", + "value": "9000000041" + } + ] + }, + "description": "Example of a response where the given NHS number does not have any validated relationships." + }, + "response": [] + } + ], + "description": "The GET Related Person endpoint retrieves candidate proxy relationships for a user with a given NHS Number.\n\nThis endpoint should NOT be used to retrieve proxy relationships; these should be queried from the `/Consent` endpoint.\n\nThis folder contains requests covering different scenarios of valid and invalid requests.\n\nFor more details, please refer to the [GET Related Person OAS page for the Validated Relationship Service on the NHS England website.](https://digital.nhs.uk/developer/api-catalogue/validated-relationship-service#get-/RelatedPerson)" + }, + { + "name": "Get proxy roles (Consent)", + "item": [ + { + "name": "Filtered proxy relationships by 'active' status include details", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"resourceType\": \"Bundle\",", + " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", + " \"total\": 2,", + " \"type\": \"searchset\",", + " \"link\": [", + " {", + " \"relation\": \"self\",", + " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000017&status=active&_include=Consent:performer&_include=Consent:patient\"", + " }", + " ],", + " \"entry\": [", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/BE974742\",", + " \"resource\": {", + " \"resourceType\": \"RelatedPerson\",", + " \"id\": \"BE974742\",", + " \"identifier\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000017\"", + " },", + " {", + " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", + " \"value\": \"ABC0000003\"", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000017\"", + " }", + " },", + " \"relationship\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", + " \"code\": \"PRN\",", + " \"display\": \"parent\"", + " }", + " ]", + " },", + " {", + " \"coding\": [", + " {", + " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", + " \"code\": \"MTH\",", + " \"display\": \"mother\"", + " }", + " ]", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"include\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/A3CC67E2\",", + " \"resource\": {", + " \"resourceType\": \"Patient\",", + " \"id\": \"A3CC67E2\",", + " \"meta\": {", + " \"security\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\",", + " \"code\": \"P9\",", + " \"display\": \"High level verification (P9)\"", + " }", + " ]", + " },", + " \"identifier\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000009\"", + " },", + " {", + " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", + " \"value\": \"ABC1234567\"", + " }", + " ],", + " \"name\": [", + " {", + " \"use\": \"usual\",", + " \"period\": {", + " \"start\": \"2020-01-01\",", + " \"end\": \"2021-12-31\"", + " },", + " \"given\": [", + " \"Jane Marie Anne\"", + " ],", + " \"family\": \"Smith\",", + " \"prefix\": [", + " \"Mrs\"", + " ],", + " \"suffix\": [", + " \"MBE\",", + " \"PhD\"", + " ]", + " }", + " ],", + " \"birthDate\": \"2022-10-22\",", + " \"generalPractitioner\": [", + " {", + " \"identifier\": {", + " \"value\": \"ODS12345\",", + " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"include\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBCC67E9\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"BBCC67E9\",", + " \"status\": \"active\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ],", + " \"text\": \"Patient Privacy Consent\"", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", + " \"code\": \"INFA\",", + " \"display\": \"Information Access\"", + " }", + " ],", + " \"text\": \"Information Access Consent\"", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000009\"", + " }", + " },", + " \"dateTime\": \"2024-07-21T17:32:28Z\",", + " \"policy\": [", + " {", + " \"authority\": \"https://www.england.nhs.uk\",", + " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", + " }", + " ],", + " \"provision\": {", + " \"actor\": [", + " {", + " \"reference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000017\"", + " }", + " },", + " \"role\": {", + " \"coding\": [", + " {", + " \"code\": \"parental-responsibility\",", + " \"display\": \"Parental responsibility\",", + " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"", + " }", + " ]", + " }", + " }", + " ],", + " \"period\": {", + " \"end\": \"2026-02-11\",", + " \"start\": \"2025-02-11\"", + " }", + " },", + " \"extension\": [", + " {", + " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", + " \"valueCodeableConcept\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",", + " \"code\": \"ROLE_CREATED\",", + " \"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\": \"9000000017\"", + " }", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/RP974720\",", + " \"resource\": {", + " \"resourceType\": \"RelatedPerson\",", + " \"id\": \"RP974720\",", + " \"identifier\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000017\"", + " },", + " {", + " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", + " \"value\": \"ABC0000003\"", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000005\"", + " }", + " },", + " \"relationship\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\",", + " \"code\": \"Personal\",", + " \"display\": \"Personal relationship with the patient\"", + " }", + " ]", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"include\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/DFCC67F5\",", + " \"resource\": {", + " \"resourceType\": \"Patient\",", + " \"id\": \"DFCC67F5\",", + " \"meta\": {", + " \"security\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\",", + " \"code\": \"P9\",", + " \"display\": \"High level verification (P9)\"", + " }", + " ]", + " },", + " \"identifier\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000005\"", + " },", + " {", + " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", + " \"value\": \"ABC9999999\"", + " }", + " ],", + " \"name\": [", + " {", + " \"use\": \"usual\",", + " \"period\": {", + " \"start\": \"2020-01-01\",", + " \"end\": \"2021-12-31\"", + " },", + " \"given\": [", + " \"Sally\"", + " ],", + " \"family\": \"Evans\",", + " \"prefix\": [", + " \"Mrs\"", + " ]", + " }", + " ],", + " \"birthDate\": \"1995-10-22\",", + " \"generalPractitioner\": [", + " {", + " \"identifier\": {", + " \"value\": \"ODS12345\",", + " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"include\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/WWCC67T1\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"WWCC67T1\",", + " \"status\": \"active\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ],", + " \"text\": \"Patient Privacy Consent\"", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", + " \"code\": \"INFA\",", + " \"display\": \"Information Access\"", + " }", + " ],", + " \"text\": \"Information Access Consent\"", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000005\"", + " }", + " },", + " \"dateTime\": \"2024-07-21T17:32:28Z\",", + " \"policy\": [", + " {", + " \"authority\": \"https://www.england.nhs.uk\",", + " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", + " }", + " ],", + " \"provision\": {", + " \"actor\": [", + " {", + " \"reference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000017\"", + " }", + " },", + " \"role\": {", + " \"coding\": [", + " {", + " \"code\": \"parental-responsibility\",", + " \"display\": \"Parental responsibility\",", + " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"", + " }", + " ]", + " }", + " }", + " ],", + " \"period\": {", + " \"end\": \"2026-02-11\",", + " \"start\": \"2025-02-11\"", + " }", + " },", + " \"extension\": [", + " {", + " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", + " \"valueCodeableConcept\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",", + " \"code\": \"ROLE_CREATED\",", + " \"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\": \"9000000017\"", + " }", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " }", + " ]", + "}", + "", + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " const responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + }, + { + "listen": "prerequest", + "script": { + "exec": [ + "" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "protocolProfileBehavior": { + "disableBodyPruning": true + }, + "request": { + "method": "GET", + "header": [], + "body": { + "mode": "raw", + "raw": "", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9000000017&status=active&_include=Consent:performer&_include=Consent:patient", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9000000017" + }, + { + "key": "status", + "value": "active" + }, + { + "key": "_include", + "value": "Consent:performer" + }, + { + "key": "_include", + "value": "Consent:patient" + } + ] + } + }, + "response": [] + }, + { + "name": "Filtered proxy relationships by 'inactive' status", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"resourceType\": \"Bundle\",", + " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", + " \"total\": 2,", + " \"type\": \"searchset\",", + " \"link\": [", + " {", + " \"relation\": \"self\",", + " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000017&status=inactive\"", + " }", + " ],", + " \"entry\": [", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/AATD11A1\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"AATD11A1\",", + " \"status\": \"inactive\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ],", + " \"text\": \"Patient Privacy Consent\"", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", + " \"code\": \"INFA\",", + " \"display\": \"Information Access\"", + " }", + " ],", + " \"text\": \"Information Access Consent\"", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000006\"", + " }", + " },", + " \"dateTime\": \"2024-07-21T17:32:28Z\",", + " \"policy\": [", + " {", + " \"authority\": \"https://www.england.nhs.uk\",", + " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", + " }", + " ],", + " \"provision\": {", + " \"actor\": [", + " {", + " \"reference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000017\"", + " }", + " },", + " \"role\": {", + " \"coding\": [", + " {", + " \"code\": \"parental-responsibility\",", + " \"display\": \"Parental responsibility\",", + " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"", + " }", + " ]", + " }", + " }", + " ],", + " \"period\": {", + " \"end\": \"2026-02-11\",", + " \"start\": \"2025-02-11\"", + " }", + " },", + " \"extension\": [", + " {", + " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", + " \"valueCodeableConcept\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",", + " \"code\": \"ROLE_DEACTIVATED_END_DATE_REACHED\",", + " \"display\": \"End-date reached\"", + " }", + " ]", + " }", + " },", + " {", + " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", + " \"valueReference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000017\"", + " }", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/ABCD12B3\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"ABCD12B3\",", + " \"status\": \"inactive\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ],", + " \"text\": \"Patient Privacy Consent\"", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", + " \"code\": \"INFA\",", + " \"display\": \"Information Access\"", + " }", + " ],", + " \"text\": \"Information Access Consent\"", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000007\"", + " }", + " },", + " \"dateTime\": \"2024-07-21T17:32:28Z\",", + " \"policy\": [", + " {", + " \"authority\": \"https://www.england.nhs.uk\",", + " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", + " }", + " ],", + " \"provision\": {", + " \"actor\": [", + " {", + " \"reference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000017\"", + " }", + " },", + " \"role\": {", + " \"coding\": [", + " {", + " \"code\": \"parental-responsibility\",", + " \"display\": \"Parental responsibility\",", + " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"", + " }", + " ]", + " }", + " }", + " ],", + " \"period\": {", + " \"end\": \"2026-02-11\",", + " \"start\": \"2025-02-11\"", + " }", + " },", + " \"extension\": [", + " {", + " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", + " \"valueCodeableConcept\": {", + " \"coding\": [", + " {", + " \"system\": \"http://terminology.hl7.org/CodeSystem/consent-reason\",", + " \"code\": \"OTHER\",", + " \"display\": \"Other\"", + " }", + " ],", + " \"text\": \"Patient would not respond to phone calls\"", + " }", + " },", + " {", + " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", + " \"valueReference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000017\"", + " }", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " }", + " ]", + "}", + "", + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " const responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + }, + { + "listen": "prerequest", + "script": { + "exec": [ + "" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9000000017&status=inactive", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9000000017" + }, + { + "key": "status", + "value": "inactive" + } + ] + } + }, + "response": [] + }, + { + "name": "Filtered proxy relationships by 'proposed' and 'active' status", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"resourceType\": \"Bundle\",", + " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", + " \"total\": 4,", + " \"type\": \"searchset\",", + " \"link\": [", + " {", + " \"relation\": \"self\",", + " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000017&status=proposed&status=active&_include=Consent:patient\"", + " }", + " ],", + " \"entry\": [", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBCC67E9\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"BBCC67E9\",", + " \"status\": \"active\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ],", + " \"text\": \"Patient Privacy Consent\"", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", + " \"code\": \"INFA\",", + " \"display\": \"Information Access\"", + " }", + " ],", + " \"text\": \"Information Access Consent\"", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000009\"", + " }", + " },", + " \"dateTime\": \"2024-07-21T17:32:28Z\",", + " \"policy\": [", + " {", + " \"authority\": \"https://www.england.nhs.uk\",", + " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", + " }", + " ],", + " \"provision\": {", + " \"actor\": [", + " {", + " \"reference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000017\"", + " }", + " },", + " \"role\": {", + " \"coding\": [", + " {", + " \"code\": \"parental-responsibility\",", + " \"display\": \"Parental responsibility\",", + " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"", + " }", + " ]", + " }", + " }", + " ],", + " \"period\": {", + " \"end\": \"2026-02-11\",", + " \"start\": \"2025-02-11\"", + " }", + " },", + " \"extension\": [", + " {", + " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", + " \"valueCodeableConcept\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",", + " \"code\": \"ROLE_CREATED\",", + " \"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\": \"9000000017\"", + " }", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/WWCC67T1\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"WWCC67T1\",", + " \"status\": \"active\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ],", + " \"text\": \"Patient Privacy Consent\"", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", + " \"code\": \"INFA\",", + " \"display\": \"Information Access\"", + " }", + " ],", + " \"text\": \"Information Access Consent\"", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000005\"", + " }", + " },", + " \"dateTime\": \"2024-07-21T17:32:28Z\",", + " \"policy\": [", + " {", + " \"authority\": \"https://www.england.nhs.uk\",", + " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", + " }", + " ],", + " \"provision\": {", + " \"actor\": [", + " {", + " \"reference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000017\"", + " }", + " },", + " \"role\": {", + " \"coding\": [", + " {", + " \"code\": \"parental-responsibility\",", + " \"display\": \"Parental responsibility\",", + " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"", + " }", + " ]", + " }", + " }", + " ],", + " \"period\": {", + " \"end\": \"2026-02-11\",", + " \"start\": \"2025-02-11\"", + " }", + " },", + " \"extension\": [", + " {", + " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", + " \"valueCodeableConcept\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",", + " \"code\": \"ROLE_CREATED\",", + " \"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\": \"9000000017\"", + " }", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBGY55L2\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"BBGY55L2\",", + " \"status\": \"proposed\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ],", + " \"text\": \"Patient Privacy Consent\"", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", + " \"code\": \"INFA\",", + " \"display\": \"Information Access\"", + " }", + " ],", + " \"text\": \"Information Access Consent\"", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000020\"", + " }", + " },", + " \"dateTime\": \"2024-07-21T17:32:28Z\",", + " \"policy\": [", + " {", + " \"authority\": \"https://www.england.nhs.uk\",", + " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", + " }", + " ],", + " \"provision\": {", + " \"actor\": [", + " {", + " \"reference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000017\"", + " }", + " },", + " \"role\": {", + " \"coding\": [", + " {", + " \"code\": \"parental-responsibility\",", + " \"display\": \"Parental responsibility\",", + " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"", + " }", + " ]", + " }", + " }", + " ],", + " \"period\": {", + " \"end\": \"2026-02-11\",", + " \"start\": \"2025-02-11\"", + " }", + " },", + " \"extension\": [", + " {", + " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", + " \"valueCodeableConcept\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",", + " \"code\": \"APPLICATION_SUBMITTED\",", + " \"display\": \"Application submitted online\"", + " }", + " ]", + " }", + " },", + " {", + " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", + " \"valueReference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000017\"", + " }", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/EFGH12C5\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"EFGH12C5\",", + " \"status\": \"proposed\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ],", + " \"text\": \"Patient Privacy Consent\"", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", + " \"code\": \"INFA\",", + " \"display\": \"Information Access\"", + " }", + " ],", + " \"text\": \"Information Access Consent\"", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000021\"", + " }", + " },", + " \"dateTime\": \"2024-07-21T17:32:28Z\",", + " \"policy\": [", + " {", + " \"authority\": \"https://www.england.nhs.uk\",", + " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", + " }", + " ],", + " \"provision\": {", + " \"actor\": [", + " {", + " \"reference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000017\"", + " }", + " },", + " \"role\": {", + " \"coding\": [", + " {", + " \"code\": \"parental-responsibility\",", + " \"display\": \"Parental responsibility\",", + " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"", + " }", + " ]", + " }", + " }", + " ],", + " \"period\": {", + " \"end\": \"2026-02-11\",", + " \"start\": \"2025-02-11\"", + " }", + " },", + " \"extension\": [", + " {", + " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", + " \"valueCodeableConcept\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",", + " \"code\": \"APPLICATION_SUBMITTED\",", + " \"display\": \"Application submitted online\"", + " }", + " ]", + " }", + " },", + " {", + " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", + " \"valueReference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000017\"", + " }", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " }", + " ]", + "}", + "", + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " const responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9000000017&status=proposed&status=active&_include=Consent:patient", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9000000017" + }, + { + "key": "status", + "value": "proposed" + }, + { + "key": "status", + "value": "active" + }, + { + "key": "_include", + "value": "Consent:patient" + } + ] + } + }, + "response": [] + }, + { + "name": "Multiple proxy relationships", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"resourceType\": \"Bundle\",", + " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", + " \"total\": 3,", + " \"type\": \"searchset\",", + " \"link\": [", + " {", + " \"relation\": \"self\",", + " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000022\"", + " }", + " ],", + " \"entry\": [", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBCC67E9\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"BBCC67E9\",", + " \"status\": \"active\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ],", + " \"text\": \"Patient Privacy Consent\"", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", + " \"code\": \"INFA\",", + " \"display\": \"Information Access\"", + " }", + " ],", + " \"text\": \"Information Access Consent\"", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000009\"", + " }", + " },", + " \"dateTime\": \"2024-07-21T17:32:28Z\",", + " \"policy\": [", + " {", + " \"authority\": \"https://www.england.nhs.uk\",", + " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", + " }", + " ],", + " \"provision\": {", + " \"actor\": [", + " {", + " \"reference\": {", + " \"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\"", + " }", + " },", + " \"extension\": [", + " {", + " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", + " \"valueCodeableConcept\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",", + " \"code\": \"ROLE_CREATED\",", + " \"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\": \"9000000022\"", + " }", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/WWCC67T1\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"WWCC67T1\",", + " \"status\": \"active\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ],", + " \"text\": \"Patient Privacy Consent\"", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", + " \"code\": \"INFA\",", + " \"display\": \"Information Access\"", + " }", + " ],", + " \"text\": \"Information Access Consent\"", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000005\"", + " }", + " },", + " \"dateTime\": \"2024-07-21T17:32:28Z\",", + " \"policy\": [", + " {", + " \"authority\": \"https://www.england.nhs.uk\",", + " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", + " }", + " ],", + " \"provision\": {", + " \"actor\": [", + " {", + " \"reference\": {", + " \"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\"", + " }", + " },", + " \"extension\": [", + " {", + " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", + " \"valueCodeableConcept\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",", + " \"code\": \"ROLE_CREATED\",", + " \"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\": \"9000000022\"", + " }", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/AATD11A1\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"AATD11A1\",", + " \"status\": \"inactive\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ],", + " \"text\": \"Patient Privacy Consent\"", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", + " \"code\": \"INFA\",", + " \"display\": \"Information Access\"", + " }", + " ],", + " \"text\": \"Information Access Consent\"", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000006\"", + " }", + " },", + " \"dateTime\": \"2024-07-21T17:32:28Z\",", + " \"policy\": [", + " {", + " \"authority\": \"https://www.england.nhs.uk\",", + " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", + " }", + " ],", + " \"provision\": {", + " \"actor\": [", + " {", + " \"reference\": {", + " \"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\"", + " }", + " },", + " \"extension\": [", + " {", + " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", + " \"valueCodeableConcept\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",", + " \"code\": \"ROLE_DEACTIVATED_END_DATE_REACHED\",", + " \"display\": \"End-date reached\"", + " }", + " ]", + " }", + " },", + " {", + " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", + " \"valueReference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000022\"", + " }", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " }", + " ]", + "}", + "", + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " const responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9000000022", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9000000022" + } + ] + } + }, + "response": [] + }, + { + "name": "Multiple proxy relationships include patient", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"resourceType\": \"Bundle\",", + " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", + " \"total\": 3,", + " \"type\": \"searchset\",", + " \"link\": [", + " {", + " \"relation\": \"self\",", + " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000022&_include=Consent:patient\"", + " }", + " ],", + " \"entry\": [", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/A3CC67E2\",", + " \"resource\": {", + " \"resourceType\": \"Patient\",", + " \"id\": \"A3CC67E2\",", + " \"meta\": {", + " \"security\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\",", + " \"code\": \"P9\",", + " \"display\": \"High level verification (P9)\"", + " }", + " ]", + " },", + " \"identifier\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000009\"", + " },", + " {", + " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", + " \"value\": \"ABC1234567\"", + " }", + " ],", + " \"name\": [", + " {", + " \"use\": \"usual\",", + " \"period\": {", + " \"start\": \"2020-01-01\",", + " \"end\": \"2021-12-31\"", + " },", + " \"given\": [", + " \"Jane Marie Anne\"", + " ],", + " \"family\": \"Smith\",", + " \"prefix\": [", + " \"Mrs\"", + " ],", + " \"suffix\": [", + " \"MBE\",", + " \"PhD\"", + " ]", + " }", + " ],", + " \"birthDate\": \"2022-10-22\",", + " \"generalPractitioner\": [", + " {", + " \"identifier\": {", + " \"value\": \"ODS12345\",", + " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"include\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBCC67E9\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"BBCC67E9\",", + " \"status\": \"active\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ],", + " \"text\": \"Patient Privacy Consent\"", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", + " \"code\": \"INFA\",", + " \"display\": \"Information Access\"", + " }", + " ],", + " \"text\": \"Information Access Consent\"", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000009\"", + " }", + " },", + " \"dateTime\": \"2024-07-21T17:32:28Z\",", + " \"policy\": [", + " {", + " \"authority\": \"https://www.england.nhs.uk\",", + " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", + " }", + " ],", + " \"provision\": {", + " \"actor\": [", + " {", + " \"reference\": {", + " \"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\"", + " }", + " },", + " \"extension\": [", + " {", + " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", + " \"valueCodeableConcept\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",", + " \"code\": \"ROLE_CREATED\",", + " \"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\": \"9000000022\"", + " }", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/DFCC67F5\",", + " \"resource\": {", + " \"resourceType\": \"Patient\",", + " \"id\": \"DFCC67F5\",", + " \"meta\": {", + " \"security\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\",", + " \"code\": \"P9\",", + " \"display\": \"High level verification (P9)\"", + " }", + " ]", + " },", + " \"identifier\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000005\"", + " },", + " {", + " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", + " \"value\": \"ABC9999999\"", + " }", + " ],", + " \"name\": [", + " {", + " \"use\": \"usual\",", + " \"period\": {", + " \"start\": \"2020-01-01\",", + " \"end\": \"2021-12-31\"", + " },", + " \"given\": [", + " \"Sally\"", + " ],", + " \"family\": \"Evans\",", + " \"prefix\": [", + " \"Mrs\"", + " ]", + " }", + " ],", + " \"birthDate\": \"1995-10-22\",", + " \"generalPractitioner\": [", + " {", + " \"identifier\": {", + " \"value\": \"ODS12345\",", + " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"include\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/WWCC67T1\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"WWCC67T1\",", + " \"status\": \"active\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ],", + " \"text\": \"Patient Privacy Consent\"", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", + " \"code\": \"INFA\",", + " \"display\": \"Information Access\"", + " }", + " ],", + " \"text\": \"Information Access Consent\"", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000005\"", + " }", + " },", + " \"dateTime\": \"2024-07-21T17:32:28Z\",", + " \"policy\": [", + " {", + " \"authority\": \"https://www.england.nhs.uk\",", + " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", + " }", + " ],", + " \"provision\": {", + " \"actor\": [", + " {", + " \"reference\": {", + " \"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\"", + " }", + " },", + " \"extension\": [", + " {", + " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", + " \"valueCodeableConcept\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",", + " \"code\": \"ROLE_CREATED\",", + " \"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\": \"9000000022\"", + " }", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/ZPTT32T3\",", + " \"resource\": {", + " \"resourceType\": \"Patient\",", + " \"id\": \"ZPTT32T3\",", + " \"meta\": {", + " \"security\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\",", + " \"code\": \"P9\",", + " \"display\": \"High level verification (P9)\"", + " }", + " ]", + " },", + " \"identifier\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000006\"", + " },", + " {", + " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", + " \"value\": \"ABC9999999\"", + " }", + " ],", + " \"name\": [", + " {", + " \"use\": \"usual\",", + " \"period\": {", + " \"start\": \"2020-01-01\",", + " \"end\": \"2021-12-31\"", + " },", + " \"given\": [", + " \"Michael\"", + " ],", + " \"family\": \"Percy\",", + " \"prefix\": [", + " \"Mr\"", + " ]", + " }", + " ],", + " \"birthDate\": \"1991-1-13\",", + " \"generalPractitioner\": [", + " {", + " \"identifier\": {", + " \"value\": \"ODS12345\",", + " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"include\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/AATD11A1\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"AATD11A1\",", + " \"status\": \"inactive\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ],", + " \"text\": \"Patient Privacy Consent\"", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", + " \"code\": \"INFA\",", + " \"display\": \"Information Access\"", + " }", + " ],", + " \"text\": \"Information Access Consent\"", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000006\"", + " }", + " },", + " \"dateTime\": \"2024-07-21T1T32:28Z\",", + " \"policy\": [", + " {", + " \"authority\": \"https://www.england.nhs.uk\",", + " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", + " }", + " ],", + " \"provision\": {", + " \"actor\": [", + " {", + " \"reference\": {", + " \"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\"", + " }", + " },", + " \"extension\": [", + " {", + " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", + " \"valueCodeableConcept\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",", + " \"code\": \"ROLE_DEACTIVATED_END_DATE_REACHED\",", + " \"display\": \"End-date reached\"", + " }", + " ]", + " }", + " },", + " {", + " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", + " \"valueReference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000022\"", + " }", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " }", + " ]", + "}", + "", + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " const responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9000000022&_include=Consent:patient", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9000000022" + }, + { + "key": "_include", + "value": "Consent:patient" + } + ] + } + }, + "response": [] + }, + { + "name": "Multiple proxy relationships include performer", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"resourceType\": \"Bundle\",", + " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", + " \"total\": 3,", + " \"type\": \"searchset\",", + " \"link\": [", + " {", + " \"relation\": \"self\",", + " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000022&_include=Consent:performer\"", + " }", + " ],", + " \"entry\": [", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/BE974742\",", + " \"resource\": {", + " \"resourceType\": \"RelatedPerson\",", + " \"id\": \"BE974742\",", + " \"identifier\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000022\"", + " },", + " {", + " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", + " \"value\": \"ABC0000003\"", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000009\"", + " }", + " },", + " \"relationship\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", + " \"code\": \"PRN\",", + " \"display\": \"parent\"", + " }", + " ]", + " },", + " {", + " \"coding\": [", + " {", + " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", + " \"code\": \"MTH\",", + " \"display\": \"mother\"", + " }", + " ]", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"include\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBCC67E9\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"BBCC67E9\",", + " \"status\": \"active\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ],", + " \"text\": \"Patient Privacy Consent\"", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", + " \"code\": \"INFA\",", + " \"display\": \"Information Access\"", + " }", + " ],", + " \"text\": \"Information Access Consent\"", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000009\"", + " }", + " },", + " \"dateTime\": \"2024-07-21T17:32:28Z\",", + " \"policy\": [", + " {", + " \"authority\": \"https://www.england.nhs.uk\",", + " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", + " }", + " ],", + " \"provision\": {", + " \"actor\": [", + " {", + " \"reference\": {", + " \"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\"", + " }", + " },", + " \"extension\": [", + " {", + " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", + " \"valueCodeableConcept\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",", + " \"code\": \"ROLE_CREATED\",", + " \"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\": \"9000000022\"", + " }", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/RP974720\",", + " \"resource\": {", + " \"resourceType\": \"RelatedPerson\",", + " \"id\": \"RP974720\",", + " \"identifier\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000022\"", + " },", + " {", + " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", + " \"value\": \"ABC00000234\"", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000005\"", + " }", + " },", + " \"relationship\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\",", + " \"code\": \"Personal\",", + " \"display\": \"Personal relationship with the patient\"", + " }", + " ]", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"include\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/WWCC67T1\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"WWCC67T1\",", + " \"status\": \"active\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ],", + " \"text\": \"Patient Privacy Consent\"", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", + " \"code\": \"INFA\",", + " \"display\": \"Information Access\"", + " }", + " ],", + " \"text\": \"Information Access Consent\"", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000005\"", + " }", + " },", + " \"dateTime\": \"2024-07-21T17:32:28Z\",", + " \"policy\": [", + " {", + " \"authority\": \"https://www.england.nhs.uk\",", + " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", + " }", + " ],", + " \"provision\": {", + " \"actor\": [", + " {", + " \"reference\": {", + " \"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\"", + " }", + " },", + " \"extension\": [", + " {", + " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", + " \"valueCodeableConcept\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",", + " \"code\": \"ROLE_CREATED\",", + " \"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\": \"9000000022\"", + " }", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/AATD11A1\",", + " \"resource\": {", + " \"resourceType\": \"RelatedPerson\",", + " \"id\": \"AATD11A1\",", + " \"identifier\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000022\"", + " },", + " {", + " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", + " \"value\": \"ABC0000001\"", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000006\"", + " }", + " },", + " \"relationship\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\",", + " \"code\": \"Personal\",", + " \"display\": \"Personal relationship with the patient\"", + " }", + " ]", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"include\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/AATD11A1\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"AATD11A1\",", + " \"status\": \"inactive\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ],", + " \"text\": \"Patient Privacy Consent\"", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", + " \"code\": \"INFA\",", + " \"display\": \"Information Access\"", + " }", + " ],", + " \"text\": \"Information Access Consent\"", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000006\"", + " }", + " },", + " \"dateTime\": \"2024-07-21T17:32:28Z\",", + " \"policy\": [", + " {", + " \"authority\": \"https://www.england.nhs.uk\",", + " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", + " }", + " ],", + " \"provision\": {", + " \"actor\": [", + " {", + " \"reference\": {", + " \"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\"", + " }", + " },", + " \"extension\": [", + " {", + " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", + " \"valueCodeableConcept\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",", + " \"code\": \"ROLE_DEACTIVATED_END_DATE_REACHED\",", + " \"display\": \"End-date reached\"", + " }", + " ]", + " }", + " },", + " {", + " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", + " \"valueReference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000022\"", + " }", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " }", + " ]", + "}", + "", + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " const responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9000000022&_include=Consent:performer", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9000000022" + }, + { + "key": "_include", + "value": "Consent:performer" + } + ] + } + }, + "response": [] + }, + { + "name": "Multiple proxy relationships include performer and patient", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"resourceType\": \"Bundle\",", + " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", + " \"total\": 3,", + " \"type\": \"searchset\",", + " \"link\": [", + " {", + " \"relation\": \"self\",", + " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000022&_include=Consent:performer&_include=Consent:patient\"", + " }", + " ],", + " \"entry\": [", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/BE974742\",", + " \"resource\": {", + " \"resourceType\": \"RelatedPerson\",", + " \"id\": \"BE974742\",", + " \"identifier\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000022\"", + " },", + " {", + " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", + " \"value\": \"ABC0000003\"", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000009\"", + " }", + " },", + " \"relationship\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", + " \"code\": \"PRN\",", + " \"display\": \"parent\"", + " }", + " ]", + " },", + " {", + " \"coding\": [", + " {", + " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", + " \"code\": \"MTH\",", + " \"display\": \"mother\"", + " }", + " ]", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"include\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/A3CC67E2\",", + " \"resource\": {", + " \"resourceType\": \"Patient\",", + " \"id\": \"A3CC67E2\",", + " \"meta\": {", + " \"security\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\",", + " \"code\": \"P9\",", + " \"display\": \"High level verification (P9)\"", + " }", + " ]", + " },", + " \"identifier\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000009\"", + " },", + " {", + " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", + " \"value\": \"ABC1234567\"", + " }", + " ],", + " \"name\": [", + " {", + " \"use\": \"usual\",", + " \"period\": {", + " \"start\": \"2020-01-01\",", + " \"end\": \"2021-12-31\"", + " },", + " \"given\": [", + " \"Jane Marie Anne\"", + " ],", + " \"family\": \"Smith\",", + " \"prefix\": [", + " \"Mrs\"", + " ],", + " \"suffix\": [", + " \"MBE\",", + " \"PhD\"", + " ]", + " }", + " ],", + " \"birthDate\": \"2022-10-22\",", + " \"generalPractitioner\": [", + " {", + " \"identifier\": {", + " \"value\": \"ODS12345\",", + " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"include\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBCC67E9\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"BBCC67E9\",", + " \"status\": \"active\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ],", + " \"text\": \"Patient Privacy Consent\"", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", + " \"code\": \"INFA\",", + " \"display\": \"Information Access\"", + " }", + " ],", + " \"text\": \"Information Access Consent\"", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000009\"", + " }", + " },", + " \"dateTime\": \"2024-07-21T17:32:28Z\",", + " \"policy\": [", + " {", + " \"authority\": \"https://www.england.nhs.uk\",", + " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", + " }", + " ],", + " \"provision\": {", + " \"actor\": [", + " {", + " \"reference\": {", + " \"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\"", + " }", + " },", + " \"extension\": [", + " {", + " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", + " \"valueCodeableConcept\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",", + " \"code\": \"ROLE_CREATED\",", + " \"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\": \"9000000022\"", + " }", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/RP974720\",", + " \"resource\": {", + " \"resourceType\": \"RelatedPerson\",", + " \"id\": \"RP974720\",", + " \"identifier\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000022\"", + " },", + " {", + " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", + " \"value\": \"ABC00000234\"", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000005\"", + " }", + " },", + " \"relationship\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\",", + " \"code\": \"Personal\",", + " \"display\": \"Personal relationship with the patient\"", + " }", + " ]", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"include\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/DFCC67F5\",", + " \"resource\": {", + " \"resourceType\": \"Patient\",", + " \"id\": \"DFCC67F5\",", + " \"meta\": {", + " \"security\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\",", + " \"code\": \"P9\",", + " \"display\": \"High level verification (P9)\"", + " }", + " ]", + " },", + " \"identifier\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000005\"", + " },", + " {", + " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", + " \"value\": \"ABC9999999\"", + " }", + " ],", + " \"name\": [", + " {", + " \"use\": \"usual\",", + " \"period\": {", + " \"start\": \"2020-01-01\",", + " \"end\": \"2021-12-31\"", + " },", + " \"given\": [", + " \"Sally\"", + " ],", + " \"family\": \"Evans\",", + " \"prefix\": [", + " \"Mrs\"", + " ]", + " }", + " ],", + " \"birthDate\": \"1995-10-22\",", + " \"generalPractitioner\": [", + " {", + " \"identifier\": {", + " \"value\": \"ODS12345\",", + " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"include\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/WWCC67T1\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"WWCC67T1\",", + " \"status\": \"active\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ],", + " \"text\": \"Patient Privacy Consent\"", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", + " \"code\": \"INFA\",", + " \"display\": \"Information Access\"", + " }", + " ],", + " \"text\": \"Information Access Consent\"", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000005\"", + " }", + " },", + " \"dateTime\": \"2024-07-21T17:32:28Z\",", + " \"policy\": [", + " {", + " \"authority\": \"https://www.england.nhs.uk\",", + " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", + " }", + " ],", + " \"provision\": {", + " \"actor\": [", + " {", + " \"reference\": {", + " \"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\"", + " }", + " },", + " \"extension\": [", + " {", + " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", + " \"valueCodeableConcept\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",", + " \"code\": \"ROLE_CREATED\",", + " \"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\": \"9000000022\"", + " }", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/AATD11A1\",", + " \"resource\": {", + " \"resourceType\": \"RelatedPerson\",", + " \"id\": \"AATD11A1\",", + " \"identifier\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000022\"", + " },", + " {", + " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", + " \"value\": \"ABC0000001\"", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000006\"", + " }", + " },", + " \"relationship\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\",", + " \"code\": \"Personal\",", + " \"display\": \"Personal relationship with the patient\"", + " }", + " ]", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"include\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/ZPTT32T3\",", + " \"resource\": {", + " \"resourceType\": \"Patient\",", + " \"id\": \"ZPTT32T3\",", + " \"meta\": {", + " \"security\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\",", + " \"code\": \"P9\",", + " \"display\": \"High level verification (P9)\"", + " }", + " ]", + " },", + " \"identifier\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000006\"", + " },", + " {", + " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", + " \"value\": \"ABC9999999\"", + " }", + " ],", + " \"name\": [", + " {", + " \"use\": \"usual\",", + " \"period\": {", + " \"start\": \"2020-01-01\",", + " \"end\": \"2021-12-31\"", + " },", + " \"given\": [", + " \"Michael\"", + " ],", + " \"family\": \"Percy\",", + " \"prefix\": [", + " \"Mr\"", + " ]", + " }", + " ],", + " \"birthDate\": \"1991-1-13\",", + " \"generalPractitioner\": [", + " {", + " \"identifier\": {", + " \"value\": \"ODS12345\",", + " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"include\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/AATD11A1\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"AATD11A1\",", + " \"status\": \"inactive\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ],", + " \"text\": \"Patient Privacy Consent\"", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", + " \"code\": \"INFA\",", + " \"display\": \"Information Access\"", + " }", + " ],", + " \"text\": \"Information Access Consent\"", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000006\"", + " }", + " },", + " \"dateTime\": \"2024-07-21T17:32:28Z\",", + " \"policy\": [", + " {", + " \"authority\": \"https://www.england.nhs.uk\",", + " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", + " }", + " ],", + " \"provision\": {", + " \"actor\": [", + " {", + " \"reference\": {", + " \"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\"", + " }", + " },", + " \"extension\": [", + " {", + " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", + " \"valueCodeableConcept\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",", + " \"code\": \"ROLE_DEACTIVATED_END_DATE_REACHED\",", + " \"display\": \"End-date reached\"", + " }", + " ]", + " }", + " },", + " {", + " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", + " \"valueReference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000022\"", + " }", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " }", + " ]", + "}", + "", + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " const responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9000000022&_include=Consent:performer&_include=Consent:patient", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9000000022" + }, + { + "key": "_include", + "value": "Consent:performer" + }, + { + "key": "_include", + "value": "Consent:patient" + } + ] + } + }, + "response": [] + }, + { + "name": "Multiple proxy relationships single patient", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"resourceType\": \"Bundle\",", + " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", + " \"total\": 3,", + " \"type\": \"searchset\",", + " \"link\": [", + " {", + " \"relation\": \"self\",", + " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?patient:identifier=9000000100\"", + " }", + " ],", + " \"entry\": [", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBCC67E9\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"BBCC67E9\",", + " \"status\": \"active\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ],", + " \"text\": \"Patient Privacy Consent\"", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", + " \"code\": \"INFA\",", + " \"display\": \"Information Access\"", + " }", + " ],", + " \"text\": \"Information Access Consent\"", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000100\"", + " }", + " },", + " \"dateTime\": \"2024-07-21T17:32:28Z\",", + " \"policy\": [", + " {", + " \"authority\": \"https://www.england.nhs.uk\",", + " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", + " }", + " ],", + " \"provision\": {", + " \"actor\": [", + " {", + " \"reference\": {", + " \"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\"", + " }", + " },", + " \"extension\": [", + " {", + " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", + " \"valueCodeableConcept\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",", + " \"code\": \"ROLE_CREATED\",", + " \"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\": \"9000000020\"", + " }", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/WWCC67T1\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"WWCC67T1\",", + " \"status\": \"active\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ],", + " \"text\": \"Patient Privacy Consent\"", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", + " \"code\": \"INFA\",", + " \"display\": \"Information Access\"", + " }", + " ],", + " \"text\": \"Information Access Consent\"", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000100\"", + " }", + " },", + " \"dateTime\": \"2024-07-21T17:32:28Z\",", + " \"policy\": [", + " {", + " \"authority\": \"https://www.england.nhs.uk\",", + " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", + " }", + " ],", + " \"provision\": {", + " \"actor\": [", + " {", + " \"reference\": {", + " \"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\"", + " }", + " },", + " \"extension\": [", + " {", + " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", + " \"valueCodeableConcept\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",", + " \"code\": \"ROLE_CREATED\",", + " \"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\": \"9000000021\"", + " }", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/AATD11A1\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"AATD11A1\",", + " \"status\": \"inactive\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ],", + " \"text\": \"Patient Privacy Consent\"", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", + " \"code\": \"INFA\",", + " \"display\": \"Information Access\"", + " }", + " ],", + " \"text\": \"Information Access Consent\"", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000100\"", + " }", + " },", + " \"dateTime\": \"2024-07-21T17:32:28Z\",", + " \"policy\": [", + " {", + " \"authority\": \"https://www.england.nhs.uk\",", + " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", + " }", + " ],", + " \"provision\": {", + " \"actor\": [", + " {", + " \"reference\": {", + " \"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\"", + " }", + " },", + " \"extension\": [", + " {", + " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", + " \"valueCodeableConcept\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",", + " \"code\": \"ROLE_DEACTIVATED_END_DATE_REACHED\",", + " \"display\": \"End-date reached\"", + " }", + " ]", + " }", + " },", + " {", + " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", + " \"valueReference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000022\"", + " }", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " }", + " ]", + "}", + "", + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " const responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{api_base_url}}/Consent?patient:identifier=9000000100", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "patient:identifier", + "value": "9000000100" + } + ] + } + }, + "response": [] + }, + { + "name": "Multiple proxy relationships single patient include performer and patient", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"resourceType\": \"Bundle\",", + " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", + " \"total\": 3,", + " \"type\": \"searchset\",", + " \"link\": [", + " {", + " \"relation\": \"self\",", + " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?patient:identifier=9000000100&_include=Consent:performer&_include=Consent:patient\"", + " }", + " ],", + " \"entry\": [", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/A3CC67E2\",", + " \"resource\": {", + " \"resourceType\": \"Patient\",", + " \"id\": \"A3CC67E2\",", + " \"meta\": {", + " \"security\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\",", + " \"code\": \"P9\",", + " \"display\": \"High level verification (P9)\"", + " }", + " ]", + " },", + " \"identifier\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000100\"", + " },", + " {", + " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", + " \"value\": \"ABC1234567\"", + " }", + " ],", + " \"name\": [", + " {", + " \"use\": \"usual\",", + " \"period\": {", + " \"start\": \"2020-01-01\",", + " \"end\": \"2021-12-31\"", + " },", + " \"given\": [", + " \"Samantha\"", + " ],", + " \"family\": \"Adams\",", + " \"prefix\": [", + " \"Miss\"", + " ]", + " }", + " ],", + " \"birthDate\": \"1963-11-02\",", + " \"generalPractitioner\": [", + " {", + " \"identifier\": {", + " \"value\": \"ODS12345\",", + " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"include\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/BE974742\",", + " \"resource\": {", + " \"resourceType\": \"RelatedPerson\",", + " \"id\": \"BE974742\",", + " \"identifier\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000020\"", + " },", + " {", + " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", + " \"value\": \"ABC0000003\"", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000100\"", + " }", + " },", + " \"relationship\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", + " \"code\": \"PRN\",", + " \"display\": \"parent\"", + " }", + " ]", + " },", + " {", + " \"coding\": [", + " {", + " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", + " \"code\": \"MTH\",", + " \"display\": \"mother\"", + " }", + " ]", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"include\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBCC67E9\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"BBCC67E9\",", + " \"status\": \"active\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ],", + " \"text\": \"Patient Privacy Consent\"", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", + " \"code\": \"INFA\",", + " \"display\": \"Information Access\"", + " }", + " ],", + " \"text\": \"Information Access Consent\"", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000100\"", + " }", + " },", + " \"dateTime\": \"2024-07-21T17:32:28Z\",", + " \"policy\": [", + " {", + " \"authority\": \"https://www.england.nhs.uk\",", + " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", + " }", + " ],", + " \"provision\": {", + " \"actor\": [", + " {", + " \"reference\": {", + " \"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\"", + " }", + " },", + " \"extension\": [", + " {", + " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", + " \"valueCodeableConcept\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",", + " \"code\": \"ROLE_CREATED\",", + " \"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\": \"9000000020\"", + " }", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/BE974742\",", + " \"resource\": {", + " \"resourceType\": \"RelatedPerson\",", + " \"id\": \"BE974742\",", + " \"identifier\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000021\"", + " },", + " {", + " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", + " \"value\": \"ABC0000003\"", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000100\"", + " }", + " },", + " \"relationship\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", + " \"code\": \"Personal\",", + " \"display\": \"Personal relationship with the patient\"", + " }", + " ]", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"include\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/WWCC67T1\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"WWCC67T1\",", + " \"status\": \"active\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ],", + " \"text\": \"Patient Privacy Consent\"", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", + " \"code\": \"INFA\",", + " \"display\": \"Information Access\"", + " }", + " ],", + " \"text\": \"Information Access Consent\"", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000100\"", + " }", + " },", + " \"dateTime\": \"2024-07-21T17:32:28Z\",", + " \"policy\": [", + " {", + " \"authority\": \"https://www.england.nhs.uk\",", + " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", + " }", + " ],", + " \"provision\": {", + " \"actor\": [", + " {", + " \"reference\": {", + " \"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\"", + " }", + " },", + " \"extension\": [", + " {", + " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", + " \"valueCodeableConcept\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",", + " \"code\": \"ROLE_CREATED\",", + " \"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\": \"9000000021\"", + " }", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/BE974742\",", + " \"resource\": {", + " \"resourceType\": \"RelatedPerson\",", + " \"id\": \"BE974742\",", + " \"identifier\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000022\"", + " },", + " {", + " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", + " \"value\": \"ABC0000003\"", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000100\"", + " }", + " },", + " \"relationship\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", + " \"code\": \"Personal\",", + " \"display\": \"Personal relationship with the patient\"", + " }", + " ]", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"include\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/AATD11A1\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"AATD11A1\",", + " \"status\": \"inactive\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ],", + " \"text\": \"Patient Privacy Consent\"", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", + " \"code\": \"INFA\",", + " \"display\": \"Information Access\"", + " }", + " ],", + " \"text\": \"Information Access Consent\"", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000100\"", + " }", + " },", + " \"dateTime\": \"2024-07-21T17:32:28Z\",", + " \"policy\": [", + " {", + " \"authority\": \"https://www.england.nhs.uk\",", + " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", + " }", + " ],", + " \"provision\": {", + " \"actor\": [", + " {", + " \"reference\": {", + " \"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\"", + " }", + " },", + " \"extension\": [", + " {", + " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", + " \"valueCodeableConcept\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",", + " \"code\": \"ROLE_DEACTIVATED_END_DATE_REACHED\",", + " \"display\": \"End-date reached\"", + " }", + " ]", + " }", + " },", + " {", + " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", + " \"valueReference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000022\"", + " }", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " }", + " ]", + "}", + "", + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " const responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{api_base_url}}/Consent?patient:identifier=9000000100&_include=Consent:performer&_include=Consent:patient", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "patient:identifier", + "value": "9000000100" + }, + { + "key": "_include", + "value": "Consent:performer" + }, + { + "key": "_include", + "value": "Consent:patient" + } + ] + } + }, + "response": [] + }, + { + "name": "Multiple proxy relationships single patient include performer", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"resourceType\": \"Bundle\",", + " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", + " \"total\": 3,", + " \"type\": \"searchset\",", + " \"link\": [", + " {", + " \"relation\": \"self\",", + " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?patient:identifier=9000000100&_include=Consent:performer\"", + " }", + " ],", + " \"entry\": [", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/BE974742\",", + " \"resource\": {", + " \"resourceType\": \"RelatedPerson\",", + " \"id\": \"BE974742\",", + " \"identifier\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000020\"", + " },", + " {", + " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", + " \"value\": \"ABC0000003\"", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000100\"", + " }", + " },", + " \"relationship\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", + " \"code\": \"PRN\",", + " \"display\": \"parent\"", + " }", + " ]", + " },", + " {", + " \"coding\": [", + " {", + " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", + " \"code\": \"MTH\",", + " \"display\": \"mother\"", + " }", + " ]", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"include\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBCC67E9\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"BBCC67E9\",", + " \"status\": \"active\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ],", + " \"text\": \"Patient Privacy Consent\"", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", + " \"code\": \"INFA\",", + " \"display\": \"Information Access\"", + " }", + " ],", + " \"text\": \"Information Access Consent\"", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000100\"", + " }", + " },", + " \"dateTime\": \"2024-07-21T17:32:28Z\",", + " \"policy\": [", + " {", + " \"authority\": \"https://www.england.nhs.uk\",", + " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", + " }", + " ],", + " \"provision\": {", + " \"actor\": [", + " {", + " \"reference\": {", + " \"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\"", + " }", + " },", + " \"extension\": [", + " {", + " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", + " \"valueCodeableConcept\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",", + " \"code\": \"ROLE_CREATED\",", + " \"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\": \"9000000020\"", + " }", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/BE974742\",", + " \"resource\": {", + " \"resourceType\": \"RelatedPerson\",", + " \"id\": \"BE974742\",", + " \"identifier\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000021\"", + " },", + " {", + " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", + " \"value\": \"ABC0000003\"", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000100\"", + " }", + " },", + " \"relationship\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", + " \"code\": \"Personal\",", + " \"display\": \"Personal relationship with the patient\"", + " }", + " ]", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"include\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/WWCC67T1\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"WWCC67T1\",", + " \"status\": \"active\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ],", + " \"text\": \"Patient Privacy Consent\"", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", + " \"code\": \"INFA\",", + " \"display\": \"Information Access\"", + " }", + " ],", + " \"text\": \"Information Access Consent\"", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000100\"", + " }", + " },", + " \"dateTime\": \"2024-07-21T17:32:28Z\",", + " \"policy\": [", + " {", + " \"authority\": \"https://www.england.nhs.uk\",", + " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", + " }", + " ],", + " \"provision\": {", + " \"actor\": [", + " {", + " \"reference\": {", + " \"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\"", + " }", + " },", + " \"extension\": [", + " {", + " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", + " \"valueCodeableConcept\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",", + " \"code\": \"ROLE_CREATED\",", + " \"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\": \"9000000021\"", + " }", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/BE974742\",", + " \"resource\": {", + " \"resourceType\": \"RelatedPerson\",", + " \"id\": \"BE974742\",", + " \"identifier\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000022\"", + " },", + " {", + " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", + " \"value\": \"ABC0000003\"", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000100\"", + " }", + " },", + " \"relationship\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", + " \"code\": \"Personal\",", + " \"display\": \"Personal relationship with the patient\"", + " }", + " ]", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"include\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/AATD11A1\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"AATD11A1\",", + " \"status\": \"inactive\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ],", + " \"text\": \"Patient Privacy Consent\"", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", + " \"code\": \"INFA\",", + " \"display\": \"Information Access\"", + " }", + " ],", + " \"text\": \"Information Access Consent\"", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000100\"", + " }", + " },", + " \"dateTime\": \"2024-07-21T17:32:28Z\",", + " \"policy\": [", + " {", + " \"authority\": \"https://www.england.nhs.uk\",", + " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", + " }", + " ],", + " \"provision\": {", + " \"actor\": [", + " {", + " \"reference\": {", + " \"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\"", + " }", + " },", + " \"extension\": [", + " {", + " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", + " \"valueCodeableConcept\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",", + " \"code\": \"ROLE_DEACTIVATED_END_DATE_REACHED\",", + " \"display\": \"End-date reached\"", + " }", + " ]", + " }", + " },", + " {", + " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", + " \"valueReference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000022\"", + " }", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " }", + " ]", + "}", + "", + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " const responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{api_base_url}}/Consent?patient:identifier=9000000100&_include=Consent:performer", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "patient:identifier", + "value": "9000000100" + }, + { + "key": "_include", + "value": "Consent:performer" + } + ] + } + }, + "response": [] + }, + { + "name": "Multiple proxy relationships single patient include patient", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"resourceType\": \"Bundle\",", + " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", + " \"total\": 3,", + " \"type\": \"searchset\",", + " \"link\": [", + " {", + " \"relation\": \"self\",", + " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?patient:identifier=9000000100&_include=Consent:patient\"", + " }", + " ],", + " \"entry\": [", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/A3CC67E2\",", + " \"resource\": {", + " \"resourceType\": \"Patient\",", + " \"id\": \"A3CC67E2\",", + " \"meta\": {", + " \"security\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\",", + " \"code\": \"P9\",", + " \"display\": \"High level verification (P9)\"", + " }", + " ]", + " },", + " \"identifier\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000100\"", + " },", + " {", + " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", + " \"value\": \"ABC1234567\"", + " }", + " ],", + " \"name\": [", + " {", + " \"use\": \"usual\",", + " \"period\": {", + " \"start\": \"2020-01-01\",", + " \"end\": \"2021-12-31\"", + " },", + " \"given\": [", + " \"Samantha\"", + " ],", + " \"family\": \"Adams\",", + " \"prefix\": [", + " \"Miss\"", + " ]", + " }", + " ],", + " \"birthDate\": \"1963-11-02\",", + " \"generalPractitioner\": [", + " {", + " \"identifier\": {", + " \"value\": \"ODS12345\",", + " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"include\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBCC67E9\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"BBCC67E9\",", + " \"status\": \"active\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ],", + " \"text\": \"Patient Privacy Consent\"", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", + " \"code\": \"INFA\",", + " \"display\": \"Information Access\"", + " }", + " ],", + " \"text\": \"Information Access Consent\"", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000100\"", + " }", + " },", + " \"dateTime\": \"2024-07-21T17:32:28Z\",", + " \"policy\": [", + " {", + " \"authority\": \"https://www.england.nhs.uk\",", + " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", + " }", + " ],", + " \"provision\": {", + " \"actor\": [", + " {", + " \"reference\": {", + " \"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\"", + " }", + " },", + " \"extension\": [", + " {", + " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", + " \"valueCodeableConcept\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",", + " \"code\": \"ROLE_CREATED\",", + " \"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\": \"9000000020\"", + " }", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/WWCC67T1\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"WWCC67T1\",", + " \"status\": \"active\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ],", + " \"text\": \"Patient Privacy Consent\"", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", + " \"code\": \"INFA\",", + " \"display\": \"Information Access\"", + " }", + " ],", + " \"text\": \"Information Access Consent\"", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000100\"", + " }", + " },", + " \"dateTime\": \"2024-07-21T17:32:28Z\",", + " \"policy\": [", + " {", + " \"authority\": \"https://www.england.nhs.uk\",", + " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", + " }", + " ],", + " \"provision\": {", + " \"actor\": [", + " {", + " \"reference\": {", + " \"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\"", + " }", + " },", + " \"extension\": [", + " {", + " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", + " \"valueCodeableConcept\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",", + " \"code\": \"ROLE_CREATED\",", + " \"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\": \"9000000021\"", + " }", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/AATD11A1\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"AATD11A1\",", + " \"status\": \"inactive\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ],", + " \"text\": \"Patient Privacy Consent\"", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", + " \"code\": \"INFA\",", + " \"display\": \"Information Access\"", + " }", + " ],", + " \"text\": \"Information Access Consent\"", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000100\"", + " }", + " },", + " \"dateTime\": \"2024-07-21T17:32:28Z\",", + " \"policy\": [", + " {", + " \"authority\": \"https://www.england.nhs.uk\",", + " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", + " }", + " ],", + " \"provision\": {", + " \"actor\": [", + " {", + " \"reference\": {", + " \"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\"", + " }", + " },", + " \"extension\": [", + " {", + " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", + " \"valueCodeableConcept\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",", + " \"code\": \"ROLE_DEACTIVATED_END_DATE_REACHED\",", + " \"display\": \"End-date reached\"", + " }", + " ]", + " }", + " },", + " {", + " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", + " \"valueReference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000022\"", + " }", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " }", + " ]", + "}", + "", + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " const responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{api_base_url}}/Consent?patient:identifier=9000000100&_include=Consent:patient", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "patient:identifier", + "value": "9000000100" + }, + { + "key": "_include", + "value": "Consent:patient" + } + ] + } + }, + "response": [] + }, + { + "name": "No relationships", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"resourceType\": \"Bundle\",", + " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", + " \"total\": 0,", + " \"type\": \"searchset\",", + " \"link\": [", + " {", + " \"relation\": \"self\",", + " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000025&_include=Consent:performer&_include=Consent:patient\"", + " }", + " ],", + " \"entry\": []", + "}", + "", + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " const responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9000000025", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9000000025" + } + ] + } + }, + "response": [] + }, + { + "name": "Single consenting adult proxy relationship", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"resourceType\": \"Bundle\",", + " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", + " \"total\": 1,", + " \"type\": \"searchset\",", + " \"link\": [", + " {", + " \"relation\": \"self\",", + " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000010\"", + " }", + " ],", + " \"entry\": [", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/WWCC67T1\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"WWCC67T1\",", + " \"status\": \"active\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ],", + " \"text\": \"Patient Privacy Consent\"", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", + " \"code\": \"INFA\",", + " \"display\": \"Information Access\"", + " }", + " ],", + " \"text\": \"Information Access Consent\"", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000005\"", + " }", + " },", + " \"dateTime\": \"2024-07-21T17:32:28Z\",", + " \"policy\": [", + " {", + " \"authority\": \"https://www.england.nhs.uk\",", + " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", + " }", + " ],", + " \"provision\": {", + " \"actor\": [", + " {", + " \"reference\": {", + " \"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\"", + " }", + " },", + " \"extension\": [", + " {", + " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", + " \"valueCodeableConcept\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",", + " \"code\": \"ROLE_CREATED\",", + " \"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\": \"9000000010\"", + " }", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " }", + " ]", + "}", + "", + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " const responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9000000010", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9000000010" + } + ] + } + }, + "response": [] + }, + { + "name": "Single consenting adult proxy relationship include performer and patient", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"resourceType\": \"Bundle\",", + " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", + " \"total\": 1,", + " \"type\": \"searchset\",", + " \"link\": [", + " {", + " \"relation\": \"self\",", + " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000010&_include=Consent:performer&_include=Consent:patient\"", + " }", + " ],", + " \"entry\": [", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/RP974720\",", + " \"resource\": {", + " \"resourceType\": \"RelatedPerson\",", + " \"id\": \"RP974720\",", + " \"identifier\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000010\"", + " },", + " {", + " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", + " \"value\": \"ABC0000008\"", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000005\"", + " }", + " },", + " \"relationship\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\",", + " \"code\": \"Personal\",", + " \"display\": \"Personal relationship with the patient\"", + " }", + " ]", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"include\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/DFCC67F5\",", + " \"resource\": {", + " \"resourceType\": \"Patient\",", + " \"id\": \"DFCC67F5\",", + " \"meta\": {", + " \"security\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\",", + " \"code\": \"P9\",", + " \"display\": \"High level verification (P9)\"", + " }", + " ]", + " },", + " \"identifier\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000005\"", + " },", + " {", + " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", + " \"value\": \"ABC1234567\"", + " }", + " ],", + " \"name\": [", + " {", + " \"use\": \"usual\",", + " \"period\": {", + " \"start\": \"2020-01-01\",", + " \"end\": \"2021-12-31\"", + " },", + " \"given\": [", + " \"Sally\"", + " ],", + " \"family\": \"Evans\",", + " \"prefix\": [", + " \"Mrs\"", + " ]", + " }", + " ],", + " \"birthDate\": \"1995-10-22\",", + " \"generalPractitioner\": [", + " {", + " \"identifier\": {", + " \"value\": \"ODS12345\",", + " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"include\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/WWCC67T1\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"WWCC67T1\",", + " \"status\": \"active\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ],", + " \"text\": \"Patient Privacy Consent\"", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", + " \"code\": \"INFA\",", + " \"display\": \"Information Access\"", + " }", + " ],", + " \"text\": \"Information Access Consent\"", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000005\"", + " }", + " },", + " \"dateTime\": \"2024-07-21T17:32:28Z\",", + " \"policy\": [", + " {", + " \"authority\": \"https://www.england.nhs.uk\",", + " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", + " }", + " ],", + " \"provision\": {", + " \"actor\": [", + " {", + " \"reference\": {", + " \"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\": \"2026-02-11\",", + " \"start\": \"2025-02-11\"", + " }", + " },", + " \"extension\": [", + " {", + " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", + " \"valueCodeableConcept\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",", + " \"code\": \"ROLE_CREATED\",", + " \"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\": \"9000000010\"", + " }", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " }", + " ]", + "}", + "", + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " const responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9000000010&_include=Consent:performer&_include=Consent:patient", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9000000010" + }, + { + "key": "_include", + "value": "Consent:performer" + }, + { + "key": "_include", + "value": "Consent:patient" + } + ] + } + }, + "response": [] + }, + { + "name": "Single mother-child relationship", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"resourceType\": \"Bundle\",", + " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", + " \"total\": 1,", + " \"type\": \"searchset\",", + " \"link\": [", + " {", + " \"relation\": \"self\",", + " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000019\"", + " }", + " ],", + " \"entry\": [", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBCC67E9\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"BBCC67E9\",", + " \"status\": \"active\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ],", + " \"text\": \"Patient Privacy Consent\"", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", + " \"code\": \"INFA\",", + " \"display\": \"Information Access\"", + " }", + " ],", + " \"text\": \"Information Access Consent\"", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000009\"", + " }", + " },", + " \"dateTime\": \"2024-07-21T17:32:28Z\",", + " \"policy\": [", + " {", + " \"authority\": \"https://www.england.nhs.uk\",", + " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", + " }", + " ],", + " \"provision\": {", + " \"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\"", + " }", + " ]", + " }", + " }", + " ],", + " \"period\": {", + " \"end\": \"2026-02-11\",", + " \"start\": \"2025-02-11\"", + " }", + " },", + " \"extension\": [", + " {", + " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", + " \"valueCodeableConcept\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",", + " \"code\": \"ROLE_CREATED\",", + " \"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\": \"9000000019\"", + " }", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " }", + " ]", + "}", + "", + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " const responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9000000019", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9000000019" + } + ] + } + }, + "response": [] + }, + { + "name": "Single mother-child relationship include performer and patient", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"resourceType\": \"Bundle\",", + " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", + " \"total\": 1,", + " \"type\": \"searchset\",", + " \"link\": [", + " {", + " \"relation\": \"self\",", + " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000019&_include=Consent:performer&_include=Consent:patient\"", + " }", + " ],", + " \"entry\": [", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/BE974742\",", + " \"resource\": {", + " \"resourceType\": \"RelatedPerson\",", + " \"id\": \"BE974742\",", + " \"identifier\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000019\"", + " },", + " {", + " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", + " \"value\": \"ABC0000001\"", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000009\"", + " }", + " },", + " \"relationship\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", + " \"code\": \"PRN\",", + " \"display\": \"parent\"", + " }", + " ]", + " },", + " {", + " \"coding\": [", + " {", + " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", + " \"code\": \"MTH\",", + " \"display\": \"mother\"", + " }", + " ]", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"include\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/A3CC67E2\",", + " \"resource\": {", + " \"resourceType\": \"Patient\",", + " \"id\": \"A3CC67E2\",", + " \"meta\": {", + " \"security\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\",", + " \"code\": \"P9\",", + " \"display\": \"High level verification (P9)\"", + " }", + " ]", + " },", + " \"identifier\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000009\"", + " },", + " {", + " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", + " \"value\": \"ABC1234556\"", + " }", + " ],", + " \"name\": [", + " {", + " \"use\": \"usual\",", + " \"period\": {", + " \"start\": \"2020-01-01\",", + " \"end\": \"2021-12-31\"", + " },", + " \"given\": [", + " \"Jane Marie Anne\"", + " ],", + " \"family\": \"Smith\",", + " \"prefix\": [", + " \"Mrs\"", + " ],", + " \"suffix\": [", + " \"MBE\",", + " \"PhD\"", + " ]", + " }", + " ],", + " \"birthDate\": \"2022-10-22\",", + " \"generalPractitioner\": [", + " {", + " \"identifier\": {", + " \"value\": \"ODS12345\",", + " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"include\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBCC67E9\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"BBCC67E9\",", + " \"status\": \"active\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ],", + " \"text\": \"Patient Privacy Consent\"", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", + " \"code\": \"INFA\",", + " \"display\": \"Information Access\"", + " }", + " ],", + " \"text\": \"Information Access Consent\"", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000009\"", + " }", + " },", + " \"dateTime\": \"2024-07-21T17:32:28Z\",", + " \"policy\": [", + " {", + " \"authority\": \"https://www.england.nhs.uk\",", + " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", + " }", + " ],", + " \"provision\": {", + " \"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\"", + " }", + " ]", + " }", + " }", + " ],", + " \"period\": {", + " \"end\": \"2026-02-11\",", + " \"start\": \"2025-02-11\"", + " }", + " },", + " \"extension\": [", + " {", + " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", + " \"valueCodeableConcept\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",", + " \"code\": \"ROLE_CREATED\",", + " \"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\": \"9000000019\"", + " }", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " }", + " ]", + "}", + "", + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " const responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9000000019&_include=Consent:performer&_include=Consent:patient", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9000000019" + }, + { + "key": "_include", + "value": "Consent:performer" + }, + { + "key": "_include", + "value": "Consent:patient" + } + ] + } + }, + "response": [] + }, + { + "name": "Invalid status parameter", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"resourceType\": \"OperationOutcome\",", + " \"issue\": [", + " {", + " \"code\": \"invalid\",", + " \"details\": {", + " \"coding\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", + " \"version\": \"1\",", + " \"code\": \"INVALID_PARAMETER\",", + " \"display\": \"Required parameter(s) are invalid.\"", + " }", + " ]", + " },", + " \"diagnostics\": \"Invalid request with error - status parameter is invalid.\",", + " \"severity\": \"error\"", + " }", + " ]", + "}", + "", + "const responseJson = pm.response.json();", + "", + "pm.test(\"Status code is 422\", function () {", + " pm.response.to.have.status(422);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9000000017&status=test", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9000000017" + }, + { + "key": "status", + "value": "test" + } + ] + } + }, + "response": [] + }, + { + "name": "Invalid include parameter", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"resourceType\": \"OperationOutcome\",", + " \"issue\": [", + " {", + " \"code\": \"invalid\",", + " \"details\": {", + " \"coding\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", + " \"version\": \"1\",", + " \"code\": \"INVALID_PARAMETER\",", + " \"display\": \"Required parameter(s) are invalid.\"", + " }", + " ]", + " },", + " \"diagnostics\": \"Invalid request with error - _include parameter is invalid.\",", + " \"severity\": \"error\"", + " }", + " ]", + "}", + "", + "const responseJson = pm.response.json();", + "", + "pm.test(\"Status code is 422\", function () {", + " pm.response.to.have.status(422);", + "});", + "", + "pm.test(\"Should have correct error response\", () => {", + " pm.expect(responseJson.issue[0].details.coding[0].code).to.eql(\"INVALID_PARAMETER\");", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9000000019&_include=test", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9000000019" + }, + { + "key": "_include", + "value": "test" + } + ] + } + }, + "response": [] + }, + { + "name": "Single mother-child relationship unknown legal basis", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"resourceType\": \"Bundle\",", + " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", + " \"total\": 1,", + " \"type\": \"searchset\",", + " \"link\": [", + " {", + " \"relation\": \"self\",", + " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000111\"", + " }", + " ],", + " \"entry\": [", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/AF974742\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"AF974742\",", + " \"status\": \"active\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ],", + " \"text\": \"Patient Privacy Consent\"", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", + " \"code\": \"INFA\",", + " \"display\": \"Information Access\"", + " }", + " ],", + " \"text\": \"Information Access Consent\"", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000119\"", + " }", + " },", + " \"dateTime\": \"2024-07-21T17:32:28Z\",", + " \"policy\": [", + " {", + " \"authority\": \"https://www.england.nhs.uk\",", + " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\",", + " \"code\": \"unknown\",", + " \"display\": \"Unknown legal basis\"", + " }", + " ],", + " \"provision\": {", + " \"actor\": [", + " {", + " \"reference\": {", + " \"identifier\": {", + " \"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\"", + " }", + " },", + " \"extension\": [", + " {", + " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", + " \"valueCodeableConcept\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",", + " \"code\": \"ROLE_CREATED\",", + " \"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\": \"9000000111\"", + " }", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " }", + " ]", + "}", + "", + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " const responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9000000111", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9000000111" + } + ] + } + }, + "response": [] + }, + { + "name": "No performer record found", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"resourceType\": \"OperationOutcome\",", + " \"issue\": [", + " { ", + " \"code\": \"processing\",", + " \"details\": {", + " \"coding\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", + " \"version\": \"1\",", + " \"code\": \"INVALIDATED_RESOURCE\",", + " \"display\": \"Resource that has been marked as invalid was requested - invalid resources cannot be retrieved\"", + " }", + " ]", + " },", + " \"diagnostics\": \"Resource that has been marked as invalid was requested - invalid resources cannot be retrieved\",", + " \"severity\": \"error\",", + " ", + " }", + " ]", + "}", + "", + "const responseJson = pm.response.json();", + "", + "pm.test(\"Status code is 404\", function () {", + " pm.response.to.have.status(404);", + "});", + "", + "pm.test(\"Should have correct error response\", () => {", + " pm.expect(responseJson.issue[0].details.coding[0].code).to.eql(\"INVALIDATED_RESOURCE\");", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9000000999", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9000000999" + } + ] + } + }, + "response": [] + }, + { + "name": "Invalid performer identifier", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"issue\": [", + " {", + " \"code\": \"invalid\",", + " \"details\": {", + " \"coding\": [", + " {", + " \"code\": \"INVALID_IDENTIFIER_VALUE\",", + " \"display\": \"Required parameter(s) are invalid.\",", + " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", + " \"version\": \"1\"", + " }", + " ]", + " },", + " \"diagnostics\": \"Invalid request with error - performer:identifier or patient:identifier parameter is invalid.\",", + " \"severity\": \"error\"", + " }", + " ],", + " \"resourceType\": \"OperationOutcome\"", + "}", + "", + "const responseJson = pm.response.json();", + "", + "pm.test(\"Status code is 422\", function () {", + " pm.response.to.have.status(422);", + "});", + "", + "pm.test(\"Should have correct error response\", () => {", + " pm.expect(responseJson.issue[0].details.coding[0].code).to.eql(\"INVALID_IDENTIFIER_VALUE\");", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=90000009990", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "90000009990" + } + ] + } + }, + "response": [] + }, + { + "name": "Invalid performer identifier system", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"issue\": [", + " {", + " \"code\": \"invalid\",", + " \"details\": {", + " \"coding\": [", + " {", + " \"code\": \"INVALID_IDENTIFIER_SYSTEM\",", + " \"display\": \"Required parameter(s) are invalid.\",", + " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", + " \"version\": \"1\"", + " }", + " ]", + " },", + " \"diagnostics\": \"Invalid request with error - performer:identifier or patient:identifier system parameter is invalid.\",", + " \"severity\": \"error\"", + " }", + " ],", + " \"resourceType\": \"OperationOutcome\"", + "}", + "", + "const responseJson = pm.response.json();", + "", + "pm.test(\"Status code is 422\", function () {", + " pm.response.to.have.status(422);", + "});", + "", + "pm.test(\"Should have correct error response\", () => {", + " pm.expect(responseJson.issue[0].details.coding[0].code).to.eql(\"INVALID_IDENTIFIER_SYSTEM\");", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=https://fhir.nhs.uk/Id/nhs-number|1234567890", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "https://fhir.nhs.uk/Id/nhs-number|1234567890" + } + ] + } + }, + "response": [] + }, + { + "name": "Missing performer identifier value", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"issue\": [", + " {", + " \"code\": \"invalid\",", + " \"details\": {", + " \"coding\": [", + " {", + " \"code\": \"MISSING_IDENTIFIER_VALUE\",", + " \"display\": \"Required parameter(s) are missing.\",", + " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", + " \"version\": \"1\"", + " }", + " ]", + " },", + " \"diagnostics\": \"Invalid request with error - performer:identifier or patient:identifier parameter not found.\",", + " \"severity\": \"error\"", + " }", + " ],", + " \"resourceType\": \"OperationOutcome\"", + "}", + "", + "const responseJson = pm.response.json();", + "", + "pm.test(\"Status code is 400\", function () {", + " pm.response.to.have.status(400);", + "});", + "", + "pm.test(\"Should have correct error response\", () => {", + " pm.expect(responseJson.issue[0].details.coding[0].code).to.eql(\"MISSING_IDENTIFIER_VALUE\");", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{api_base_url}}/Consent", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ] + } + }, + "response": [] + }, + { + "name": "GP Practice not found", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"issue\": [", + " {", + " \"code\": \"processing\",", + " \"details\": {", + " \"coding\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", + " \"version\": \"1\",", + " \"code\": \"GP_PRACTICE_NOT_FOUND\",", + " \"display\": \"GP Practice could not be found - invalid resources cannot be retrieved\"", + " }", + " ]", + " },", + " \"diagnostics\": \"GP Practice could not be found\",", + " \"severity\": \"error\"", + " }", + " ],", + " \"resourceType\": \"OperationOutcome\"", + "}", + "", + "const responseJson = pm.response.json();", + "", + "pm.test(\"Status code is 404\", function () {", + " pm.response.to.have.status(404);", + "});", + "", + "pm.test(\"Should have correct error response\", () => {", + " pm.expect(responseJson.issue[0].details.coding[0].code).to.eql(\"GP_PRACTICE_NOT_FOUND\");", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9000000012", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9000000012" + } + ] + } + }, + "response": [] + } + ], + "description": "The GET /Consent is for retrieving confirmed proxy relationships via the Validated Relationship Service.\n\nThis folder contains requests covering different scenarios for users with different types of proxy relationship. Also includes error scenarios.\n\nFor more details, please refer to the [GET Consent OAS page for the Validated Relationship Service on the NHS England website.](https://digital.nhs.uk/developer/api-catalogue/validated-relationship-service#get-/Consent)" + }, + { + "name": "Create a proxy role (Consent)", + "item": [ + { + "name": "Parent-child proxy creation", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"resourceType\": \"OperationOutcome\",", + " \"issue\": [", + " {", + " \"severity\": \"information\",", + " \"code\": \"informational\"", + " }", + " ]", + "}", + "", + "pm.test(\"Status code is 201\", function () {", + " pm.response.to.have.status(201);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " var responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});", + "", + "pm.test(\"Location header is returned\", () => {", + " pm.response.to.have.header(\"Location\", \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/90b9863e-e33c-4895-a333-fd0ea0e23205\")", + "})" + ], + "type": "text/javascript", + "packages": {}, + "requests": {} + } + } + ], + "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 \"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\": \"9000000012\"\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\": \"9000000009\"\n }\n }\n ],\n \"provision\": [{\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\": \"9000000009\"\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" + } + } + }, + "url": { + "raw": "{{api_base_url}}/Consent", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ] + } + }, + "response": [] + }, + { + "name": "Adult-adult proxy creation", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"resourceType\": \"OperationOutcome\",", + " \"issue\": [", + " {", + " \"severity\": \"information\",", + " \"code\": \"informational\"", + " }", + " ]", + "}", + "", + "pm.test(\"Status code is 201\", function () {", + " pm.response.to.have.status(201);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " var responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});", + "", + "pm.test(\"Location header is returned\", () => {", + " pm.response.to.have.header(\"Location\", \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/90b9863e-e33c-4895-a333-fd0ea0e23205\")", + "})" + ], + "type": "text/javascript", + "packages": {}, + "requests": {} + } + } + ], + "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 \"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\": \"9000000012\"\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\": \"9000000017\"\n }\n }\n ],\n \"provision\": [{\n \"period\": {\n \"start\": \"2025-02-11\"\n },\n \"actor\": [\n {\n \"role\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"GUARD\",\n \"display\": \"Guardian\"\n }\n ]\n },\n \"reference\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000017\"\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" + } + } + }, + "url": { + "raw": "{{api_base_url}}/Consent", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ] + } + }, + "response": [] + }, + { + "name": "Invalid performer NHS number", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"issue\": [", + " {", + " \"code\": \"invalid\",", + " \"diagnostics\": \"Not a valid NHS Number provided for the Performer identifier parameter\",", + " \"details\": {", + " \"coding\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", + " \"version\": \"1\",", + " \"code\": \"INVALID_IDENTIFIER\",", + " \"display\": \"Provided value is invalid\"", + " }", + " ]", + " },", + " \"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": {}, + "requests": {} + } + } + ], + "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 \"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\": \"9000000012\"\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\": \"9000000000\"\n }\n }\n ],\n \"provision\": [{\n \"period\": {\n \"start\": \"2025-02-11\"\n },\n \"actor\": [\n {\n \"role\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"GUARD\",\n \"display\": \"Guardian\"\n }\n ]\n },\n \"reference\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000000\"\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" + } + } + }, + "url": { + "raw": "{{api_base_url}}/Consent", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ] + } + }, + "response": [] + }, + { + "name": "Missing free text", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"issue\": [", + " {", + " \"code\": \"invalid\",", + " \"diagnostics\": \"Free text is required when reason code is OTHER.\",", + " \"details\": {", + " \"coding\": [", + " {", + " \"code\": \"MISSING_FREE_TEXT_FOR_OTHER\",", + " \"display\": \"Free text must be provided for OTHER reason codes.\",", + " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", + " \"version\": \"1\"", + " }", + " ]", + " },", + " \"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 \"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\": \"9000000050\"\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\": \"9000000050\"\n }\n }\n ],\n \"provision\": {\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\": \"9000000050\"\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" + } + } + }, + "url": { + "raw": "{{api_base_url}}/Consent", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ] + } + }, + "response": [] + }, + { + "name": "Duplicate relationship", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"issue\": [", + " {", + " \"code\": \"invalid\",", + " \"diagnostics\": \"Proxy role already exists.\",", + " \"details\": {", + " \"coding\": [", + " {", + " \"code\": \"DUPLICATE_RELATIONSHIP\",", + " \"display\": \"Request must be for a new proxy role.\",", + " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", + " \"version\": \"1\"", + " }", + " ]", + " },", + " \"severity\": \"error\"", + " }", + " ],", + " \"resourceType\": \"OperationOutcome\"", + "}", + "", + "pm.test(\"Status code is 409\", function () {", + " pm.response.to.have.status(409);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " var responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});", + "" + ], + "type": "text/javascript", + "packages": {}, + "requests": {} + } + } + ], + "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 \"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\": \"9000000000\"\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\": \"9000000049\"\n }\n }\n ],\n \"provision\": [{\n \"period\": {\n \"start\": \"2025-02-11\"\n },\n \"actor\": [\n {\n \"role\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"GUARD\",\n \"display\": \"Guardian\"\n }\n ]\n },\n \"reference\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000049\"\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" + } + } + }, + "url": { + "raw": "{{api_base_url}}/Consent", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ] + } + }, + "response": [] + } + ], + "description": "The POST /Consent is for storing confirmed proxy relationships via the Validated Relationships Service.\n\nThis folder contains requests covering different scenarios for users with different types of proxy relationship. Also includes error scenarios.\n\nFor more details, please refer to the [POST Consent OAS page for the Validated Relationship Service on the NHS England website.](https://digital.nhs.uk/developer/api-catalogue/validated-relationship-service#post-/Consent)" + }, + { + "name": "Get proxy role (Consent)", + "item": [ + { + "name": "Retrieve consenting adult relationship", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"resourceType\": \"Bundle\",", + " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", + " \"total\": 1,", + " \"type\": \"searchset\",", + " \"link\": [", + " {", + " \"relation\": \"self\",", + " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000010\"", + " }", + " ],", + " \"entry\": [", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/WWCC67T1\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"WWCC67T1\",", + " \"status\": \"active\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ],", + " \"text\": \"Patient Privacy Consent\"", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", + " \"code\": \"INFA\",", + " \"display\": \"Information Access\"", + " }", + " ],", + " \"text\": \"Information Access Consent\"", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000005\"", + " }", + " },", + " \"dateTime\": \"2024-07-21T17:32:28Z\",", + " \"policy\": [", + " {", + " \"authority\": \"https://www.england.nhs.uk\",", + " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", + " }", + " ],", + " \"provision\": {", + " \"actor\": [", + " {", + " \"reference\": {", + " \"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\"", + " }", + " },", + " \"extension\": [", + " {", + " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", + " \"valueCodeableConcept\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",", + " \"code\": \"ROLE_CREATED\",", + " \"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\": \"9000000010\"", + " }", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " }", + " ]", + "}", + "", + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " const responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{api_base_url}}/Consent/74eed847-ca25-4e76-8cf2-f2c2d7842a7a", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent", + "74eed847-ca25-4e76-8cf2-f2c2d7842a7a" + ] + } + }, + "response": [] + }, + { + "name": "Retrieve consenting adult relationship with patient details", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"resourceType\": \"Bundle\",", + " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", + " \"total\": 1,", + " \"type\": \"searchset\",", + " \"link\": [", + " {", + " \"relation\": \"self\",", + " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000010&_include=Consent:patient\"", + " }", + " ],", + " \"entry\": [", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/DFCC67F5\",", + " \"resource\": {", + " \"resourceType\": \"Patient\",", + " \"id\": \"DFCC67F5\",", + " \"meta\": {", + " \"security\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\",", + " \"code\": \"P9\",", + " \"display\": \"High level verification (P9)\"", + " }", + " ]", + " },", + " \"identifier\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000005\"", + " },", + " {", + " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", + " \"value\": \"ABC1234567\"", + " }", + " ],", + " \"name\": [", + " {", + " \"use\": \"usual\",", + " \"period\": {", + " \"start\": \"2020-01-01\",", + " \"end\": \"2021-12-31\"", + " },", + " \"given\": [", + " \"Sally\"", + " ],", + " \"family\": \"Evans\",", + " \"prefix\": [", + " \"Mrs\"", + " ]", + " }", + " ],", + " \"birthDate\": \"1995-10-22\",", + " \"generalPractitioner\": [", + " {", + " \"identifier\": {", + " \"value\": \"ODS12345\",", + " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"include\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/WWCC67T1\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"WWCC67T1\",", + " \"status\": \"active\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ],", + " \"text\": \"Patient Privacy Consent\"", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", + " \"code\": \"INFA\",", + " \"display\": \"Information Access\"", + " }", + " ],", + " \"text\": \"Information Access Consent\"", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000005\"", + " }", + " },", + " \"dateTime\": \"2024-07-21T17:32:28Z\",", + " \"policy\": [", + " {", + " \"authority\": \"https://www.england.nhs.uk\",", + " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", + " }", + " ],", + " \"provision\": {", + " \"actor\": [", + " {", + " \"reference\": {", + " \"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\": \"2026-02-11\",", + " \"start\": \"2025-02-11\"", + " }", + " },", + " \"extension\": [", + " {", + " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", + " \"valueCodeableConcept\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",", + " \"code\": \"ROLE_CREATED\",", + " \"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\": \"9000000010\"", + " }", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " }", + " ]", + "}", + "", + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " const responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{api_base_url}}/Consent/74eed847-ca25-4e76-8cf2-f2c2d7842a7a?_include=Consent:patient", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent", + "74eed847-ca25-4e76-8cf2-f2c2d7842a7a" + ], + "query": [ + { + "key": "_include", + "value": "Consent:patient" + } + ] + } + }, + "response": [] + }, + { + "name": "Retrieve consenting adult relationship with performer details", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"resourceType\": \"Bundle\",", + " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", + " \"total\": 1,", + " \"type\": \"searchset\",", + " \"link\": [", + " {", + " \"relation\": \"self\",", + " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000010&_include=Consent:performer\"", + " }", + " ],", + " \"entry\": [", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/RP974720\",", + " \"resource\": {", + " \"resourceType\": \"RelatedPerson\",", + " \"id\": \"RP974720\",", + " \"identifier\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000010\"", + " },", + " {", + " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", + " \"value\": \"ABC0000008\"", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000005\"", + " }", + " },", + " \"relationship\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\",", + " \"code\": \"Personal\",", + " \"display\": \"Personal relationship with the patient\"", + " }", + " ]", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"include\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/WWCC67T1\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"WWCC67T1\",", + " \"status\": \"active\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ],", + " \"text\": \"Patient Privacy Consent\"", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", + " \"code\": \"INFA\",", + " \"display\": \"Information Access\"", + " }", + " ],", + " \"text\": \"Information Access Consent\"", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000005\"", + " }", + " },", + " \"dateTime\": \"2024-07-21T17:32:28Z\",", + " \"policy\": [", + " {", + " \"authority\": \"https://www.england.nhs.uk\",", + " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", + " }", + " ],", + " \"provision\": {", + " \"actor\": [", + " {", + " \"reference\": {", + " \"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\": \"2026-02-11\",", + " \"start\": \"2025-02-11\"", + " }", + " },", + " \"extension\": [", + " {", + " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", + " \"valueCodeableConcept\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",", + " \"code\": \"ROLE_CREATED\",", + " \"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\": \"9000000010\"", + " }", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " }", + " ]", + "}", + "", + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " const responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{api_base_url}}/Consent/74eed847-ca25-4e76-8cf2-f2c2d7842a7a?_include=Consent:performer", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent", + "74eed847-ca25-4e76-8cf2-f2c2d7842a7a" + ], + "query": [ + { + "key": "_include", + "value": "Consent:performer" + } + ] + } + }, + "response": [] + }, + { + "name": "Retrieve consenting adult relationship with performer and patient details", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"resourceType\": \"Bundle\",", + " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", + " \"total\": 1,", + " \"type\": \"searchset\",", + " \"link\": [", + " {", + " \"relation\": \"self\",", + " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000010&_include=Consent:performer&_include=Consent:patient\"", + " }", + " ],", + " \"entry\": [", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/RP974720\",", + " \"resource\": {", + " \"resourceType\": \"RelatedPerson\",", + " \"id\": \"RP974720\",", + " \"identifier\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000010\"", + " },", + " {", + " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", + " \"value\": \"ABC0000008\"", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000005\"", + " }", + " },", + " \"relationship\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\",", + " \"code\": \"Personal\",", + " \"display\": \"Personal relationship with the patient\"", + " }", + " ]", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"include\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/DFCC67F5\",", + " \"resource\": {", + " \"resourceType\": \"Patient\",", + " \"id\": \"DFCC67F5\",", + " \"meta\": {", + " \"security\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\",", + " \"code\": \"P9\",", + " \"display\": \"High level verification (P9)\"", + " }", + " ]", + " },", + " \"identifier\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000005\"", + " },", + " {", + " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", + " \"value\": \"ABC1234567\"", + " }", + " ],", + " \"name\": [", + " {", + " \"use\": \"usual\",", + " \"period\": {", + " \"start\": \"2020-01-01\",", + " \"end\": \"2021-12-31\"", + " },", + " \"given\": [", + " \"Sally\"", + " ],", + " \"family\": \"Evans\",", + " \"prefix\": [", + " \"Mrs\"", + " ]", + " }", + " ],", + " \"birthDate\": \"1995-10-22\",", + " \"generalPractitioner\": [", + " {", + " \"identifier\": {", + " \"value\": \"ODS12345\",", + " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"include\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/WWCC67T1\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"WWCC67T1\",", + " \"status\": \"active\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ],", + " \"text\": \"Patient Privacy Consent\"", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", + " \"code\": \"INFA\",", + " \"display\": \"Information Access\"", + " }", + " ],", + " \"text\": \"Information Access Consent\"", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000005\"", + " }", + " },", + " \"dateTime\": \"2024-07-21T17:32:28Z\",", + " \"policy\": [", + " {", + " \"authority\": \"https://www.england.nhs.uk\",", + " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", + " }", + " ],", + " \"provision\": {", + " \"actor\": [", + " {", + " \"reference\": {", + " \"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\": \"2026-02-11\",", + " \"start\": \"2025-02-11\"", + " }", + " },", + " \"extension\": [", + " {", + " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", + " \"valueCodeableConcept\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",", + " \"code\": \"ROLE_CREATED\",", + " \"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\": \"9000000010\"", + " }", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " }", + " ]", + "}", + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " const responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{api_base_url}}/Consent/74eed847-ca25-4e76-8cf2-f2c2d7842a7a?_include=Consent:performer&_include=Consent:patient", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent", + "74eed847-ca25-4e76-8cf2-f2c2d7842a7a" + ], + "query": [ + { + "key": "_include", + "value": "Consent:performer" + }, + { + "key": "_include", + "value": "Consent:patient" + } + ] + } + }, + "response": [] + }, + { + "name": "Retrieve mother-child relationship", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"resourceType\": \"Bundle\",", + " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", + " \"total\": 1,", + " \"type\": \"searchset\",", + " \"link\": [", + " {", + " \"relation\": \"self\",", + " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000019\"", + " }", + " ],", + " \"entry\": [", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBCC67E9\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"BBCC67E9\",", + " \"status\": \"active\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ],", + " \"text\": \"Patient Privacy Consent\"", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", + " \"code\": \"INFA\",", + " \"display\": \"Information Access\"", + " }", + " ],", + " \"text\": \"Information Access Consent\"", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000009\"", + " }", + " },", + " \"dateTime\": \"2024-07-21T17:32:28Z\",", + " \"policy\": [", + " {", + " \"authority\": \"https://www.england.nhs.uk\",", + " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", + " }", + " ],", + " \"provision\": {", + " \"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\"", + " }", + " ]", + " }", + " }", + " ],", + " \"period\": {", + " \"end\": \"2026-02-11\",", + " \"start\": \"2025-02-11\"", + " }", + " },", + " \"extension\": [", + " {", + " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", + " \"valueCodeableConcept\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",", + " \"code\": \"ROLE_CREATED\",", + " \"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\": \"9000000019\"", + " }", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " }", + " ]", + "}", + "", + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " const responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{api_base_url}}/Consent/39df03a2-1b14-4d19-b1dc-d5d8cbf96948", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent", + "39df03a2-1b14-4d19-b1dc-d5d8cbf96948" + ] + } + }, + "response": [] + }, + { + "name": "Retrieve mother-child relationship with patient details", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"resourceType\": \"Bundle\",", + " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", + " \"total\": 1,", + " \"type\": \"searchset\",", + " \"link\": [", + " {", + " \"relation\": \"self\",", + " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000019&_include=Consent:patient\"", + " }", + " ],", + " \"entry\": [", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/A3CC67E2\",", + " \"resource\": {", + " \"resourceType\": \"Patient\",", + " \"id\": \"A3CC67E2\",", + " \"meta\": {", + " \"security\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\",", + " \"code\": \"P9\",", + " \"display\": \"High level verification (P9)\"", + " }", + " ]", + " },", + " \"identifier\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000009\"", + " },", + " {", + " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", + " \"value\": \"ABC1234556\"", + " }", + " ],", + " \"name\": [", + " {", + " \"use\": \"usual\",", + " \"period\": {", + " \"start\": \"2020-01-01\",", + " \"end\": \"2021-12-31\"", + " },", + " \"given\": [", + " \"Jane Marie Anne\"", + " ],", + " \"family\": \"Smith\",", + " \"prefix\": [", + " \"Mrs\"", + " ],", + " \"suffix\": [", + " \"MBE\",", + " \"PhD\"", + " ]", + " }", + " ],", + " \"birthDate\": \"2022-10-22\",", + " \"generalPractitioner\": [", + " {", + " \"identifier\": {", + " \"value\": \"ODS12345\",", + " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"include\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBCC67E9\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"BBCC67E9\",", + " \"status\": \"active\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ],", + " \"text\": \"Patient Privacy Consent\"", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", + " \"code\": \"INFA\",", + " \"display\": \"Information Access\"", + " }", + " ],", + " \"text\": \"Information Access Consent\"", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000009\"", + " }", + " },", + " \"dateTime\": \"2024-07-21T17:32:28Z\",", + " \"policy\": [", + " {", + " \"authority\": \"https://www.england.nhs.uk\",", + " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", + " }", + " ],", + " \"provision\": {", + " \"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\"", + " }", + " ]", + " }", + " }", + " ]", + " },", + " \"extension\": [", + " {", + " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", + " \"valueCodeableConcept\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",", + " \"code\": \"ROLE_CREATED\",", + " \"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\": \"9000000019\"", + " }", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " }", + " ]", + "}", + "", + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " const responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{api_base_url}}/Consent/39df03a2-1b14-4d19-b1dc-d5d8cbf96948?_include=Consent:patient", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent", + "39df03a2-1b14-4d19-b1dc-d5d8cbf96948" + ], + "query": [ + { + "key": "_include", + "value": "Consent:patient" + } + ] + } + }, + "response": [] + }, + { + "name": "Retrieve mother-child relationship with performer details", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"resourceType\": \"Bundle\",", + " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", + " \"total\": 1,", + " \"type\": \"searchset\",", + " \"link\": [", + " {", + " \"relation\": \"self\",", + " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000019&_include=Consent:performer\"", + " }", + " ],", + " \"entry\": [", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/BE974742\",", + " \"resource\": {", + " \"resourceType\": \"RelatedPerson\",", + " \"id\": \"BE974742\",", + " \"identifier\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000019\"", + " },", + " {", + " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", + " \"value\": \"ABC0000001\"", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000009\"", + " }", + " },", + " \"relationship\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", + " \"code\": \"PRN\",", + " \"display\": \"parent\"", + " }", + " ]", + " },", + " {", + " \"coding\":[", + " {", + " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", + " \"code\": \"MTH\",", + " \"display\": \"mother\"", + " }", + " ]", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"include\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBCC67E9\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"BBCC67E9\",", + " \"status\": \"active\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ],", + " \"text\": \"Patient Privacy Consent\"", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", + " \"code\": \"INFA\",", + " \"display\": \"Information Access\"", + " }", + " ],", + " \"text\": \"Information Access Consent\"", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000009\"", + " }", + " },", + " \"dateTime\": \"2024-07-21T17:32:28Z\",", + " \"provision\": {", + " \"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\"", + " }", + " ]", + " }", + " }", + " ],", + " \"period\": {", + " \"end\": \"2026-02-11\",", + " \"start\": \"2025-02-11\"", + " }", + " },", + " \"extension\": [", + " {", + " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", + " \"valueCodeableConcept\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",", + " \"code\": \"ROLE_CREATED\",", + " \"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\": \"9000000019\"", + " }", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " }", + " ]", + "}", + "", + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " const responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{api_base_url}}/Consent/39df03a2-1b14-4d19-b1dc-d5d8cbf96948?_include=Consent:performer", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent", + "39df03a2-1b14-4d19-b1dc-d5d8cbf96948" + ], + "query": [ + { + "key": "_include", + "value": "Consent:performer" + } + ] + } + }, + "response": [] + }, + { + "name": "Retrieve mother-child relationship with performer and patient details", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"resourceType\": \"Bundle\",", + " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", + " \"total\": 1,", + " \"type\": \"searchset\",", + " \"link\": [", + " {", + " \"relation\": \"self\",", + " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000019&_include=Consent:performer&_include=Consent:patient\"", + " }", + " ],", + " \"entry\": [", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/BE974742\",", + " \"resource\": {", + " \"resourceType\": \"RelatedPerson\",", + " \"id\": \"BE974742\",", + " \"identifier\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000019\"", + " },", + " {", + " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", + " \"value\": \"ABC0000001\"", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000009\"", + " }", + " },", + " \"relationship\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", + " \"code\": \"PRN\",", + " \"display\": \"parent\"", + " }", + " ]", + " },", + " {", + " \"coding\": [", + " {", + " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", + " \"code\": \"MTH\",", + " \"display\": \"mother\"", + " }", + " ]", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"include\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/A3CC67E2\",", + " \"resource\": {", + " \"resourceType\": \"Patient\",", + " \"id\": \"A3CC67E2\",", + " \"meta\": {", + " \"security\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\",", + " \"code\": \"P9\",", + " \"display\": \"High level verification (P9)\"", + " }", + " ]", + " },", + " \"identifier\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000009\"", + " },", + " {", + " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", + " \"value\": \"ABC1234556\"", + " }", + " ],", + " \"name\": [", + " {", + " \"use\": \"usual\",", + " \"period\": {", + " \"start\": \"2020-01-01\",", + " \"end\": \"2021-12-31\"", + " },", + " \"given\": [", + " \"Jane Marie Anne\"", + " ],", + " \"family\": \"Smith\",", + " \"prefix\": [", + " \"Mrs\"", + " ],", + " \"suffix\": [", + " \"MBE\",", + " \"PhD\"", + " ]", + " }", + " ],", + " \"birthDate\": \"2022-10-22\",", + " \"generalPractitioner\": [", + " {", + " \"identifier\": {", + " \"value\": \"ODS12345\",", + " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"include\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBCC67E9\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"BBCC67E9\",", + " \"status\": \"active\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ],", + " \"text\": \"Patient Privacy Consent\"", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", + " \"code\": \"INFA\",", + " \"display\": \"Information Access\"", + " }", + " ],", + " \"text\": \"Information Access Consent\"", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000009\"", + " }", + " },", + " \"dateTime\": \"2024-07-21T17:32:28Z\",", + " \"policy\": [", + " {", + " \"authority\": \"https://www.england.nhs.uk\",", + " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", + " }", + " ],", + " \"provision\": {", + " \"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\"", + " }", + " ]", + " }", + " }", + " ],", + " \"period\": {", + " \"end\": \"2026-02-11\",", + " \"start\": \"2025-02-11\"", + " }", + " },", + " \"extension\": [", + " {", + " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", + " \"valueCodeableConcept\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",", + " \"code\": \"ROLE_CREATED\",", + " \"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\": \"9000000019\"", + " }", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " }", + " ]", + "}", + "", + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " const responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{api_base_url}}/Consent/39df03a2-1b14-4d19-b1dc-d5d8cbf96948?_include=Consent:performer&_include=Consent:patient", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent", + "39df03a2-1b14-4d19-b1dc-d5d8cbf96948" + ], + "query": [ + { + "key": "_include", + "value": "Consent:performer" + }, + { + "key": "_include", + "value": "Consent:patient" + } + ] + } + }, + "response": [] + }, + { + "name": "Invalid consent ID", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"issue\": [", + " {", + " \"code\": \"invalid\",", + " \"details\": {", + " \"coding\": [", + " {", + " \"code\": \"INVALID_ID_VALUE\",", + " \"display\": \"Required parameter(s) are invalid.\",", + " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", + " \"version\": \"1\"", + " }", + " ]", + " },", + " \"diagnostics\": \"Invalid request with error - ID must be a valid UUID.\",", + " \"severity\": \"error\"", + " }", + " ],", + " \"resourceType\": \"OperationOutcome\"", + "}", + "", + "const responseJson = pm.response.json();", + "", + "pm.test(\"Status code is 400\", function () {", + " pm.response.to.have.status(400);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{api_base_url}}/Consent/invalid-identifier", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent", + "invalid-identifier" + ] + } + }, + "response": [] + }, + { + "name": "Invalid include parameter", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"resourceType\": \"OperationOutcome\",", + " \"issue\": [", + " {", + " \"code\": \"invalid\",", + " \"details\": {", + " \"coding\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", + " \"version\": \"1\",", + " \"code\": \"INVALID_PARAMETER\",", + " \"display\": \"Required parameter(s) are invalid.\"", + " }", + " ]", + " },", + " \"diagnostics\": \"Invalid request with error - _include parameter is invalid.\",", + " \"severity\": \"error\"", + " ", + " }", + " ],", + "}", + "", + "const responseJson = pm.response.json();", + "", + "pm.test(\"Status code is 422\", function () {", + " pm.response.to.have.status(422);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{api_base_url}}/Consent/39df03a2-1b14-4d19-b1dc-d5d8cbf96948?_include=Consent:invalid", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent", + "39df03a2-1b14-4d19-b1dc-d5d8cbf96948" + ], + "query": [ + { + "key": "_include", + "value": "Consent:invalid" + } + ] + } + }, + "response": [] + }, + { + "name": "Invalid parameters", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"resourceType\": \"OperationOutcome\",", + " \"issue\": [", + " {", + " \"code\": \"invalid\",", + " \"details\": {", + " \"coding\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", + " \"version\": \"1\",", + " \"code\": \"INVALID_PARAMETER\",", + " \"display\": \"Required parameter(s) are invalid.\"", + " }", + " ]", + " },", + " \"diagnostics\": \"Invalid request with error - _include parameter is invalid.\",", + " \"severity\": \"error\"", + " }", + " ],", + "}", + "", + "const responseJson = pm.response.json();", + "", + "pm.test(\"Status code is 422\", function () {", + " pm.response.to.have.status(422);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{api_base_url}}/Consent/74eed847-ca25-4e76-8cf2-f2c2d7842a7a?_unknown=true", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent", + "74eed847-ca25-4e76-8cf2-f2c2d7842a7a" + ], + "query": [ + { + "key": "_unknown", + "value": "true" + } + ] + } + }, + "response": [] + }, + { + "name": "Proxy role not found", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"issue\": [", + " {", + " \"code\": \"processing\",", + " \"details\": {", + " \"coding\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", + " \"version\": \"1\",", + " \"code\": \"INVALIDATED_RESOURCE\",", + " \"display\": \"Resource that has been marked as invalid was requested - invalid resources cannot be retrieved\"", + " }", + " ]", + " },", + " \"diagnostics\": \"Resource that has been marked as invalid was requested - invalid resources cannot be retrieved\",", + " \"severity\": \"error\"", + " }", + " ],", + " \"resourceType\": \"OperationOutcome\"", + "}", + "", + "const responseJson = pm.response.json();", + "", + "pm.test(\"Status code is 404\", function () {", + " pm.response.to.have.status(404);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{api_base_url}}/Consent/a0922245-1072-40c3-8f4e-a7490c10d365", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent", + "a0922245-1072-40c3-8f4e-a7490c10d365" + ] + } + }, + "response": [] + } + ], + "description": "The GET /Consent/{ID} is for retrieving the details of a single proxy relationship, including current status, based on a provided id.\n\nThis folder contains requests covering different scenarios for users with different types of proxy relationships. It also includes error scenarios.\n\nFor more details, please refer to the [GET Consent by ID OAS page for the Validated Relationship Service on the NHS England website.](https://digital.nhs.uk/developer/api-catalogue/validated-relationship-service#get-/Consent/%7Bid%7D)" + }, + { + "name": "Update a proxy role (Consent)", + "item": [ + { + "name": "Status update", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"resourceType\": \"OperationOutcome\",", + " \"issue\": [", + " {", + " \"severity\": \"information\",", + " \"code\": \"informational\"", + " }", + " ]", + "}", + "", + "pm.test(\"Status code is 201\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " var responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {}, + "requests": {} + } + } + ], + "request": { + "method": "PATCH", + "header": [], + "body": { + "mode": "raw", + "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.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 patients request\"\n }\n ]\n }\n }\n ]\n }\n]", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{api_base_url}}/Consent/74eed847-ca25-4e76-8cf2-f2c2d7842a7a", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent", + "74eed847-ca25-4e76-8cf2-f2c2d7842a7a" + ] + }, + "description": "Valid patch changing status to 'active'" + }, + "response": [] + }, + { + "name": "Missing free text for Other", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"issue\": [", + " {", + " \"code\": \"invalid\",", + " \"diagnostics\": \"Free text is required when reason code is OTHER.\",", + " \"details\": {", + " \"coding\": [", + " {", + " \"code\": \"MISSING_FREE_TEXT_FOR_OTHER\",", + " \"display\": \"Free text must be provided for OTHER reason codes.\",", + " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", + " \"version\": \"1\"", + " }", + " ]", + " },", + " \"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\": \"inactive\"\n }\n]", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{api_base_url}}/Consent/d4e8a6f2-1c3b-4a7e-9d2f-8b5c7e9f1a3d", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent", + "d4e8a6f2-1c3b-4a7e-9d2f-8b5c7e9f1a3d" + ] + }, + "description": "Valid patch changing status to 'active'" + }, + "response": [] + }, + { + "name": "Access level update", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"resourceType\": \"OperationOutcome\",", + " \"issue\": [", + " {", + " \"severity\": \"information\",", + " \"code\": \"informational\"", + " }", + " ]", + "}", + "", + "pm.test(\"Status code is 201\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " var responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {}, + "requests": {} + } + } + ], + "request": { + "method": "PATCH", + "header": [], + "body": { + "mode": "raw", + "raw": "[\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/6b71ac92-baa3-4b76-b0f5-a601257e2722", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent", + "6b71ac92-baa3-4b76-b0f5-a601257e2722" + ] + }, + "description": "Valid patch modifying the role end date" + }, + "response": [] + }, + { + "name": "Multiple valid changes", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"resourceType\": \"OperationOutcome\",", + " \"issue\": [", + " {", + " \"severity\": \"information\",", + " \"code\": \"informational\"", + " }", + " ]", + "}", + "", + "pm.test(\"Status code is 201\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " var responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {}, + "requests": {} + } + } + ], + "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.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 {\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/43003db8-ffcd-4bd6-ab2f-b49b9656f9e5", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent", + "43003db8-ffcd-4bd6-ab2f-b49b9656f9e5" + ] + }, + "description": "Valid patch modifying the role end date" + }, + "response": [] + }, + { + "name": "Invalid status code", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"issue\": [", + " {", + " \"code\": \"invalid\",", + " \"diagnostics\": \"Invalid status code.\",", + " \"details\": {", + " \"coding\": [", + " {", + " \"code\": \"INVALID_STATUS_CODE\",", + " \"display\": \"Status code is invalid.\",", + " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", + " \"version\": \"1\"", + " }", + " ]", + " },", + " \"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": {}, + "requests": {} + } + } + ], + "request": { + "method": "PATCH", + "header": [], + "body": { + "mode": "raw", + "raw": "[\n {\n \"op\": \"replace\",\n \"path\": \"/status\",\n \"value\": \"someinvalidcode\"\n },\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 patients request\"\n }\n ]\n }\n }\n ]\n }\n]", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{api_base_url}}/Consent/78c35330-fa2f-4934-a5dd-fff847f38de5", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent", + "78c35330-fa2f-4934-a5dd-fff847f38de5" + ] + }, + "description": "Patch with invalid status value" + }, + "response": [] + }, + { + "name": "Invalid path", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"issue\": [", + " {", + " \"code\": \"invalid\",", + " \"diagnostics\": \"Patch targeting non-existent element.\",", + " \"details\": {", + " \"coding\": [", + " {", + " \"code\": \"INVALID_PATCH_PATH\",", + " \"display\": \"Patch target is invalid.\",", + " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", + " \"version\": \"1\"", + " }", + " ]", + " },", + " \"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": {}, + "requests": {} + } + } + ], + "request": { + "method": "PATCH", + "header": [], + "body": { + "mode": "raw", + "raw": "[\n {\n \"op\": \"replace\",\n \"path\": \"/someotherpath\",\n \"value\": \"active\"\n },\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 patients request\"\n }\n ]\n }\n }\n ]\n }\n]", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{api_base_url}}/Consent/01abb0c5-b1ac-499d-9655-9cd0b8d3588f", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent", + "01abb0c5-b1ac-499d-9655-9cd0b8d3588f" + ] + }, + "description": "Patch targeting non-existent element" + }, + "response": [] + }, + { + "name": "Resource not found", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"issue\": [", + " {", + " \"code\": \"invalid\",", + " \"diagnostics\": \"Proxy role not found.\",", + " \"details\": {", + " \"coding\": [", + " {", + " \"code\": \"RESOURCE_NOT_FOUND\",", + " \"display\": \"Request must be for a existing proxy role.\",", + " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", + " \"version\": \"1\"", + " }", + " ]", + " },", + " \"severity\": \"error\"", + " }", + " ],", + " \"resourceType\": \"OperationOutcome\"", + "}", + "", + "pm.test(\"Status code is 404\", function () {", + " pm.response.to.have.status(404);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " var responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {}, + "requests": {} + } + } + ], + "request": { + "method": "PATCH", + "header": [], + "body": { + "mode": "raw", + "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.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 patients request\"\n }\n ]\n }\n }\n ]\n }\n]", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{api_base_url}}/Consent/0000000", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent", + "0000000" + ] + }, + "description": "Patch for non-existent Consent" + }, + "response": [] + }, + { + "name": "Invalid patch format", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"issue\": [", + " {", + " \"code\": \"invalid\",", + " \"diagnostics\": \"Malformed JSON patch document.\",", + " \"details\": {", + " \"coding\": [", + " {", + " \"code\": \"INVALID_PATCH_FORMAT\",", + " \"display\": \"Request format is invalid.\",", + " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", + " \"version\": \"1\"", + " }", + " ]", + " },", + " \"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]", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{api_base_url}}/Consent/849ea584-2318-471b-a24c-cee1b5ad0137", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent", + "849ea584-2318-471b-a24c-cee1b5ad0137" + ] + }, + "description": "Malformed JSON patch document" + }, + "response": [] + }, + { + "name": "Invalid state transition", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"issue\": [", + " {", + " \"code\": \"invalid\",", + " \"diagnostics\": \"Patch attempting invalid status change.\",", + " \"details\": {", + " \"coding\": [", + " {", + " \"code\": \"INVALID_STATE_TRANSITION\",", + " \"display\": \"Status change is invalid.\",", + " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", + " \"version\": \"1\"", + " }", + " ]", + " },", + " \"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": {}, + "requests": {} + } + } + ], + "request": { + "method": "PATCH", + "header": [], + "body": { + "mode": "raw", + "raw": "[\n {\n \"op\": \"replace\",\n \"path\": \"/status\",\n \"value\": \"someinvalidcode\"\n },\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 patients request\"\n }\n ]\n }\n }\n ]\n }\n]", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{api_base_url}}/Consent/7b7f47b8-96e5-43eb-b733-283bf1449f2c", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent", + "7b7f47b8-96e5-43eb-b733-283bf1449f2c" + ] + } + }, + "response": [] + }, + { + "name": "Invalid Status Reason", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"issue\": [", + " {", + " \"code\": \"invalid\",", + " \"diagnostics\": \"Invalid status reason.\",", + " \"details\": {", + " \"coding\": [", + " {", + " \"code\": \"INVALID_STATUS_REASON\",", + " \"display\": \"Status reason is invalid.\",", + " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", + " \"version\": \"1\"", + " }", + " ]", + " },", + " \"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": {}, + "requests": {} + } + } + ], + "request": { + "method": "PATCH", + "header": [], + "body": { + "mode": "raw", + "raw": "[\n {\n \"op\": \"replace\",\n \"path\": \"/status\",\n \"value\": \"someinvalidcode\"\n },\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 patients request\"\n }\n ]\n }\n }\n ]\n }\n]", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{api_base_url}}/Consent/51fb4df5-815a-45cd-8427-04d6558336b7", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent", + "51fb4df5-815a-45cd-8427-04d6558336b7" + ] + } + }, + "response": [] + } + ], + "description": "Use this endpoint to update an existing proxy role.\n\nCommon update scenarios include:\n\n- Revocation of the role (status change from \"active\" to \"inactive\")\n- Changing the legal basis of the role (TBC)\n- Updating the end date for time-bound access\n \n\nThis folder contains requests covering different scenarios for various valid and invalid update requests.\n\nFor more details, please refer to the [PATCH Consent OAS page for the Validated Relationship Service on the NHS England website.](https://digital.nhs.uk/developer/api-catalogue/validated-relationship-service#patch-/Consent/-id-)" + } + ], + "event": [ + { + "listen": "prerequest", + "script": { + "type": "text/javascript", + "exec": [ + "" + ] + } + }, + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "pm.test(\"Response has FHIR content type\", () => {", + " pm.expect(pm.response.headers.get('Content-Type')).to.include('application/fhir+json');", + "});" + ] + } + } + ], + "variable": [ + { + "key": "api_base_url", + "value": "https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4" + } + ] +>>>>>>> 4689a2b (NPA-6165: Postman Collection Updates) } \ No newline at end of file From a8540f64b8034203323265072ae8a71860b04a16 Mon Sep 17 00:00:00 2001 From: Ellie Bound <175816742+ellie-bound1-NHSD@users.noreply.github.com> Date: Fri, 23 Jan 2026 14:45:26 +0000 Subject: [PATCH 04/10] NPA-6165: UPdate spec --- .../validated-relationships-service-api.yaml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/specification/validated-relationships-service-api.yaml b/specification/validated-relationships-service-api.yaml index c574c422..c6002d5c 100644 --- a/specification/validated-relationships-service-api.yaml +++ b/specification/validated-relationships-service-api.yaml @@ -749,7 +749,7 @@ paths: | 400 | `MISSING_IDENTIFIER_VALUE` | Missing performer or patient identifier. | | 400 | `MISSING_IDENTIFIER_SYSTEM` | Missing performer or patient identifier system. | | 400 | `MISSING_PATIENT` | Missing patient. | - | 400 | `MISSING_PERFORMER` | Missing performer. | + | 400 | `MISSING_GRANTEE` | Missing grantee. | | 400 | `MISSING_STATUS` | Missing status. | | 400 | `MISSING_SCOPE` | Missing scope. | | 400 | `MISSING_CATEGORY` | Missing category. | @@ -762,10 +762,10 @@ paths: | 405 | `METHOD_NOT_ALLOWED` | The method is not allowed. | | 408 | `TIMEOUT` | Request timed out. | | 409 | `DUPLICATE_RELATIONSHIP` | Conflict with requested proxy role. | - | 422 | `INVALID_IDENTIFIER_VALUE` | Invalid performer or patient identifier value. | - | 422 | `INVALID_IDENTIFIER_SYSTEM` | Invalid performer or patient identifier system. | + | 422 | `INVALID_IDENTIFIER_VALUE` | Invalid grantee or patient identifier value. | + | 422 | `INVALID_IDENTIFIER_SYSTEM` | Invalid grantee or patient identifier system. | | 422 | `INVALID_PATIENT` | Invalid patient. | - | 422 | `INVALID_PERFORMER` | Invalid performer. | + | 422 | `INVALID_GRANTEE` | Invalid grantee. | | 422 | `INVALID_STATUS` | Invalid status. | | 422 | `INVALID_SCOPE` | Invalid scope. | | 422 | `INVALID_CATEGORY` | Invalid category. | @@ -2249,6 +2249,7 @@ components: - category - patient - dateTime + - extension description: The details of the consent including who the patient and care "performer" are, status of the relationship and whether consent was given by a patient with capacity. properties: resourceType: @@ -2373,7 +2374,7 @@ components: - "https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee" valueReference: $ref: "#/components/schemas/Identifier" - description: Details for a proxy. + description: Details for proxy. OperationOutcome: type: object From 02eaffcb69a4e20d122da40472d76386674aad92 Mon Sep 17 00:00:00 2001 From: Ellie Bound <175816742+ellie-bound1-NHSD@users.noreply.github.com> Date: Mon, 26 Jan 2026 16:41:58 +0000 Subject: [PATCH 05/10] NPA-6165: Update error respones for post consent --- sandbox/api/constants.py | 1 - sandbox/api/post_consent.py | 5 ----- sandbox/api/tests/test_post_consent.py | 2 -- .../errors/invalid_identifier_value.yaml | 4 ++-- .../invalid_performer_identifier_error.yaml | 15 --------------- .../validated-relationships-service-api.yaml | 7 ++----- 6 files changed, 4 insertions(+), 30 deletions(-) delete mode 100644 specification/examples/responses/POST_Consent/errors/invalid_performer_identifier_error.yaml diff --git a/sandbox/api/constants.py b/sandbox/api/constants.py index 26206a2c..a159a733 100644 --- a/sandbox/api/constants.py +++ b/sandbox/api/constants.py @@ -82,7 +82,6 @@ POST_CONSENT__DIRECTORY = "./api/examples/POST_Consent/" POST_CONSENT__SUCCESS = f"{POST_CONSENT__DIRECTORY}success.yaml" POST_CONSENT__DUPLICATE_RELATIONSHIP_ERROR = f"{POST_CONSENT__DIRECTORY}errors/duplicate_relationship_error.yaml" -POST_CONSENT__PERFORMER_IDENTIFIER_ERROR = f"{POST_CONSENT__DIRECTORY}errors/invalid_performer_identifier_error.yaml" POST_CONSENT__MISSING_FREE_TEXT_FOR_OTHER = f"{POST_CONSENT__DIRECTORY}errors/missing_free_text_for_other.yaml" # PATCH Consent diff --git a/sandbox/api/post_consent.py b/sandbox/api/post_consent.py index 9cf7072f..1bd2bf31 100644 --- a/sandbox/api/post_consent.py +++ b/sandbox/api/post_consent.py @@ -6,7 +6,6 @@ from .constants import ( INTERNAL_SERVER_ERROR_EXAMPLE, POST_CONSENT__DUPLICATE_RELATIONSHIP_ERROR, - POST_CONSENT__PERFORMER_IDENTIFIER_ERROR, POST_CONSENT__SUCCESS, POST_CONSENT__MISSING_FREE_TEXT_FOR_OTHER, ) @@ -40,10 +39,6 @@ def post_consent_response() -> Union[dict, tuple]: elif patient_identifier == "9000000049": response = generate_response_from_example(POST_CONSENT__DUPLICATE_RELATIONSHIP_ERROR, 409) - # Invalid performer NHS number - elif patient_identifier == "9000000000": - response = generate_response_from_example(POST_CONSENT__PERFORMER_IDENTIFIER_ERROR, 422) - elif patient_identifier == "9000000050": # Missing free text for OTHER reason code (should fail) response = generate_response_from_example(POST_CONSENT__MISSING_FREE_TEXT_FOR_OTHER, 400) diff --git a/sandbox/api/tests/test_post_consent.py b/sandbox/api/tests/test_post_consent.py index 29b156f8..c7ce354d 100644 --- a/sandbox/api/tests/test_post_consent.py +++ b/sandbox/api/tests/test_post_consent.py @@ -6,7 +6,6 @@ from sandbox.api.constants import ( POST_CONSENT__DUPLICATE_RELATIONSHIP_ERROR, - POST_CONSENT__PERFORMER_IDENTIFIER_ERROR, POST_CONSENT__SUCCESS, POST_CONSENT__MISSING_FREE_TEXT_FOR_OTHER, ) @@ -29,7 +28,6 @@ 201, "90b9863e-e33c-4895-a333-fd0ea0e23205", ), - ("9000000000", POST_CONSENT__PERFORMER_IDENTIFIER_ERROR, 422, None), ("9000000049", POST_CONSENT__DUPLICATE_RELATIONSHIP_ERROR, 409, None), ( "9000000050", diff --git a/specification/examples/responses/POST_Consent/errors/invalid_identifier_value.yaml b/specification/examples/responses/POST_Consent/errors/invalid_identifier_value.yaml index a4878f3a..2c8aa423 100644 --- a/specification/examples/responses/POST_Consent/errors/invalid_identifier_value.yaml +++ b/specification/examples/responses/POST_Consent/errors/invalid_identifier_value.yaml @@ -10,8 +10,8 @@ PostConsentInvalidIdentifierValueError: display: Invalid identifier value. system: https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode version: "1" - diagnostics: Performer identifier value is invalid + diagnostics: Grantee identifier value is invalid expression: - - "performer[0].identifier.value" + - "extension.grantee.valueReference.identifier.value" severity: error resourceType: OperationOutcome diff --git a/specification/examples/responses/POST_Consent/errors/invalid_performer_identifier_error.yaml b/specification/examples/responses/POST_Consent/errors/invalid_performer_identifier_error.yaml deleted file mode 100644 index 8370a5ba..00000000 --- a/specification/examples/responses/POST_Consent/errors/invalid_performer_identifier_error.yaml +++ /dev/null @@ -1,15 +0,0 @@ -PostConsentInvalidPerformerIdentifierError: - summary: Bad request performer identifier invalid - description: Error response for an invalid performer NHS number - value: - issue: - - code: invalid - diagnostics: "Not a valid NHS Number provided for the Performer identifier parameter" - details: - coding: - - system: "https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode" - version: "1" - code: "INVALID_IDENTIFIER" - display: "Provided value is invalid" - severity: error - resourceType: "OperationOutcome" diff --git a/specification/validated-relationships-service-api.yaml b/specification/validated-relationships-service-api.yaml index c6002d5c..d1bbd16b 100644 --- a/specification/validated-relationships-service-api.yaml +++ b/specification/validated-relationships-service-api.yaml @@ -704,7 +704,6 @@ 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 | - | Invalid performer NHS number | Request with invalid NHS number format, with performer identifier value of `9000000000` | HTTP Status 422 and INVALID_IDENTIFIER_VALUE error response | | Duplicate relationship | Request for relationship that already exists, with performer identifier value of `9000000049` | HTTP Status 409 and DUPLICATE_RELATIONSHIP error response | operationId: create-proxy-role @@ -746,8 +745,8 @@ paths: | HTTP status | Error code | Description | | ----------- | --------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | | 400 | `INVALID_VALUE` | Invalid Parameter or Invalid operation. | - | 400 | `MISSING_IDENTIFIER_VALUE` | Missing performer or patient identifier. | - | 400 | `MISSING_IDENTIFIER_SYSTEM` | Missing performer or patient identifier system. | + | 400 | `MISSING_IDENTIFIER_VALUE` | Missing grantee or patient identifier. | + | 400 | `MISSING_IDENTIFIER_SYSTEM` | Missing grantee or patient identifier system. | | 400 | `MISSING_PATIENT` | Missing patient. | | 400 | `MISSING_GRANTEE` | Missing grantee. | | 400 | `MISSING_STATUS` | Missing status. | @@ -780,8 +779,6 @@ paths: schema: $ref: "#/components/schemas/OperationOutcome" examples: - postConsentInvalidPerformerIdentifier: - $ref: "./examples/responses/POST_Consent/errors/invalid_performer_identifier_error.yaml#/PostConsentInvalidPerformerIdentifierError" postConsentDuplicateRelationship: $ref: "./examples/responses/POST_Consent/errors/duplicate_relationship_error.yaml#/PostConsentDuplicateRelationshipError" postConsentInvalidIdentifierValue: From f60ac75e723819ed47438c1fb0476a63a181bf45 Mon Sep 17 00:00:00 2001 From: Ellie Bound <175816742+ellie-bound1-NHSD@users.noreply.github.com> Date: Mon, 26 Jan 2026 16:55:43 +0000 Subject: [PATCH 06/10] NPA-6165: Restore postman --- ...ervice.integration.postman_collection.json | 18614 ++++++++-------- ...ip_service.sandbox.postman_collection.json | 11250 ---------- 2 files changed, 9240 insertions(+), 20624 deletions(-) diff --git a/postman/validated_relationship_service.integration.postman_collection.json b/postman/validated_relationship_service.integration.postman_collection.json index 3b557e2a..4ffbe339 100644 --- a/postman/validated_relationship_service.integration.postman_collection.json +++ b/postman/validated_relationship_service.integration.postman_collection.json @@ -1,9376 +1,9242 @@ { - "info": { - "_postman_id": "b74b4efe-1cda-46f3-a61f-2cecaed50022", - "name": "Validated Relationship Service - Integration - 16/01/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": "18067099" - }, - "item": [ - { - "name": "Get proxy roles (GET /Consent)", - "item": [ - { - "name": "Valid request - NPS - Get proxy roles for performer", - "event": [ - { - "listen": "prerequest", - "script": { - "exec": [ - "" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - }, - { - "listen": "test", - "script": { - "exec": [ - "" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "SomeToken;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9736898148", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9736898148" - } - ] - }, - "description": "This request and its examples will only retrieve proxy roles from the National Proxy Store and not directly from GPIT suppliers via NAM.\n\nSee folder-level docs for more info.\n\n## Example scenario\n\n**Given** proxy roles exist for a performer (proxy) in the National Proxy Store (NPS) \n**When** a GET /Consent request is sent with the performer identifier \n**Then** the proxy roles in NPS are returned\n\n## Authorization\n\nPlease see the folder overview for details of how to generate tokens for this endpoint." - }, - "response": [ - { - "name": "Proxy roles returned - No patient or performer details", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "1c190795-98fc-40d0-b13d-4b566650950a", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "3bedabd0-b86f-4d7b-92d9-94f020b4a834", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "some_token;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9736898148", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9736898148" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Date", - "value": "Thu, 04 Dec 2025 10:48:19 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "3486" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "cf3a99a3-7592-4968-893c-e443d6cb27c8" - }, - { - "key": "x-amz-apigw-id", - "value": "VD0FoHiurPEFXqQ=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-693166f0-1bb8c61dd3aa101687d0b754" - }, - { - "key": "X-Request-ID", - "value": "d3ec5ec8-088f-4db6-8342-1a21d2a2af16" - }, - { - "key": "X-Correlation-ID", - "value": "656bfa49-711b-48c4-9427-1ed8fa34260f" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2025-12-04T10:48:19Z\",\n \"total\": 2,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9736898148\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"resource\": {\n \"id\": \"7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"Information Access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ],\n \"text\": \"Information Access Consent\"\n }\n ],\n \"dateTime\": \"2025-12-04T10:46:27Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ],\n \"text\": \"Patient Privacy Consent\"\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/b22d6068-fe78-40f4-b71a-b916dac48c0b\",\n \"resource\": {\n \"id\": \"b22d6068-fe78-40f4-b71a-b916dac48c0b\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"Information Access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ],\n \"text\": \"Information Access Consent\"\n }\n ],\n \"dateTime\": \"2025-12-04T10:47:43Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ],\n \"text\": \"Patient Privacy Consent\"\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n }\n ]\n}" - }, - { - "name": "Proxy roles returned - Include patient details", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "some_token;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9736898148&_include=Consent:patient", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9736898148" - }, - { - "key": "_include", - "value": "Consent:patient" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Date", - "value": "Thu, 04 Dec 2025 10:50:25 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "6923" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "edd035fd-2cdb-4c7a-a55c-a55e6faf5743" - }, - { - "key": "x-amz-apigw-id", - "value": "VD0ZXFA2LPEFYqg=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-6931676e-74035c00139aae000a60b5d7" - }, - { - "key": "X-Request-ID", - "value": "64b0f06f-a35e-44bb-baf4-33de94895236" - }, - { - "key": "X-Correlation-ID", - "value": "6a95b411-9936-49bb-bbcb-8e6776417762" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2025-12-04T10:50:25Z\",\n \"total\": 2,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9736898148&_include=Consent%3Apatient\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"resource\": {\n \"id\": \"7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"Information Access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ],\n \"text\": \"Information Access Consent\"\n }\n ],\n \"dateTime\": \"2025-12-04T10:46:27Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ],\n \"text\": \"Patient Privacy Consent\"\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/b22d6068-fe78-40f4-b71a-b916dac48c0b\",\n \"resource\": {\n \"id\": \"b22d6068-fe78-40f4-b71a-b916dac48c0b\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"Information Access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ],\n \"text\": \"Information Access Consent\"\n }\n ],\n \"dateTime\": \"2025-12-04T10:47:43Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ],\n \"text\": \"Patient Privacy Consent\"\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898644\",\n \"resource\": {\n \"id\": \"9736898644\",\n \"meta\": {\n \"security\": [\n {\n \"code\": \"U\",\n \"display\": \"unrestricted\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-Confidentiality\"\n },\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ],\n \"versionId\": \"4\"\n },\n \"address\": [\n {\n \"extension\": [\n {\n \"extension\": [\n {\n \"url\": \"type\",\n \"valueCoding\": {\n \"code\": \"PAF\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType\"\n }\n },\n {\n \"url\": \"value\",\n \"valueString\": \"29706100\"\n }\n ],\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey\"\n }\n ],\n \"id\": \"gDmhc\",\n \"line\": [\n \"BRAMBLE COTTAGE\",\n \"OLD VICARAGE PARK\",\n \"SCAWBY\",\n \"BRIGG\",\n \"S HUMBERSIDE\"\n ],\n \"period\": {\n \"start\": \"2021-09-10\"\n },\n \"postalCode\": \"DN20 9RL\",\n \"use\": \"home\"\n }\n ],\n \"birthDate\": \"2015-09-26\",\n \"gender\": \"female\",\n \"generalPractitioner\": [\n {\n \"id\": \"gDHTb\",\n \"identifier\": {\n \"period\": {\n \"start\": \"2018-08-22\"\n },\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A20047\"\n }\n }\n ],\n \"identifier\": [\n {\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"01\",\n \"display\": \"Number present and verified\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\n \"version\": \"1.0.0\"\n }\n ]\n }\n }\n ],\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n ],\n \"name\": [\n {\n \"family\": \"SHEPP\",\n \"given\": [\n \"Ashley\",\n \"Ellen\"\n ],\n \"period\": {\n \"start\": \"2025-08-06\"\n },\n \"prefix\": [\n \"MS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898717\",\n \"resource\": {\n \"id\": \"9736898717\",\n \"meta\": {\n \"security\": [\n {\n \"code\": \"U\",\n \"display\": \"unrestricted\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-Confidentiality\"\n },\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ],\n \"versionId\": \"4\"\n },\n \"address\": [\n {\n \"extension\": [\n {\n \"extension\": [\n {\n \"url\": \"type\",\n \"valueCoding\": {\n \"code\": \"PAF\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType\"\n }\n },\n {\n \"url\": \"value\",\n \"valueString\": \"16654057\"\n }\n ],\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey\"\n }\n ],\n \"id\": \"YoGEf\",\n \"line\": [\n \"GLENVILLE\",\n \"FERRY ROAD\",\n \"GOXHILL\",\n \"BARROW-UPON-HUMBER\",\n \"S HUMBERSIDE\"\n ],\n \"period\": {\n \"start\": \"2016-04-09\"\n },\n \"postalCode\": \"DN19 7JY\",\n \"use\": \"home\"\n }\n ],\n \"birthDate\": \"2010-05-31\",\n \"gender\": \"male\",\n \"generalPractitioner\": [\n {\n \"id\": \"bYoHa\",\n \"identifier\": {\n \"period\": {\n \"start\": \"2016-02-12\"\n },\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A20047\"\n }\n }\n ],\n \"identifier\": [\n {\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"01\",\n \"display\": \"Number present and verified\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\n \"version\": \"1.0.0\"\n }\n ]\n }\n }\n ],\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n ],\n \"name\": [\n {\n \"family\": \"CASH\",\n \"given\": [\n \"Jacob\",\n \"Chas\"\n ],\n \"period\": {\n \"start\": \"2025-07-22\"\n },\n \"prefix\": [\n \"MR\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" - }, - { - "name": "Proxy roles returned - Include performer details", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "some_token;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9736898148&_include=Consent:performer", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9736898148" - }, - { - "key": "_include", - "value": "Consent:performer" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Date", - "value": "Thu, 04 Dec 2025 10:50:45 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "5289" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "60649be0-6363-4601-b792-d631af45a966" - }, - { - "key": "x-amz-apigw-id", - "value": "VD0cyFTYLPEF-Fg=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-69316784-cee1c757e6d4e43fb4837684" - }, - { - "key": "X-Request-ID", - "value": "8a113b57-8af9-4d34-b300-100c84059319" - }, - { - "key": "X-Correlation-ID", - "value": "a3683a8c-6172-44a7-8410-0e78a705907b" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2025-12-04T10:50:45Z\",\n \"total\": 2,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9736898148&_include=Consent%3Aperformer\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"resource\": {\n \"id\": \"7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"Information Access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ],\n \"text\": \"Information Access Consent\"\n }\n ],\n \"dateTime\": \"2025-12-04T10:46:27Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ],\n \"text\": \"Patient Privacy Consent\"\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/b22d6068-fe78-40f4-b71a-b916dac48c0b\",\n \"resource\": {\n \"id\": \"b22d6068-fe78-40f4-b71a-b916dac48c0b\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"Information Access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ],\n \"text\": \"Information Access Consent\"\n }\n ],\n \"dateTime\": \"2025-12-04T10:47:43Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ],\n \"text\": \"Patient Privacy Consent\"\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/ZfgKO\",\n \"resource\": {\n \"id\": \"ZfgKO\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/UwTCq\",\n \"resource\": {\n \"id\": \"UwTCq\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" - }, - { - "name": "Proxy roles returned - Include patient and performer details", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "some_token;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9736898148&_include=Consent:performer&_include=Consent:patient", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9736898148" - }, - { - "key": "_include", - "value": "Consent:performer" - }, - { - "key": "_include", - "value": "Consent:patient" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Date", - "value": "Thu, 04 Dec 2025 10:51:06 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "8726" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "2b36e22f-2649-44c9-b3ce-929ea840df0f" - }, - { - "key": "x-amz-apigw-id", - "value": "VD0gJFjQLPEF_Ew=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-6931679a-aa7dfa232b694d8fdbd9823f" - }, - { - "key": "X-Request-ID", - "value": "d5743541-7330-4347-b9c7-9067feb4b144" - }, - { - "key": "X-Correlation-ID", - "value": "af030657-aad8-45f4-9c70-85e4755a189f" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2025-12-04T10:51:06Z\",\n \"total\": 2,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9736898148&_include=Consent%3Aperformer&_include=Consent%3Apatient\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"resource\": {\n \"id\": \"7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"Information Access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ],\n \"text\": \"Information Access Consent\"\n }\n ],\n \"dateTime\": \"2025-12-04T10:46:27Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ],\n \"text\": \"Patient Privacy Consent\"\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/b22d6068-fe78-40f4-b71a-b916dac48c0b\",\n \"resource\": {\n \"id\": \"b22d6068-fe78-40f4-b71a-b916dac48c0b\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"Information Access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ],\n \"text\": \"Information Access Consent\"\n }\n ],\n \"dateTime\": \"2025-12-04T10:47:43Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ],\n \"text\": \"Patient Privacy Consent\"\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898644\",\n \"resource\": {\n \"id\": \"9736898644\",\n \"meta\": {\n \"security\": [\n {\n \"code\": \"U\",\n \"display\": \"unrestricted\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-Confidentiality\"\n },\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ],\n \"versionId\": \"4\"\n },\n \"address\": [\n {\n \"extension\": [\n {\n \"extension\": [\n {\n \"url\": \"type\",\n \"valueCoding\": {\n \"code\": \"PAF\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType\"\n }\n },\n {\n \"url\": \"value\",\n \"valueString\": \"29706100\"\n }\n ],\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey\"\n }\n ],\n \"id\": \"gDmhc\",\n \"line\": [\n \"BRAMBLE COTTAGE\",\n \"OLD VICARAGE PARK\",\n \"SCAWBY\",\n \"BRIGG\",\n \"S HUMBERSIDE\"\n ],\n \"period\": {\n \"start\": \"2021-09-10\"\n },\n \"postalCode\": \"DN20 9RL\",\n \"use\": \"home\"\n }\n ],\n \"birthDate\": \"2015-09-26\",\n \"gender\": \"female\",\n \"generalPractitioner\": [\n {\n \"id\": \"gDHTb\",\n \"identifier\": {\n \"period\": {\n \"start\": \"2018-08-22\"\n },\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A20047\"\n }\n }\n ],\n \"identifier\": [\n {\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"01\",\n \"display\": \"Number present and verified\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\n \"version\": \"1.0.0\"\n }\n ]\n }\n }\n ],\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n ],\n \"name\": [\n {\n \"family\": \"SHEPP\",\n \"given\": [\n \"Ashley\",\n \"Ellen\"\n ],\n \"period\": {\n \"start\": \"2025-08-06\"\n },\n \"prefix\": [\n \"MS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898717\",\n \"resource\": {\n \"id\": \"9736898717\",\n \"meta\": {\n \"security\": [\n {\n \"code\": \"U\",\n \"display\": \"unrestricted\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-Confidentiality\"\n },\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ],\n \"versionId\": \"4\"\n },\n \"address\": [\n {\n \"extension\": [\n {\n \"extension\": [\n {\n \"url\": \"type\",\n \"valueCoding\": {\n \"code\": \"PAF\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType\"\n }\n },\n {\n \"url\": \"value\",\n \"valueString\": \"16654057\"\n }\n ],\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey\"\n }\n ],\n \"id\": \"YoGEf\",\n \"line\": [\n \"GLENVILLE\",\n \"FERRY ROAD\",\n \"GOXHILL\",\n \"BARROW-UPON-HUMBER\",\n \"S HUMBERSIDE\"\n ],\n \"period\": {\n \"start\": \"2016-04-09\"\n },\n \"postalCode\": \"DN19 7JY\",\n \"use\": \"home\"\n }\n ],\n \"birthDate\": \"2010-05-31\",\n \"gender\": \"male\",\n \"generalPractitioner\": [\n {\n \"id\": \"bYoHa\",\n \"identifier\": {\n \"period\": {\n \"start\": \"2016-02-12\"\n },\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A20047\"\n }\n }\n ],\n \"identifier\": [\n {\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"01\",\n \"display\": \"Number present and verified\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\n \"version\": \"1.0.0\"\n }\n ]\n }\n }\n ],\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n ],\n \"name\": [\n {\n \"family\": \"CASH\",\n \"given\": [\n \"Jacob\",\n \"Chas\"\n ],\n \"period\": {\n \"start\": \"2025-07-22\"\n },\n \"prefix\": [\n \"MR\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/ZfgKO\",\n \"resource\": {\n \"id\": \"ZfgKO\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/UwTCq\",\n \"resource\": {\n \"id\": \"UwTCq\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" - }, - { - "name": "Proxy roles returned - Filtered by status 'inactive'", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "some_token;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9736898156&status=inactive", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9736898156" - }, - { - "key": "status", - "value": "inactive" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Date", - "value": "Thu, 04 Dec 2025 11:09:14 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "1888" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "290a4ffd-6021-435c-af76-8d6c80492b72" - }, - { - "key": "x-amz-apigw-id", - "value": "VD3JoHOkrPEFSoA=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-69316bd6-5bd69e7021cf6e4e0696d153" - }, - { - "key": "X-Request-ID", - "value": "8b8298dc-a9a4-4257-a6b9-f99d5ff65983" - }, - { - "key": "X-Correlation-ID", - "value": "5af5dfe2-b247-4624-8268-bb4e78593eb3" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2025-12-04T11:09:14Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9736898156&status=inactive\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/750cb586-eb9b-46c7-a1a5-711307a087af\",\n \"resource\": {\n \"id\": \"750cb586-eb9b-46c7-a1a5-711307a087af\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"Information Access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ],\n \"text\": \"Information Access Consent\"\n }\n ],\n \"dateTime\": \"2025-12-04T10:55:53Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898652\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2025-12-05\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ],\n \"text\": \"Patient Privacy Consent\"\n },\n \"status\": \"inactive\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n }\n ]\n}" - }, - { - "name": "Proxy roles returned - Filtered by status 'active' and include patient and performer details", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "some_token;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9736898156&status=active&_include=Consent:performer&_include=Consent:patient", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9736898156" - }, - { - "key": "status", - "value": "active" - }, - { - "key": "_include", - "value": "Consent:performer" - }, - { - "key": "_include", - "value": "Consent:patient" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Date", - "value": "Thu, 04 Dec 2025 11:09:41 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "4528" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "44c6f0cf-6bdb-4b96-8889-55ebe68b8c60" - }, - { - "key": "x-amz-apigw-id", - "value": "VD3M5FGYrPEFZVg=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-69316beb-f2f5e05791f831ed34fb0afa" - }, - { - "key": "X-Request-ID", - "value": "73bded49-9645-4418-bf08-ebd13d92c2a1" - }, - { - "key": "X-Correlation-ID", - "value": "15b5d9d5-9909-458a-91c5-64ee20e93a01" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2025-12-04T11:09:40Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9736898156&status=active&_include=Consent%3Aperformer&_include=Consent%3Apatient\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40\",\n \"resource\": {\n \"id\": \"4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"Information Access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ],\n \"text\": \"Information Access Consent\"\n }\n ],\n \"dateTime\": \"2025-12-04T11:08:46Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898660\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-12-05\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ],\n \"text\": \"Patient Privacy Consent\"\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898660\",\n \"resource\": {\n \"id\": \"9736898660\",\n \"meta\": {\n \"security\": [\n {\n \"code\": \"U\",\n \"display\": \"unrestricted\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-Confidentiality\"\n },\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ],\n \"versionId\": \"4\"\n },\n \"address\": [\n {\n \"extension\": [\n {\n \"extension\": [\n {\n \"url\": \"type\",\n \"valueCoding\": {\n \"code\": \"PAF\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType\"\n }\n },\n {\n \"url\": \"value\",\n \"valueString\": \"19976537\"\n }\n ],\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey\"\n }\n ],\n \"id\": \"pBQDr\",\n \"line\": [\n \"CARLTON\",\n \"VICARAGE LANE\",\n \"REDBOURNE\",\n \"GAINSBOROUGH\",\n \"LINCS\"\n ],\n \"period\": {\n \"start\": \"2025-07-15\"\n },\n \"postalCode\": \"DN21 4QW\",\n \"use\": \"home\"\n }\n ],\n \"birthDate\": \"2012-04-24\",\n \"gender\": \"female\",\n \"generalPractitioner\": [\n {\n \"id\": \"xSEnH\",\n \"identifier\": {\n \"period\": {\n \"start\": \"2024-11-06\"\n },\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A20047\"\n }\n }\n ],\n \"identifier\": [\n {\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"01\",\n \"display\": \"Number present and verified\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\n \"version\": \"1.0.0\"\n }\n ]\n }\n }\n ],\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898660\"\n }\n ],\n \"name\": [\n {\n \"family\": \"GODREY\",\n \"given\": [\n \"Davina\",\n \"Linda\"\n ],\n \"period\": {\n \"start\": \"2017-04-22\"\n },\n \"prefix\": [\n \"MISS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/nVLgl\",\n \"resource\": {\n \"id\": \"nVLgl\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898660\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" - } - ] - }, - { - "name": "Valid request - NPS - Get proxy roles for patient", - "event": [ - { - "listen": "prerequest", - "script": { - "exec": [ - "" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - }, - { - "listen": "test", - "script": { - "exec": [ - "" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "SomeToken;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?patient:identifier=9736898644", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "patient:identifier", - "value": "9736898644" - } - ] - }, - "description": "This request and its examples will only retrieve proxy roles from the National Proxy Store and not directly from GPIT suppliers via NAM.\n\nSee folder level docs for more info.\n\n## Example scenario\n\n**Given** proxy roles exist for a patient in the National Proxy Store (NPS) \n**When** a GET /Consent request is sent with the patient identifier \n**Then** the proxy roles in NPS are returned\n\n## Authorization\n\nPlease see the folder overview for details of how to generate tokens for this endpoint." - }, - "response": [ - { - "name": "Proxy roles returned - No patient or performer details", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "a8fe6a8d-44c5-4451-b8e8-5cf5adc2db03", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "43c2ad8f-43a2-4cfc-8d3a-2b4298ab2b6d", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "some_token;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?patient:identifier=9736898644", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "patient:identifier", - "value": "9736898644" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Date", - "value": "Thu, 04 Dec 2025 11:17:19 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "3484" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "cd84643e-5789-445f-9d2f-eb53fe6b57c5" - }, - { - "key": "x-amz-apigw-id", - "value": "VD4VeEsnLPEFmxA=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-69316dbc-851b7fe822d672bb07d0be6d" - }, - { - "key": "X-Request-ID", - "value": "b7120974-233d-4634-80e2-f404e817f80b" - }, - { - "key": "X-Correlation-ID", - "value": "73e7ab39-f339-4f53-8090-d4320c6a1fc5" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2025-12-04T11:17:19Z\",\n \"total\": 2,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?patient%3Aidentifier=9736898644\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"resource\": {\n \"id\": \"7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"Information Access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ],\n \"text\": \"Information Access Consent\"\n }\n ],\n \"dateTime\": \"2025-12-04T10:46:27Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ],\n \"text\": \"Patient Privacy Consent\"\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"resource\": {\n \"id\": \"553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"Information Access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ],\n \"text\": \"Information Access Consent\"\n }\n ],\n \"dateTime\": \"2025-12-04T11:15:26Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ],\n \"text\": \"Patient Privacy Consent\"\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n }\n ]\n}" - }, - { - "name": "Proxy roles returned - Include performer details", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "some_token;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?patient:identifier=9736898644&_include=Consent:performer", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "patient:identifier", - "value": "9736898644" - }, - { - "key": "_include", - "value": "Consent:performer" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Date", - "value": "Thu, 04 Dec 2025 11:17:45 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "5287" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "d6ea589d-359b-43a5-ac3d-6b570eec9cac" - }, - { - "key": "x-amz-apigw-id", - "value": "VD4YuGlSLPEF7zw=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-69316dd1-47a064ac1a1d588355c13564" - }, - { - "key": "X-Request-ID", - "value": "eb00dad3-5e15-4ade-8ee9-f3597bfab4d3" - }, - { - "key": "X-Correlation-ID", - "value": "a496e8bd-c333-4e87-9927-bbe9ead436a4" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2025-12-04T11:17:45Z\",\n \"total\": 2,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?patient%3Aidentifier=9736898644&_include=Consent%3Aperformer\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"resource\": {\n \"id\": \"7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"Information Access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ],\n \"text\": \"Information Access Consent\"\n }\n ],\n \"dateTime\": \"2025-12-04T10:46:27Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ],\n \"text\": \"Patient Privacy Consent\"\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"resource\": {\n \"id\": \"553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"Information Access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ],\n \"text\": \"Information Access Consent\"\n }\n ],\n \"dateTime\": \"2025-12-04T11:15:26Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ],\n \"text\": \"Patient Privacy Consent\"\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/ZfgKO\",\n \"resource\": {\n \"id\": \"ZfgKO\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/EAONj\",\n \"resource\": {\n \"id\": \"EAONj\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" - }, - { - "name": "Proxy roles returned - Include patient details", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "some_token;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?patient:identifier=9736898644&_include=Consent:patient", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "patient:identifier", - "value": "9736898644" - }, - { - "key": "_include", - "value": "Consent:patient" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Date", - "value": "Thu, 04 Dec 2025 11:18:02 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "5218" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "3a81d012-80ef-4350-8d7b-1f8cda1ef809" - }, - { - "key": "x-amz-apigw-id", - "value": "VD4cPGnErPEFYsw=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-69316de7-bb724d308ffa3272269bfba9" - }, - { - "key": "X-Request-ID", - "value": "ada44c4a-9dcc-4666-a97e-72ebce5630a8" - }, - { - "key": "X-Correlation-ID", - "value": "cfa6112c-4235-41a4-9e58-f4f04d4f7614" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2025-12-04T11:18:02Z\",\n \"total\": 2,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?patient%3Aidentifier=9736898644&_include=Consent%3Apatient\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"resource\": {\n \"id\": \"7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"Information Access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ],\n \"text\": \"Information Access Consent\"\n }\n ],\n \"dateTime\": \"2025-12-04T10:46:27Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ],\n \"text\": \"Patient Privacy Consent\"\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"resource\": {\n \"id\": \"553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"Information Access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ],\n \"text\": \"Information Access Consent\"\n }\n ],\n \"dateTime\": \"2025-12-04T11:15:26Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ],\n \"text\": \"Patient Privacy Consent\"\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898644\",\n \"resource\": {\n \"id\": \"9736898644\",\n \"meta\": {\n \"security\": [\n {\n \"code\": \"U\",\n \"display\": \"unrestricted\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-Confidentiality\"\n },\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ],\n \"versionId\": \"4\"\n },\n \"address\": [\n {\n \"extension\": [\n {\n \"extension\": [\n {\n \"url\": \"type\",\n \"valueCoding\": {\n \"code\": \"PAF\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType\"\n }\n },\n {\n \"url\": \"value\",\n \"valueString\": \"29706100\"\n }\n ],\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey\"\n }\n ],\n \"id\": \"gDmhc\",\n \"line\": [\n \"BRAMBLE COTTAGE\",\n \"OLD VICARAGE PARK\",\n \"SCAWBY\",\n \"BRIGG\",\n \"S HUMBERSIDE\"\n ],\n \"period\": {\n \"start\": \"2021-09-10\"\n },\n \"postalCode\": \"DN20 9RL\",\n \"use\": \"home\"\n }\n ],\n \"birthDate\": \"2015-09-26\",\n \"gender\": \"female\",\n \"generalPractitioner\": [\n {\n \"id\": \"gDHTb\",\n \"identifier\": {\n \"period\": {\n \"start\": \"2018-08-22\"\n },\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A20047\"\n }\n }\n ],\n \"identifier\": [\n {\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"01\",\n \"display\": \"Number present and verified\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\n \"version\": \"1.0.0\"\n }\n ]\n }\n }\n ],\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n ],\n \"name\": [\n {\n \"family\": \"SHEPP\",\n \"given\": [\n \"Ashley\",\n \"Ellen\"\n ],\n \"period\": {\n \"start\": \"2025-08-06\"\n },\n \"prefix\": [\n \"MS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" - }, - { - "name": "Proxy roles returned - Include patient and performer details", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "some_token;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?patient:identifier=9736898644&_include=Consent:performer&_include=Consent:patient", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "patient:identifier", - "value": "9736898644" - }, - { - "key": "_include", - "value": "Consent:performer" - }, - { - "key": "_include", - "value": "Consent:patient" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Date", - "value": "Thu, 04 Dec 2025 11:18:17 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "7021" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "013f49d1-ffbe-4880-bfd6-1b92d13d08a3" - }, - { - "key": "x-amz-apigw-id", - "value": "VD4evE6yLPEFZZA=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-69316df7-175910d69cd894708a0921b9" - }, - { - "key": "X-Request-ID", - "value": "9ce9a6d5-2bd2-4d5e-a984-2c78a457f4d4" - }, - { - "key": "X-Correlation-ID", - "value": "02eabdf7-0a76-4fec-9c99-306273ea8da5" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2025-12-04T11:18:17Z\",\n \"total\": 2,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?patient%3Aidentifier=9736898644&_include=Consent%3Aperformer&_include=Consent%3Apatient\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"resource\": {\n \"id\": \"7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"Information Access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ],\n \"text\": \"Information Access Consent\"\n }\n ],\n \"dateTime\": \"2025-12-04T10:46:27Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ],\n \"text\": \"Patient Privacy Consent\"\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"resource\": {\n \"id\": \"553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"Information Access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ],\n \"text\": \"Information Access Consent\"\n }\n ],\n \"dateTime\": \"2025-12-04T11:15:26Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ],\n \"text\": \"Patient Privacy Consent\"\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898644\",\n \"resource\": {\n \"id\": \"9736898644\",\n \"meta\": {\n \"security\": [\n {\n \"code\": \"U\",\n \"display\": \"unrestricted\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-Confidentiality\"\n },\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ],\n \"versionId\": \"4\"\n },\n \"address\": [\n {\n \"extension\": [\n {\n \"extension\": [\n {\n \"url\": \"type\",\n \"valueCoding\": {\n \"code\": \"PAF\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType\"\n }\n },\n {\n \"url\": \"value\",\n \"valueString\": \"29706100\"\n }\n ],\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey\"\n }\n ],\n \"id\": \"gDmhc\",\n \"line\": [\n \"BRAMBLE COTTAGE\",\n \"OLD VICARAGE PARK\",\n \"SCAWBY\",\n \"BRIGG\",\n \"S HUMBERSIDE\"\n ],\n \"period\": {\n \"start\": \"2021-09-10\"\n },\n \"postalCode\": \"DN20 9RL\",\n \"use\": \"home\"\n }\n ],\n \"birthDate\": \"2015-09-26\",\n \"gender\": \"female\",\n \"generalPractitioner\": [\n {\n \"id\": \"gDHTb\",\n \"identifier\": {\n \"period\": {\n \"start\": \"2018-08-22\"\n },\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A20047\"\n }\n }\n ],\n \"identifier\": [\n {\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"01\",\n \"display\": \"Number present and verified\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\n \"version\": \"1.0.0\"\n }\n ]\n }\n }\n ],\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n ],\n \"name\": [\n {\n \"family\": \"SHEPP\",\n \"given\": [\n \"Ashley\",\n \"Ellen\"\n ],\n \"period\": {\n \"start\": \"2025-08-06\"\n },\n \"prefix\": [\n \"MS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/ZfgKO\",\n \"resource\": {\n \"id\": \"ZfgKO\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/EAONj\",\n \"resource\": {\n \"id\": \"EAONj\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" - }, - { - "name": "Proxy roles returned - Filtered by status 'inactive'", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "some_token;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?patient:identifier=9736898717&status=inactive", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "patient:identifier", - "value": "9736898717" - }, - { - "key": "status", - "value": "inactive" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Date", - "value": "Thu, 04 Dec 2025 11:18:37 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "1886" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "595418c1-5c22-46b6-907c-e799e9fdf609" - }, - { - "key": "x-amz-apigw-id", - "value": "VD4iFHTWLPEFnHA=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-69316e0c-b334c67c9e4d72fd5809672a" - }, - { - "key": "X-Request-ID", - "value": "e6ad06af-45a7-4f98-92c2-88300871c3bc" - }, - { - "key": "X-Correlation-ID", - "value": "8d75c837-bd9e-4784-ac40-84322ee4d188" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2025-12-04T11:18:37Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?patient%3Aidentifier=9736898717&status=inactive\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/cf7bc8e6-f8e0-41c5-8d08-1741eee5a256\",\n \"resource\": {\n \"id\": \"cf7bc8e6-f8e0-41c5-8d08-1741eee5a256\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"Information Access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ],\n \"text\": \"Information Access Consent\"\n }\n ],\n \"dateTime\": \"2025-12-04T11:16:43Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ],\n \"text\": \"Patient Privacy Consent\"\n },\n \"status\": \"inactive\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n }\n ]\n}" - }, - { - "name": "Proxy roles returned - Filtered by status 'active' and include patient and performer details", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "some_token;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?patient:identifier=9736898717&status=active&_include=Consent:performer&_include=Consent:patient", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "patient:identifier", - "value": "9736898717" - }, - { - "key": "status", - "value": "active" - }, - { - "key": "_include", - "value": "Consent:performer" - }, - { - "key": "_include", - "value": "Consent:patient" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Date", - "value": "Thu, 04 Dec 2025 11:18:51 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "4528" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "bd5079fb-1fc3-428c-ab53-5ba1dfacc510" - }, - { - "key": "x-amz-apigw-id", - "value": "VD4kRHuoLPEF-DQ=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-69316e1a-0dc7c19d64d48ad8a86c4518" - }, - { - "key": "X-Request-ID", - "value": "8da5a25e-ef8b-4cec-84c0-81af22e5132f" - }, - { - "key": "X-Correlation-ID", - "value": "ce7840a8-db71-4897-9853-d06c699adca9" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2025-12-04T11:18:51Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?patient%3Aidentifier=9736898717&status=active&_include=Consent%3Aperformer&_include=Consent%3Apatient\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/b22d6068-fe78-40f4-b71a-b916dac48c0b\",\n \"resource\": {\n \"id\": \"b22d6068-fe78-40f4-b71a-b916dac48c0b\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"Information Access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ],\n \"text\": \"Information Access Consent\"\n }\n ],\n \"dateTime\": \"2025-12-04T10:47:43Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ],\n \"text\": \"Patient Privacy Consent\"\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898717\",\n \"resource\": {\n \"id\": \"9736898717\",\n \"meta\": {\n \"security\": [\n {\n \"code\": \"U\",\n \"display\": \"unrestricted\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-Confidentiality\"\n },\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ],\n \"versionId\": \"4\"\n },\n \"address\": [\n {\n \"extension\": [\n {\n \"extension\": [\n {\n \"url\": \"type\",\n \"valueCoding\": {\n \"code\": \"PAF\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType\"\n }\n },\n {\n \"url\": \"value\",\n \"valueString\": \"16654057\"\n }\n ],\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey\"\n }\n ],\n \"id\": \"YoGEf\",\n \"line\": [\n \"GLENVILLE\",\n \"FERRY ROAD\",\n \"GOXHILL\",\n \"BARROW-UPON-HUMBER\",\n \"S HUMBERSIDE\"\n ],\n \"period\": {\n \"start\": \"2016-04-09\"\n },\n \"postalCode\": \"DN19 7JY\",\n \"use\": \"home\"\n }\n ],\n \"birthDate\": \"2010-05-31\",\n \"gender\": \"male\",\n \"generalPractitioner\": [\n {\n \"id\": \"bYoHa\",\n \"identifier\": {\n \"period\": {\n \"start\": \"2016-02-12\"\n },\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A20047\"\n }\n }\n ],\n \"identifier\": [\n {\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"01\",\n \"display\": \"Number present and verified\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\n \"version\": \"1.0.0\"\n }\n ]\n }\n }\n ],\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n ],\n \"name\": [\n {\n \"family\": \"CASH\",\n \"given\": [\n \"Jacob\",\n \"Chas\"\n ],\n \"period\": {\n \"start\": \"2025-07-22\"\n },\n \"prefix\": [\n \"MR\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/UwTCq\",\n \"resource\": {\n \"id\": \"UwTCq\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" - } - ] - }, - { - "name": "Valid request - NPS - Get proxy roles for patient and proxy", - "event": [ - { - "listen": "prerequest", - "script": { - "exec": [ - "" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - }, - { - "listen": "test", - "script": { - "exec": [ - "" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "SomeToken;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9736898121&patient:identifier=9736898644", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9736898121" - }, - { - "key": "patient:identifier", - "value": "9736898644" - } - ] - }, - "description": "This request and its examples will only retrieve proxy roles from the National Proxy Store and not directly from GPIT suppliers via NAM.\n\nSee folder level docs for more info.\n\n## Example scenario\n\n**Given** proxy roles exist for a patient in the National Proxy Store (NPS) \n**When** a GET /Consent request is sent with the performer and patient identifier \n**Then** a single proxy role from NPS is returned\n\n## Authorization\n\nPlease see the folder overview for details of how to generate tokens for this endpoint." - }, - "response": [ - { - "name": "Proxy roles returned - No patient or performer details", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "4d896833-170b-4dc9-a455-66db155cb5c1", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "1525b9dd-abde-44c0-a226-c93af7e47d8e", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "some_token;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9736898121&patient:identifier=9736898644", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9736898121" - }, - { - "key": "patient:identifier", - "value": "9736898644" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Date", - "value": "Thu, 04 Dec 2025 11:19:27 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "1902" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "3d56eb4c-4bc0-47d8-bc61-a55b098dfd9c" - }, - { - "key": "x-amz-apigw-id", - "value": "VD4p_GRgrPEFVPA=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-69316e3f-6ddd811fdb997165b9c6a0d5" - }, - { - "key": "X-Request-ID", - "value": "f8ac2f03-2a5f-4ff7-8ada-093f55fb9c38" - }, - { - "key": "X-Correlation-ID", - "value": "8fc4ed98-4b94-41e1-bff0-0065b6058201" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2025-12-04T11:19:27Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9736898121&patient%3Aidentifier=9736898644\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"resource\": {\n \"id\": \"553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"Information Access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ],\n \"text\": \"Information Access Consent\"\n }\n ],\n \"dateTime\": \"2025-12-04T11:15:26Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ],\n \"text\": \"Patient Privacy Consent\"\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n }\n ]\n}" - }, - { - "name": "Proxy roles returned - Include performer details", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "some_token;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9736898121&patient:identifier=9736898644&_include=Consent:performer", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9736898121" - }, - { - "key": "patient:identifier", - "value": "9736898644" - }, - { - "key": "_include", - "value": "Consent:performer" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Date", - "value": "Thu, 04 Dec 2025 11:19:44 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "2818" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "12da5c87-c8eb-4085-ad09-ab9df3923150" - }, - { - "key": "x-amz-apigw-id", - "value": "VD4slFJ5rPEF6Mg=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-69316e50-a15563e078d9633ab0d45fb6" - }, - { - "key": "X-Request-ID", - "value": "51afba5e-eea1-415e-a0c3-bc5d47e884fd" - }, - { - "key": "X-Correlation-ID", - "value": "c31bc807-8bc9-4aa5-b531-f44fbfeeef0c" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2025-12-04T11:19:44Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9736898121&patient%3Aidentifier=9736898644&_include=Consent%3Aperformer\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"resource\": {\n \"id\": \"553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"Information Access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ],\n \"text\": \"Information Access Consent\"\n }\n ],\n \"dateTime\": \"2025-12-04T11:15:26Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ],\n \"text\": \"Patient Privacy Consent\"\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/EAONj\",\n \"resource\": {\n \"id\": \"EAONj\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" - }, - { - "name": "Proxy roles returned - Include patient details", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "some_token;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9736898121&patient:identifier=9736898644&_include=Consent:patient", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9736898121" - }, - { - "key": "patient:identifier", - "value": "9736898644" - }, - { - "key": "_include", - "value": "Consent:patient" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Date", - "value": "Thu, 04 Dec 2025 11:19:57 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "3636" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "341e64dd-974f-4307-a16b-e775c0777fdd" - }, - { - "key": "x-amz-apigw-id", - "value": "VD4uhGhjLPEF8-A=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-69316e5c-16469b05761a5ee0d5ffe220" - }, - { - "key": "X-Request-ID", - "value": "2762b971-bfcc-42c6-be87-b2d2a98cf5b5" - }, - { - "key": "X-Correlation-ID", - "value": "94e42484-2c4d-46fc-8364-027c06a21798" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2025-12-04T11:19:56Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9736898121&patient%3Aidentifier=9736898644&_include=Consent%3Apatient\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"resource\": {\n \"id\": \"553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"Information Access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ],\n \"text\": \"Information Access Consent\"\n }\n ],\n \"dateTime\": \"2025-12-04T11:15:26Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ],\n \"text\": \"Patient Privacy Consent\"\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898644\",\n \"resource\": {\n \"id\": \"9736898644\",\n \"meta\": {\n \"security\": [\n {\n \"code\": \"U\",\n \"display\": \"unrestricted\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-Confidentiality\"\n },\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ],\n \"versionId\": \"4\"\n },\n \"address\": [\n {\n \"extension\": [\n {\n \"extension\": [\n {\n \"url\": \"type\",\n \"valueCoding\": {\n \"code\": \"PAF\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType\"\n }\n },\n {\n \"url\": \"value\",\n \"valueString\": \"29706100\"\n }\n ],\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey\"\n }\n ],\n \"id\": \"gDmhc\",\n \"line\": [\n \"BRAMBLE COTTAGE\",\n \"OLD VICARAGE PARK\",\n \"SCAWBY\",\n \"BRIGG\",\n \"S HUMBERSIDE\"\n ],\n \"period\": {\n \"start\": \"2021-09-10\"\n },\n \"postalCode\": \"DN20 9RL\",\n \"use\": \"home\"\n }\n ],\n \"birthDate\": \"2015-09-26\",\n \"gender\": \"female\",\n \"generalPractitioner\": [\n {\n \"id\": \"gDHTb\",\n \"identifier\": {\n \"period\": {\n \"start\": \"2018-08-22\"\n },\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A20047\"\n }\n }\n ],\n \"identifier\": [\n {\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"01\",\n \"display\": \"Number present and verified\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\n \"version\": \"1.0.0\"\n }\n ]\n }\n }\n ],\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n ],\n \"name\": [\n {\n \"family\": \"SHEPP\",\n \"given\": [\n \"Ashley\",\n \"Ellen\"\n ],\n \"period\": {\n \"start\": \"2025-08-06\"\n },\n \"prefix\": [\n \"MS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" - }, - { - "name": "Proxy roles returned - Include patient and performer details", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "some_token;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9736898121&patient:identifier=9736898644&_include=Consent:performer&_include=Consent:patient", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9736898121" - }, - { - "key": "patient:identifier", - "value": "9736898644" - }, - { - "key": "_include", - "value": "Consent:performer" - }, - { - "key": "_include", - "value": "Consent:patient" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Date", - "value": "Thu, 04 Dec 2025 11:20:24 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "4552" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "306d5243-752e-45e4-9c44-f175a008c1de" - }, - { - "key": "x-amz-apigw-id", - "value": "VD4y2Gg1rPEFcxQ=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-69316e78-df1338116d16a7272e1de2dc" - }, - { - "key": "X-Request-ID", - "value": "b05f7a59-c008-47d8-868c-011cbdf17500" - }, - { - "key": "X-Correlation-ID", - "value": "95f4ebb0-274e-4757-91f3-91a5fc0a3f0f" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2025-12-04T11:20:24Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9736898121&patient%3Aidentifier=9736898644&_include=Consent%3Aperformer&_include=Consent%3Apatient\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"resource\": {\n \"id\": \"553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"Information Access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ],\n \"text\": \"Information Access Consent\"\n }\n ],\n \"dateTime\": \"2025-12-04T11:15:26Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ],\n \"text\": \"Patient Privacy Consent\"\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898644\",\n \"resource\": {\n \"id\": \"9736898644\",\n \"meta\": {\n \"security\": [\n {\n \"code\": \"U\",\n \"display\": \"unrestricted\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-Confidentiality\"\n },\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ],\n \"versionId\": \"4\"\n },\n \"address\": [\n {\n \"extension\": [\n {\n \"extension\": [\n {\n \"url\": \"type\",\n \"valueCoding\": {\n \"code\": \"PAF\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType\"\n }\n },\n {\n \"url\": \"value\",\n \"valueString\": \"29706100\"\n }\n ],\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey\"\n }\n ],\n \"id\": \"gDmhc\",\n \"line\": [\n \"BRAMBLE COTTAGE\",\n \"OLD VICARAGE PARK\",\n \"SCAWBY\",\n \"BRIGG\",\n \"S HUMBERSIDE\"\n ],\n \"period\": {\n \"start\": \"2021-09-10\"\n },\n \"postalCode\": \"DN20 9RL\",\n \"use\": \"home\"\n }\n ],\n \"birthDate\": \"2015-09-26\",\n \"gender\": \"female\",\n \"generalPractitioner\": [\n {\n \"id\": \"gDHTb\",\n \"identifier\": {\n \"period\": {\n \"start\": \"2018-08-22\"\n },\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A20047\"\n }\n }\n ],\n \"identifier\": [\n {\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"01\",\n \"display\": \"Number present and verified\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\n \"version\": \"1.0.0\"\n }\n ]\n }\n }\n ],\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n ],\n \"name\": [\n {\n \"family\": \"SHEPP\",\n \"given\": [\n \"Ashley\",\n \"Ellen\"\n ],\n \"period\": {\n \"start\": \"2025-08-06\"\n },\n \"prefix\": [\n \"MS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/EAONj\",\n \"resource\": {\n \"id\": \"EAONj\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" - }, - { - "name": "Proxy roles returned - Filtered by status 'inactive'", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "some_token;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9736898156&patient:identifier=9736898652&status=inactive", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9736898156" - }, - { - "key": "patient:identifier", - "value": "9736898652" - }, - { - "key": "status", - "value": "inactive" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Date", - "value": "Thu, 04 Dec 2025 11:21:09 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "1920" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "24bfc7a0-5f30-47b4-a751-7534837f5224" - }, - { - "key": "x-amz-apigw-id", - "value": "VD455ErXrPEFuaQ=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-69316ea5-6c272d90a7d3656142da3073" - }, - { - "key": "X-Request-ID", - "value": "67a71930-24b3-4baa-8b13-65f27c413a41" - }, - { - "key": "X-Correlation-ID", - "value": "dd934795-88bf-44a3-a2c3-eff757413bfb" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2025-12-04T11:21:09Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9736898156&patient%3Aidentifier=9736898652&status=inactive\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/750cb586-eb9b-46c7-a1a5-711307a087af\",\n \"resource\": {\n \"id\": \"750cb586-eb9b-46c7-a1a5-711307a087af\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"Information Access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ],\n \"text\": \"Information Access Consent\"\n }\n ],\n \"dateTime\": \"2025-12-04T10:55:53Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898652\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2025-12-05\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ],\n \"text\": \"Patient Privacy Consent\"\n },\n \"status\": \"inactive\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n }\n ]\n}" - }, - { - "name": "Proxy roles returned - Filtered by status 'active' and include patient and performer details", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "some_token;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9736898156&patient:identifier=9736898652&status=active&_include=Consent:performer&_include=Consent:patient", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9736898156" - }, - { - "key": "patient:identifier", - "value": "9736898652" - }, - { - "key": "status", - "value": "active" - }, - { - "key": "_include", - "value": "Consent:performer" - }, - { - "key": "_include", - "value": "Consent:patient" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Date", - "value": "Thu, 04 Dec 2025 11:21:28 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "2038" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "f44b69f0-f814-4e0f-89eb-349f1f7e143d" - }, - { - "key": "x-amz-apigw-id", - "value": "VD48uEKHLPEF67A=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-69316eb7-00b15aebe653e94192bc60ee" - }, - { - "key": "X-Request-ID", - "value": "8f40b74e-99fa-4401-bcf1-def08a63da50" - }, - { - "key": "X-Correlation-ID", - "value": "1460d166-ba8d-4d1c-8822-83394abe1169" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2025-12-04T11:21:27Z\",\n \"total\": 0,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9736898156&patient%3Aidentifier=9736898652&status=active&_include=Consent%3Aperformer&_include=Consent%3Apatient\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898652\",\n \"resource\": {\n \"id\": \"9736898652\",\n \"meta\": {\n \"security\": [\n {\n \"code\": \"U\",\n \"display\": \"unrestricted\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-Confidentiality\"\n },\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ],\n \"versionId\": \"4\"\n },\n \"address\": [\n {\n \"extension\": [\n {\n \"extension\": [\n {\n \"url\": \"type\",\n \"valueCoding\": {\n \"code\": \"PAF\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType\"\n }\n },\n {\n \"url\": \"value\",\n \"valueString\": \"6290975\"\n }\n ],\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey\"\n }\n ],\n \"id\": \"RPnzd\",\n \"line\": [\n \"77 ANGERSTEIN ROAD\",\n \"SCUNTHORPE\",\n \"S HUMBERSIDE\"\n ],\n \"period\": {\n \"start\": \"2019-11-10\"\n },\n \"postalCode\": \"DN17 2NB\",\n \"use\": \"home\"\n }\n ],\n \"birthDate\": \"2013-09-02\",\n \"gender\": \"female\",\n \"generalPractitioner\": [\n {\n \"id\": \"yIjPV\",\n \"identifier\": {\n \"period\": {\n \"start\": \"2021-01-07\"\n },\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A20047\"\n }\n }\n ],\n \"identifier\": [\n {\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"01\",\n \"display\": \"Number present and verified\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\n \"version\": \"1.0.0\"\n }\n ]\n }\n }\n ],\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898652\"\n }\n ],\n \"name\": [\n {\n \"family\": \"CLYDE\",\n \"given\": [\n \"Deanne\",\n \"Tara\"\n ],\n \"period\": {\n \"start\": \"2018-06-16\"\n },\n \"prefix\": [\n \"MS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" - } - ] - }, - { - "name": "Valid request - NAM - Get proxy roles", - "event": [ - { - "listen": "prerequest", - "script": { - "exec": [ - "" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - }, - { - "listen": "test", - "script": { - "exec": [ - "" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "{{tpp_9674998535_access_token}};A82648", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=false;nam-cache-enabled=false;nam-enabled=true;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9674998535", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9674998535" - } - ] - }, - "description": "This request and its examples will only retrieve proxy roles directly from GPIT suppliers via NAM and not from the National Proxy Store.\n\nSee folder level docs for more info.\n\n## Example scenario\n\n**Given** proxy roles exist for a patient/performer in a GPIT system \n**And** no proxy roles exist in the National Proxy Store (NPS) for the patient/performer \n**When** a GET /Consent request is sent with the performer/patient identifier \n**Then** the proxy roles from GPIT are returned\n\n## Authorization\n\nPlease see the folder overview for details of how to generate tokens for this endpoint." - }, - "response": [ - { - "name": "No linked profiles returned from NAM - TPP user", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "83892b1a-6369-4657-a0c3-f6071a25e226", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "b496d552-f0c3-4e20-b362-cfc0c80724e3", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "{{tpp_9674998535_access_token}};A82648", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=false;nam-cache-enabled=false;nam-enabled=true;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9674998535&_include=Consent:performer&_include=Consent:patient", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9674998535" - }, - { - "key": "_include", - "value": "Consent:performer" - }, - { - "key": "_include", - "value": "Consent:patient" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Date", - "value": "Thu, 04 Dec 2025 11:22:00 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "5773" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "94465816-7aaa-4d03-81c9-e19156606316" - }, - { - "key": "x-amz-apigw-id", - "value": "VD5BAEGOLPEFVPA=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-69316ed8-af72bfe69942b25c155a4daa" - }, - { - "key": "X-Request-ID", - "value": "ed28025a-9c27-468c-85fd-9b1b8f794198" - }, - { - "key": "X-Correlation-ID", - "value": "fbd025d4-c7e1-4085-8bf8-d11b84652f8d" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2025-12-04T11:22:00Z\",\n \"total\": 2,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9674998535&_include=Consent%3Aperformer&_include=Consent%3Apatient\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/3a86ad92\",\n \"resource\": {\n \"id\": \"3a86ad92\",\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"Information Access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ],\n \"text\": \"Information Access Consent\"\n }\n ],\n \"dateTime\": \"2025-12-04T11:21:58.915488+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9692113736\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998535\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998535\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ],\n \"text\": \"Patient Privacy Consent\"\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/5c0c47d9\",\n \"resource\": {\n \"id\": \"5c0c47d9\",\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"Information Access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ],\n \"text\": \"Information Access Consent\"\n }\n ],\n \"dateTime\": \"2025-12-04T11:21:58.915640+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998454\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998535\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998535\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ],\n \"text\": \"Patient Privacy Consent\"\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/0b36c4e0\",\n \"resource\": {\n \"id\": \"0b36c4e0\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998535\"\n },\n {\n \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",\n \"value\": \"8af3500000000000\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9692113736\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/bd6da0a0\",\n \"resource\": {\n \"id\": \"bd6da0a0\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998535\"\n },\n {\n \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",\n \"value\": \"8af3500000000000\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998454\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/e41dfa63\",\n \"resource\": {\n \"id\": \"e41dfa63\",\n \"meta\": {\n \"profile\": [\n \"https://fhir.hl7.org.uk/StructureDefinition/UKCore-Patient\"\n ],\n \"security\": [\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ]\n },\n \"birthDate\": \"1985-05-29\",\n \"generalPractitioner\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A82648\"\n }\n }\n ],\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9692113736\"\n },\n {\n \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",\n \"value\": \"84df400000000000\"\n }\n ],\n \"name\": [\n {\n \"text\": \"Mr Kevin Barry\",\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/2d10a3d9\",\n \"resource\": {\n \"id\": \"2d10a3d9\",\n \"meta\": {\n \"profile\": [\n \"https://fhir.hl7.org.uk/StructureDefinition/UKCore-Patient\"\n ],\n \"security\": [\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ]\n },\n \"birthDate\": \"1921-10-17\",\n \"generalPractitioner\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A82648\"\n }\n }\n ],\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998454\"\n },\n {\n \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",\n \"value\": \"d024500000000000\"\n }\n ],\n \"name\": [\n {\n \"text\": \"Mr Landon Fahey\",\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" - }, - { - "name": "Linked profiles returned from NAM - TPP user", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "{{tpp_9674998454_access_token}};A82648", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=false;nam-cache-enabled=false;nam-enabled=true;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9674998454&_include=Consent:patient", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9674998454" - }, - { - "key": "_include", - "value": "Consent:patient" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Date", - "value": "Thu, 04 Dec 2025 11:22:15 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "4370" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "1b190446-e56f-4a64-8c54-25688af8f8f7" - }, - { - "key": "x-amz-apigw-id", - "value": "VD5EAFv1rPEF7zw=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-69316ee6-9925773ab605850282f2d18c" - }, - { - "key": "X-Request-ID", - "value": "dfa182c6-8f6a-46e9-bdc1-1ef5a00740c1" - }, - { - "key": "X-Correlation-ID", - "value": "d50ce1da-c025-451c-847e-c405c299115f" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2025-12-04T11:22:15Z\",\n \"total\": 2,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9674998454&_include=Consent%3Apatient\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/92a66114\",\n \"resource\": {\n \"id\": \"92a66114\",\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"Information Access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ],\n \"text\": \"Information Access Consent\"\n }\n ],\n \"dateTime\": \"2025-12-04T11:22:15.290954+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998640\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998454\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998454\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ],\n \"text\": \"Patient Privacy Consent\"\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/0b02be0a\",\n \"resource\": {\n \"id\": \"0b02be0a\",\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"Information Access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ],\n \"text\": \"Information Access Consent\"\n }\n ],\n \"dateTime\": \"2025-12-04T11:22:15.290994+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998543\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998454\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998454\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ],\n \"text\": \"Patient Privacy Consent\"\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/934bfd54\",\n \"resource\": {\n \"id\": \"934bfd54\",\n \"meta\": {\n \"profile\": [\n \"https://fhir.hl7.org.uk/StructureDefinition/UKCore-Patient\"\n ],\n \"security\": [\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ]\n },\n \"birthDate\": \"1998-11-14\",\n \"generalPractitioner\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A82648\"\n }\n }\n ],\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998640\"\n },\n {\n \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",\n \"value\": \"e254500000000000\"\n }\n ],\n \"name\": [\n {\n \"text\": \"Mr Harry Hood\",\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/29b6ab39\",\n \"resource\": {\n \"id\": \"29b6ab39\",\n \"meta\": {\n \"profile\": [\n \"https://fhir.hl7.org.uk/StructureDefinition/UKCore-Patient\"\n ],\n \"security\": [\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ]\n },\n \"birthDate\": \"1930-11-02\",\n \"generalPractitioner\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A82648\"\n }\n }\n ],\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998543\"\n },\n {\n \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",\n \"value\": \"52f3500000000000\"\n }\n ],\n \"name\": [\n {\n \"text\": \"Miss Lisa Hankey\",\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" - }, - { - "name": "No linked profiles returned from NAM - EMIS user", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "{{emis_9692113612_access_token}};A29928", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=false;nam-cache-enabled=false;nam-enabled=true;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9692113612&_include=Consent:patient", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9692113612" - }, - { - "key": "_include", - "value": "Consent:patient" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Date", - "value": "Thu, 04 Dec 2025 11:22:37 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "283" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "15121c1a-99de-4830-86c7-00925d4faf3a" - }, - { - "key": "x-amz-apigw-id", - "value": "VD5HEE6MLPEFz5w=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-69316ef9-58a10d83bc130c381cdb0b44" - }, - { - "key": "X-Request-ID", - "value": "1828501c-86dc-4baf-9a13-e37a822e327f" - }, - { - "key": "X-Correlation-ID", - "value": "b891fe97-7778-4db5-be39-b23c03879d2d" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2025-12-04T11:22:36Z\",\n \"total\": 0,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9692113612&_include=Consent%3Apatient\"\n }\n ],\n \"entry\": []\n}" - }, - { - "name": "Linked profiles returned from NAM - EMIS user", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "{{emis_9692113698_access_token}};A00002", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=false;nam-cache-enabled=false;nam-enabled=true;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9692113698&_include=Consent:performer", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9692113698" - }, - { - "key": "_include", - "value": "Consent:patient", - "disabled": true - }, - { - "key": "_include", - "value": "Consent:performer" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Date", - "value": "Thu, 04 Dec 2025 11:24:08 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "17617" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "739313dc-9917-4df2-9b9d-e59bf36d8c4e" - }, - { - "key": "x-amz-apigw-id", - "value": "VD5U-FHkLPEF0fw=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-69316f52-1205235fe7d41983ba807831" - }, - { - "key": "X-Request-ID", - "value": "2eb98c87-f421-4902-a885-ecc408bd8d89" - }, - { - "key": "X-Correlation-ID", - "value": "4ac19b94-25d4-4de6-9be6-fe5a4a520d15" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2025-12-04T11:24:08Z\",\n \"total\": 9,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9692113698&_include=Consent%3Aperformer\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/2993b769\",\n \"resource\": {\n \"id\": \"2993b769\",\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"Information Access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ],\n \"text\": \"Information Access Consent\"\n }\n ],\n \"dateTime\": \"2025-12-04T11:24:07.874676+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9661034451\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ],\n \"text\": \"Patient Privacy Consent\"\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/c0d48822\",\n \"resource\": {\n \"id\": \"c0d48822\",\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"Information Access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ],\n \"text\": \"Information Access Consent\"\n }\n ],\n \"dateTime\": \"2025-12-04T11:24:07.874715+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998403\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ],\n \"text\": \"Patient Privacy Consent\"\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/75d0c9dc\",\n \"resource\": {\n \"id\": \"75d0c9dc\",\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"Information Access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ],\n \"text\": \"Information Access Consent\"\n }\n ],\n \"dateTime\": \"2025-12-04T11:24:07.874739+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9661034400\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ],\n \"text\": \"Patient Privacy Consent\"\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/2bed6c1e\",\n \"resource\": {\n \"id\": \"2bed6c1e\",\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"Information Access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ],\n \"text\": \"Information Access Consent\"\n }\n ],\n \"dateTime\": \"2025-12-04T11:24:07.874762+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9661034168\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ],\n \"text\": \"Patient Privacy Consent\"\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/ed77c791\",\n \"resource\": {\n \"id\": \"ed77c791\",\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"Information Access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ],\n \"text\": \"Information Access Consent\"\n }\n ],\n \"dateTime\": \"2025-12-04T11:24:07.874785+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9253046414\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ],\n \"text\": \"Patient Privacy Consent\"\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/02e9fe06\",\n \"resource\": {\n \"id\": \"02e9fe06\",\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"Information Access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ],\n \"text\": \"Information Access Consent\"\n }\n ],\n \"dateTime\": \"2025-12-04T11:24:07.874807+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9930725970\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ],\n \"text\": \"Patient Privacy Consent\"\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/70f274ba\",\n \"resource\": {\n \"id\": \"70f274ba\",\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"Information Access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ],\n \"text\": \"Information Access Consent\"\n }\n ],\n \"dateTime\": \"2025-12-04T11:24:07.874830+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9803007025\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ],\n \"text\": \"Patient Privacy Consent\"\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/87501704\",\n \"resource\": {\n \"id\": \"87501704\",\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"Information Access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ],\n \"text\": \"Information Access Consent\"\n }\n ],\n \"dateTime\": \"2025-12-04T11:24:07.874852+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9734615173\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ],\n \"text\": \"Patient Privacy Consent\"\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/022a7290\",\n \"resource\": {\n \"id\": \"022a7290\",\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"Information Access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ],\n \"text\": \"Information Access Consent\"\n }\n ],\n \"dateTime\": \"2025-12-04T11:24:07.874874+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9694154065\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ],\n \"text\": \"Patient Privacy Consent\"\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/4931d7ae\",\n \"resource\": {\n \"id\": \"4931d7ae\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n },\n {\n \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",\n \"value\": \"a6f2b11f-0f96-4487-83b0-bca6c9aae2bd\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9661034451\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/34e6ba88\",\n \"resource\": {\n \"id\": \"34e6ba88\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n },\n {\n \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",\n \"value\": \"a6f2b11f-0f96-4487-83b0-bca6c9aae2bd\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998403\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/1b0f7204\",\n \"resource\": {\n \"id\": \"1b0f7204\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n },\n {\n \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",\n \"value\": \"a6f2b11f-0f96-4487-83b0-bca6c9aae2bd\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9661034400\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/7115d670\",\n \"resource\": {\n \"id\": \"7115d670\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n },\n {\n \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",\n \"value\": \"a6f2b11f-0f96-4487-83b0-bca6c9aae2bd\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9661034168\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/63bd0423\",\n \"resource\": {\n \"id\": \"63bd0423\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n },\n {\n \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",\n \"value\": \"a6f2b11f-0f96-4487-83b0-bca6c9aae2bd\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9253046414\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/04683858\",\n \"resource\": {\n \"id\": \"04683858\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n },\n {\n \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",\n \"value\": \"a6f2b11f-0f96-4487-83b0-bca6c9aae2bd\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9930725970\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/e0cff956\",\n \"resource\": {\n \"id\": \"e0cff956\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n },\n {\n \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",\n \"value\": \"a6f2b11f-0f96-4487-83b0-bca6c9aae2bd\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9803007025\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/a9f54c1c\",\n \"resource\": {\n \"id\": \"a9f54c1c\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n },\n {\n \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",\n \"value\": \"a6f2b11f-0f96-4487-83b0-bca6c9aae2bd\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9734615173\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/8b794ba5\",\n \"resource\": {\n \"id\": \"8b794ba5\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n },\n {\n \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",\n \"value\": \"a6f2b11f-0f96-4487-83b0-bca6c9aae2bd\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9694154065\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" - } - ] - }, - { - "name": "Valid request - No proxy roles returned - Get proxy roles", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - }, - { - "listen": "prerequest", - "script": { - "exec": [ - "" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "SomeToken;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?patient:identifier=9736898199", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "patient:identifier", - "value": "9736898199" - } - ] - }, - "description": "## Example scenario\n\n**Given** no proxy roles exist for a patient/performer in NPS or GPIT systems \n**When** a GET /Consent request is sent with the performer/patient identifier \n**Then** no proxy roles are returned\n\n## Authorization\n\nPlease see the folder overview for details of how to generate tokens for this endpoint." - }, - "response": [ - { - "name": "No roles returned", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "b8b052ae-6841-4b64-bdf0-c969d32d94bd", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "e9920101-1ae7-4644-8ae9-5298f7bdda3b", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "SomeToken;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?patient:identifier=9736898199", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "patient:identifier", - "value": "9736898199" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Thu, 27 Nov 2025 15:20:11 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "254" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "62f7a9ef-477a-4a24-8bba-c3da1f684805" - }, - { - "key": "x-amz-apigw-id", - "value": "UtXWqH7MLPEFkaw=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-69286c2a-60c4f8c5c094e6753e2352ce" - }, - { - "key": "X-Request-ID", - "value": "31683198-4901-4516-8522-baf7a3de343a" - }, - { - "key": "X-Correlation-ID", - "value": "bdc29a81-c2c3-4622-b1cb-6b0d939ef622" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2025-11-27T15:20:11Z\",\n \"total\": 0,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?patient%3Aidentifier=9736898199\"\n }\n ],\n \"entry\": []\n}" - } - ] - }, - { - "name": "Invalid status parameter - Get proxy roles", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "SomeToken;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?patient:identifier=9736898199&status=test", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "patient:identifier", - "value": "9736898199" - }, - { - "key": "status", - "value": "test" - } - ] - }, - "description": "## Example scenario\n\n**Given** proxy roles exist for a patient/performer in NPS or a GPIT system \n**When** a GET /Consent request is sent with an invalid status parameter \n**Then** a 422 error is returned with the detail 'Required parameter(s) are invalid.'\n\n## Authorization\n\nPlease see the folder overview for details of how to generate tokens for this endpoint." - }, - "response": [ - { - "name": "Invalid status parameter error returned", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "dcc26889-b2fe-4794-9531-88c887f7e134", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "91e70db5-6a5d-4382-bfc1-027d2b81bc3c", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "SomeToken;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?patient:identifier=9736898199&status=test", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "patient:identifier", - "value": "9736898199" - }, - { - "key": "status", - "value": "test" - } - ] - } - }, - "status": "Unprocessable Entity (WebDAV) (RFC 4918)", - "code": 422, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Thu, 27 Nov 2025 16:45:57 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "375" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "072d3fa4-9703-4b80-88ba-e679c01b3129" - }, - { - "key": "x-amz-apigw-id", - "value": "Utj6vHGjLPEFvyQ=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-69288044-9a8fa9560202aeb1b9390e51" - }, - { - "key": "X-Request-ID", - "value": "0437a831-fa18-43ca-a376-21b2a8f33900" - }, - { - "key": "X-Correlation-ID", - "value": "8cf2b8d1-d98e-4b93-bb62-34583b31f0ea" - }, - { - "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_PARAMETER\",\n \"display\": \"Required parameter(s) are invalid.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"Invalid request with error - status parameter is invalid.\",\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" - } - ] - }, - { - "name": "Invalid include parameter - Get proxy roles", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "SomeToken;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9736898148&_include=Consent:test", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9736898148" - }, - { - "key": "_include", - "value": "Consent:test" - } - ] - }, - "description": "## Gherkin scenario\n\n**Given** proxy roles exist for a patient/performer in NPS or a GPIT system \n**When** a GET /Consent request is sent with an invalid include parameter \n**Then** a 422 error is returned with the detail 'Required parameter(s) are invalid.'\n\n## Authorization\n\nPlease see the folder overview for details of how to generate tokens for this endpoint." - }, - "response": [ - { - "name": "Invalid include parameter error returned", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "b14c0f0f-ad95-45e4-9b2a-9286fb050453", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "e7e0d226-d580-44a6-8688-2aeb0deedf00", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "SomeToken;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9736898148&_include=Consent:test", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9736898148" - }, - { - "key": "_include", - "value": "Consent:test" - } - ] - } - }, - "status": "Unprocessable Entity (WebDAV) (RFC 4918)", - "code": 422, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Thu, 27 Nov 2025 16:46:36 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "377" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "e9f62008-61ec-417a-8231-506b51d07844" - }, - { - "key": "x-amz-apigw-id", - "value": "UtkBAFkIrPEFuvQ=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-6928806c-3f5337b27e75f90c703fd6b0" - }, - { - "key": "X-Request-ID", - "value": "fb15a103-bf9a-499e-a7b1-24dc6563eb13" - }, - { - "key": "X-Correlation-ID", - "value": "f5ec5ae0-c762-4efb-95e3-317628c5cd80" - }, - { - "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_PARAMETER\",\n \"display\": \"Required parameter(s) are invalid.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"Invalid request with error - _include parameter is invalid.\",\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" - } - ] - }, - { - "name": "Invalid performer identifier - Get proxy roles", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "SomeToken;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=90000000", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "90000000" - } - ] - }, - "description": "## Example scenario\n\n**Given** proxy roles exist for a patient/performer in NPS or a GPIT system \n**When** a GET /Consent request is sent with an invalid performer identifier \n**Then** a 422 error is returned with the detail 'Required parameter(s) are invalid.'\n\n## Authorization\n\nPlease see the folder overview for details of how to generate tokens for this endpoint." - }, - "response": [ - { - "name": "Invalid performer identifier returned", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "6e975672-d1b4-402c-b47d-0994d55e1517", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "268d0936-6ffb-474a-a7bf-f44d4214e36e", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "SomeToken;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=90000000", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "90000000" - } - ] - } - }, - "status": "Unprocessable Entity (WebDAV) (RFC 4918)", - "code": 422, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Thu, 27 Nov 2025 16:47:01 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "428" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "2c57ff69-fe19-498b-8163-00b392e47313" - }, - { - "key": "x-amz-apigw-id", - "value": "UtkE-EaXLPEFV9Q=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-69288085-dfbdd45a57543fb9bb4ebd8b" - }, - { - "key": "X-Request-ID", - "value": "2d274752-140d-49de-ab31-56012d28c2cb" - }, - { - "key": "X-Correlation-ID", - "value": "7187bca7-8d57-4561-b0f2-a5aba91ec94c" - }, - { - "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_IDENTIFIER_VALUE\",\n \"display\": \"Required parameter(s) are invalid.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"Invalid request with error - performer:identifier or patient:identifier parameter is invalid.\",\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" - } - ] - }, - { - "name": "Invalid performer identifier system - Get proxy roles", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "SomeToken;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=invalid|9736898199", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "invalid|9736898199" - } - ] - }, - "description": "## Example scenario\n\n**Given** proxy roles exist for a patient/performer in NPS or a GPIT system \n**When** a GET /Consent request is sent with an invalid performer identifier system \n**Then** a 422 error is returned with the detail 'Required parameter(s) are invalid.'\n\n## Authorization\n\nPlease see the folder overview for details of how to generate tokens for this endpoint." - }, - "response": [ - { - "name": "Invalid performer identifier system error returned", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "995e5222-fce7-40e2-8424-1e920d920491", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "16ec5418-1591-45f7-a84c-e95cbcd5cd67", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "SomeToken;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=invalid|9736898199", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "invalid|9736898199" - } - ] - } - }, - "status": "Unprocessable Entity (WebDAV) (RFC 4918)", - "code": 422, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Thu, 27 Nov 2025 16:47:46 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "426" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "8a8529b6-34ac-46b1-8868-0a6ec0440151" - }, - { - "key": "x-amz-apigw-id", - "value": "UtkL-HDVLPEFVxg=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-692880b2-6286da8b511f08a6d7ccf9db" - }, - { - "key": "X-Request-ID", - "value": "9cc2d0ef-8f7a-46b7-89c9-c884bf61cc3a" - }, - { - "key": "X-Correlation-ID", - "value": "57948f02-5db0-4267-a6b7-cae30485e5eb" - }, - { - "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_IDENTIFIER_SYSTEM\",\n \"display\": \"Required parameter(s) are invalid.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"Invalid request with error - performer:identifier or patient:identifier system parameter is invalid.\",\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" - } - ] - }, - { - "name": "Missing performer identifier value - Get proxy roles", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "SomeToken;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ] - }, - "description": "## Example scenario\n\n**Given** proxy roles exist for a patient/performer in NPS or a GPIT system \n**When** a GET /Consent request is sent with an missing performer identifier value \n**Then** a 400 error is returned with the detail 'Required parameter(s) are missing.'\n\n## Authorization\n\nPlease see the folder overview for details of how to generate tokens for this endpoint." - }, - "response": [ - { - "name": "Missing performer identifier value error returned", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "53b3ca95-ad9d-4cd5-a194-78a42daff0df", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "88aaae3f-7168-4f69-b71a-60641082ab4b", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "SomeToken;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ] - } - }, - "status": "Bad Request", - "code": 400, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Thu, 27 Nov 2025 16:48:15 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "417" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "4984ba67-d994-4f08-910e-e25024a8ba57" - }, - { - "key": "x-amz-apigw-id", - "value": "UtkQdERvrPEFrBg=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-692880cf-614067cb88aa075eca482015" - }, - { - "key": "X-Request-ID", - "value": "f536a55f-7115-4ab4-a1c9-3049ca919351" - }, - { - "key": "X-Correlation-ID", - "value": "636e5f80-53b3-4bcf-9176-2967325a9e85" - }, - { - "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_IDENTIFIER_VALUE\",\n \"display\": \"Required parameter(s) are missing.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"Invalid request with error - performer:identifier or patient:identifier parameter not found.\",\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" - } - ] - }, - { - "name": "GP practice not found - Get proxy roles", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "SomeToken;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=false;nam-cache-enabled=false;nam-enabled=true;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9736898229", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9736898229" - } - ] - }, - "description": "## Example scenario\n\n**Given** a performer/patient is not registered at a GP \n**And** the performer/patient has no proxy roles in the National Proxy Store \n**When** a GET /Consent request is sent for the performer/patient \n**Then** a 404 error is returned with the detail 'GP Practice could not be found - invalid resources cannot be retrieved'\n\n## Authorization\n\nPlease see the folder overview for details of how to generate tokens for this endpoint." - }, - "response": [ - { - "name": "GP practice not found error returned", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "7c22ece1-b0a0-4067-8ad7-56f8bceced93", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "f1b40261-0aa6-44de-8563-3bfcc5813510", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "SomeToken;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=false;nam-cache-enabled=false;nam-enabled=true;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9736898229", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9736898229" - } - ] - } - }, - "status": "Not Found", - "code": 404, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Thu, 27 Nov 2025 16:48:38 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "391" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "e0bae044-bde7-4def-a600-199f72ea2e50" - }, - { - "key": "x-amz-apigw-id", - "value": "UtkTcEIOLPEF5aQ=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-692880e2-7d058bc8fc71f9ee272f339d" - }, - { - "key": "X-Request-ID", - "value": "c1f8bed5-6729-4b9f-b20c-180b069809ed" - }, - { - "key": "X-Correlation-ID", - "value": "3132cc74-64ef-465d-aac9-502f27c6ac1d" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"issue\": [\n {\n \"code\": \"processing\",\n \"details\": {\n \"coding\": [\n {\n \"code\": \"GP_PRACTICE_NOT_FOUND\",\n \"display\": \"GP Practice could not be found - invalid resources cannot be retrieved\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"GP Practice could not be found\",\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" - } - ] - } - ], - "description": "## Authorization\n\n### Allowed auth methods\n\n- App restricted token\n \n- NHS Login token - Auth with test user `9730675929`\n \n- CIS2 token - Auth with test user `656005750108`\n \n\nSee collection level documentation for info about how to get authorization tokens.\n\n## NPS and NAM routing\n\nYou will notice that there are 'Valid request - NPS' and 'Valid request - NAM' requests and examples within this folder. These are set up to retrieve the proxy roles from different data sources:\n\n- **Valid request - NPS**: Retrieves the roles from the National Proxy Store (NPS) only. Following the eventual migration of all proxy and related person data from GPIT to NPS, this will become the only route for all requests.\n \n- **Valid request - NAM:** Retrives the roles as related person data from the GPIT suppliers via NAM without checking if any exist in NPS first. This requires specific connection parameters to authorise with the GPIT supplier systems\n \n\nThis routing is controlled in the requests by the `X-Test-Routing-Flag` header. This header is used in the VRS pre-prod environments to control where the proxy roles are retrieved from. It is intended to be used for testing purposes only. Omission of this header will cause the default routing settings for the given environment to be followed instead. This is typically for roles to be retrieved from NPS, with NAM used as a fallback if none are found.", - "auth": { - "type": "bearer", - "bearer": [ - { - "key": "token", - "value": "{{consent_app_auth_header_value}}", - "type": "string" - } - ] - }, - "event": [ - { - "listen": "prerequest", - "script": { - "type": "text/javascript", - "packages": {}, - "requests": {}, - "exec": [ - "var uuid = require('uuid');", - "", - "var privateKey = pm.environment.get('vrs_api_private_key') || '';", - "var api_key_value = pm.environment.get('nhs_developer_account_api_key') || '';", - "", - "if (!privateKey) {", - " throw new Error(\"Variable vrs_api_private_key must be set with your private key for signed JWT authentication.\");", - "}", - "", - "// Replace any '/n' new lines with actual new lines", - "privateKey = privateKey.replace(/\\\\n/g, '\\n');", - "", - "if (!api_key_value) {", - " throw new Error(\"Variable nhs_developer_account_app_key must be set with your integration testing application API key.\");", - "}", - "", - "var auth_url = 'https://int.api.service.nhs.uk/oauth2-mock/token';", - "var navigator = {};", - "var window = {};", - "const interval = setTimeout(() => {}, 2147483647);", - "", - "return new Promise((resolve, reject) => { ", - " if (pm.globals.has('jsrsasign-js') && pm.globals.get('jsrsasign-js') !== \"\") {", - " return resolve();", - " }", - "", - " pm.sendRequest(", - " {", - " url: 'https://kjur.github.io/jsrsasign/jsrsasign-all-min.js',", - " method: 'GET'", - " }, function (err, res) {", - " if (err) {", - " return reject(err);", - " }", - "", - " pm.globals.set('jsrsasign-js', res.text()); ", - " return resolve();", - " }", - " );", - "}).then(() => { ", - " eval(pm.globals.get(\"jsrsasign-js\")); ", - "", - " // Set headers for JWT", - " var header = {", - " 'typ': 'JWT',", - " 'alg': 'RS512',", - " 'kid': 'VRS-dev-12-nov-2025'", - " };", - "", - " // Prepare timestamp in seconds", - " var currentTimestamp = Math.floor(Date.now() / 1000)", - " var uuid = require('uuid');", - " var jti_value = uuid.v4();", - " var data = {", - " 'sub': api_key_value,", - " 'iss': api_key_value,", - " 'jti': jti_value,", - " 'aud': auth_url,", - " 'exp': currentTimestamp + 180, // expiry time is 180 seconds from time of creation", - " } ", - "", - " var sJWT = KJUR.jws.JWS.sign(header.alg, JSON.stringify(header), JSON.stringify(data), privateKey); ", - " return new Promise((resolve, reject) => { ", - " pm.sendRequest({", - " url: auth_url,", - " method: \"POST\",", - " header: {", - " \"Content-Type\": \"application/x-www-form-urlencoded\"", - " },", - " body: {", - " mode: \"urlencoded\",", - " urlencoded: [", - " {", - " key: \"grant_type\",", - " value: \"client_credentials\"", - " },", - " {", - " key: \"client_assertion_type\",", - " value: \"urn:ietf:params:oauth:client-assertion-type:jwt-bearer\",", - " },", - " {", - " key: \"client_assertion\",", - " value: sJWT", - " }", - " ]", - " }", - " }, function (err, res) { ", - " if (err) {", - " return reject(err);", - " }", - "", - " //assign the authorization header value", - " pm.environment.set('consent_app_auth_header_value', `${res.json().access_token}`);", - "", - " return resolve();", - " }); ", - " });", - "}).then(() => { ", - " clearTimeout(interval);", - "}).catch((err) => { ", - " console.error(err); ", - " clearTimeout(interval); ", - "});" - ] - } - }, - { - "listen": "test", - "script": { - "type": "text/javascript", - "packages": {}, - "requests": {}, - "exec": [ - "" - ] - } - } - ] - }, - { - "name": "Get proxy role (GET /Consent/{id})", - "item": [ - { - "name": "Valid request - Get proxy role", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent/:consent_id", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - ":consent_id" - ], - "variable": [ - { - "key": "consent_id", - "value": "4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40" - } - ] - }, - "description": "## Example scenario\n\n**Given** a proxy role exists between a performer and a patient in the National Proxy Store \n**When** a GET /Consent/{id} request is sent with the consent id of the proxy role \n**Then** the proxy role is returned" - }, - "response": [ - { - "name": "Proxy role returned - No patient or performer details", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "4b1a8cf8-aa7e-4aa2-b465-44a5d25be876", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "b09740bc-b71f-4d04-a597-c89ab3804f90", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent/:consent_id", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - ":consent_id" - ], - "variable": [ - { - "key": "consent_id", - "value": "4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Date", - "value": "Thu, 04 Dec 2025 11:28:18 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "1873" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "23636f8d-f5ef-4050-8c67-51e393b47c87" - }, - { - "key": "x-amz-apigw-id", - "value": "VD581F_4LPEFyDg=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-69317051-6384bdf9e3106d26096daa32" - }, - { - "key": "X-Request-ID", - "value": "784fb8d0-37ff-4716-bf77-81a395fd20f8" - }, - { - "key": "X-Correlation-ID", - "value": "ec404ce9-1721-4158-91af-2064ad3e7ea4" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2025-12-04T11:28:18Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40\",\n \"resource\": {\n \"id\": \"4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"Information Access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ],\n \"text\": \"Information Access Consent\"\n }\n ],\n \"dateTime\": \"2025-12-04T11:08:46Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898660\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-12-05\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ],\n \"text\": \"Patient Privacy Consent\"\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n }\n ]\n}" - }, - { - "name": "Proxy role returned - Include performer details", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent/:consent_id?_include=Consent:performer", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - ":consent_id" - ], - "query": [ - { - "key": "_include", - "value": "Consent:performer" - } - ], - "variable": [ - { - "key": "consent_id", - "value": "4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Date", - "value": "Thu, 04 Dec 2025 11:28:48 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "2789" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "a1f034c1-6ee8-499e-aa60-eea157ad4bd9" - }, - { - "key": "x-amz-apigw-id", - "value": "VD6AYFQMrPEFgjw=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-69317068-3a18b175fb02b76c68acfce1" - }, - { - "key": "X-Request-ID", - "value": "e8a5dada-5577-4738-abd5-7a09251e8c3b" - }, - { - "key": "X-Correlation-ID", - "value": "5eeb9d78-133f-4132-b121-649162a6bc14" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2025-12-04T11:28:47Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40?_include=Consent%3Aperformer\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40\",\n \"resource\": {\n \"id\": \"4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"Information Access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ],\n \"text\": \"Information Access Consent\"\n }\n ],\n \"dateTime\": \"2025-12-04T11:08:46Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898660\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-12-05\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ],\n \"text\": \"Patient Privacy Consent\"\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/nVLgl\",\n \"resource\": {\n \"id\": \"nVLgl\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898660\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" - }, - { - "name": "Proxy role returned - Include patient details", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent/:consent_id?_include=Consent:patient", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - ":consent_id" - ], - "query": [ - { - "key": "_include", - "value": "Consent:patient" - } - ], - "variable": [ - { - "key": "consent_id", - "value": "4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Date", - "value": "Thu, 04 Dec 2025 11:29:08 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "3601" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "b6cb5439-d1a8-4f95-bd3e-9dca7bed9e88" - }, - { - "key": "x-amz-apigw-id", - "value": "VD6ErHoPLPEF1rg=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-69317083-b57a368a7776107b8b3e5f7a" - }, - { - "key": "X-Request-ID", - "value": "22ca0610-1b6e-4e3a-aa1a-ede697da4a1d" - }, - { - "key": "X-Correlation-ID", - "value": "71035b63-936a-4ce4-b036-3d592c764d88" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2025-12-04T11:29:08Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40?_include=Consent%3Apatient\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40\",\n \"resource\": {\n \"id\": \"4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"Information Access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ],\n \"text\": \"Information Access Consent\"\n }\n ],\n \"dateTime\": \"2025-12-04T11:08:46Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898660\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-12-05\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ],\n \"text\": \"Patient Privacy Consent\"\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898660\",\n \"resource\": {\n \"id\": \"9736898660\",\n \"meta\": {\n \"security\": [\n {\n \"code\": \"U\",\n \"display\": \"unrestricted\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-Confidentiality\"\n },\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ],\n \"versionId\": \"4\"\n },\n \"address\": [\n {\n \"extension\": [\n {\n \"extension\": [\n {\n \"url\": \"type\",\n \"valueCoding\": {\n \"code\": \"PAF\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType\"\n }\n },\n {\n \"url\": \"value\",\n \"valueString\": \"19976537\"\n }\n ],\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey\"\n }\n ],\n \"id\": \"pBQDr\",\n \"line\": [\n \"CARLTON\",\n \"VICARAGE LANE\",\n \"REDBOURNE\",\n \"GAINSBOROUGH\",\n \"LINCS\"\n ],\n \"period\": {\n \"start\": \"2025-07-15\"\n },\n \"postalCode\": \"DN21 4QW\",\n \"use\": \"home\"\n }\n ],\n \"birthDate\": \"2012-04-24\",\n \"gender\": \"female\",\n \"generalPractitioner\": [\n {\n \"id\": \"xSEnH\",\n \"identifier\": {\n \"period\": {\n \"start\": \"2024-11-06\"\n },\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A20047\"\n }\n }\n ],\n \"identifier\": [\n {\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"01\",\n \"display\": \"Number present and verified\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\n \"version\": \"1.0.0\"\n }\n ]\n }\n }\n ],\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898660\"\n }\n ],\n \"name\": [\n {\n \"family\": \"GODREY\",\n \"given\": [\n \"Davina\",\n \"Linda\"\n ],\n \"period\": {\n \"start\": \"2017-04-22\"\n },\n \"prefix\": [\n \"MISS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" - }, - { - "name": "Proxy role returned - Include performer and patient details", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent/:consent_id?_include=Consent:patient&_include=Consent:performer", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - ":consent_id" - ], - "query": [ - { - "key": "_include", - "value": "Consent:patient" - }, - { - "key": "_include", - "value": "Consent:performer" - } - ], - "variable": [ - { - "key": "consent_id", - "value": "4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Date", - "value": "Thu, 04 Dec 2025 11:29:26 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "4517" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "9db19dac-df92-4494-8f31-076621ab3d1a" - }, - { - "key": "x-amz-apigw-id", - "value": "VD6HkGFkrPEFxmw=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-69317096-6ad930e767f145f7dd07b977" - }, - { - "key": "X-Request-ID", - "value": "5fd5c3dc-1f5c-4ac5-a9b4-018fdd7f1a0b" - }, - { - "key": "X-Correlation-ID", - "value": "fd7368b4-0828-40b0-97fa-6d19fb51a9e0" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2025-12-04T11:29:26Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40?_include=Consent%3Apatient&_include=Consent%3Aperformer\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40\",\n \"resource\": {\n \"id\": \"4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"Information Access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ],\n \"text\": \"Information Access Consent\"\n }\n ],\n \"dateTime\": \"2025-12-04T11:08:46Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898660\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-12-05\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ],\n \"text\": \"Patient Privacy Consent\"\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898660\",\n \"resource\": {\n \"id\": \"9736898660\",\n \"meta\": {\n \"security\": [\n {\n \"code\": \"U\",\n \"display\": \"unrestricted\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-Confidentiality\"\n },\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ],\n \"versionId\": \"4\"\n },\n \"address\": [\n {\n \"extension\": [\n {\n \"extension\": [\n {\n \"url\": \"type\",\n \"valueCoding\": {\n \"code\": \"PAF\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType\"\n }\n },\n {\n \"url\": \"value\",\n \"valueString\": \"19976537\"\n }\n ],\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey\"\n }\n ],\n \"id\": \"pBQDr\",\n \"line\": [\n \"CARLTON\",\n \"VICARAGE LANE\",\n \"REDBOURNE\",\n \"GAINSBOROUGH\",\n \"LINCS\"\n ],\n \"period\": {\n \"start\": \"2025-07-15\"\n },\n \"postalCode\": \"DN21 4QW\",\n \"use\": \"home\"\n }\n ],\n \"birthDate\": \"2012-04-24\",\n \"gender\": \"female\",\n \"generalPractitioner\": [\n {\n \"id\": \"xSEnH\",\n \"identifier\": {\n \"period\": {\n \"start\": \"2024-11-06\"\n },\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A20047\"\n }\n }\n ],\n \"identifier\": [\n {\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"01\",\n \"display\": \"Number present and verified\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\n \"version\": \"1.0.0\"\n }\n ]\n }\n }\n ],\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898660\"\n }\n ],\n \"name\": [\n {\n \"family\": \"GODREY\",\n \"given\": [\n \"Davina\",\n \"Linda\"\n ],\n \"period\": {\n \"start\": \"2017-04-22\"\n },\n \"prefix\": [\n \"MISS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/nVLgl\",\n \"resource\": {\n \"id\": \"nVLgl\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898660\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" - } - ] - }, - { - "name": "Invalid consent id - Get proxy role", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent/:consent_id", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - ":consent_id" - ], - "variable": [ - { - "key": "consent_id", - "value": "invalid" - } - ] - }, - "description": "## Example scenario\n\n**Given** a proxy role exists between a performer and a patient in the National Proxy Store \n**When** a GET /Consent/{id} request is sent where the ID is invalid \n**Then** a 400 error is returned with details including 'Required parameter(s) are invalid.'" - }, - "response": [ - { - "name": "Invalid consent id error returned", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "6ada3f0b-6520-4517-a71c-8ee93616f52b", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "ac9c9714-f361-44f2-92be-ea1eb00f9990", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent/:consent_id", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - ":consent_id" - ], - "variable": [ - { - "key": "consent_id", - "value": "invalid" - } - ] - } - }, - "status": "Unprocessable Entity (WebDAV) (RFC 4918)", - "code": 422, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Thu, 27 Nov 2025 16:49:51 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "370" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "8bae29b7-2cf9-4f6f-b054-0ff6133092b7" - }, - { - "key": "x-amz-apigw-id", - "value": "UtkfVE6VLPEFmDg=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-6928812e-f15d362bb65b30e32885ea32" - }, - { - "key": "X-Request-ID", - "value": "51f1c948-51e0-4719-8307-fd1f987809a1" - }, - { - "key": "X-Correlation-ID", - "value": "cf91adbc-f994-4a56-9d6b-2b324c0af196" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"issue\": [\n {\n \"code\": \"invalid\",\n \"diagnostics\": \"Invalid request with error - ID must be a valid UUID.\",\n \"details\": {\n \"coding\": [\n {\n \"code\": \"INVALID_ID_VALUE\",\n \"display\": \"Required parameter(s) are invalid.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" - } - ] - }, - { - "name": "Invalid include parameter - Get proxy role", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent/:consent_id?_include=Consent:invalid", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - ":consent_id" - ], - "query": [ - { - "key": "_include", - "value": "Consent:invalid" - } - ], - "variable": [ - { - "key": "consent_id", - "value": "77363c92-8c33-490f-b5c9-9ef81c2cf16f" - } - ] - }, - "description": "## Example scenario\n\n**Given** a proxy role exists between a performer and a patient in the National Proxy Store \n**When** a GET /Consent/{id} request is sent with an invalid include parameter \n**Then** a 422 error is returned with details including 'Required parameter(s) are invalid.'" - }, - "response": [ - { - "name": "Invalid include parameter error returned", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "b6656a79-4fde-4def-b9ae-5cb1d5667d8f", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "7ae117a4-5b43-4aac-aa00-5fcc0c460fac", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent/:consent_id?_include=Consent:invalid", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - ":consent_id" - ], - "query": [ - { - "key": "_include", - "value": "Consent:invalid" - } - ], - "variable": [ - { - "key": "consent_id", - "value": "77363c92-8c33-490f-b5c9-9ef81c2cf16f" - } - ] - } - }, - "status": "Unprocessable Entity (WebDAV) (RFC 4918)", - "code": 422, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Thu, 27 Nov 2025 16:50:07 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "377" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "6da48428-7512-4d8b-9856-b2cc37713381" - }, - { - "key": "x-amz-apigw-id", - "value": "Utkh9GPDLPEF3pw=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-6928813f-6ca71472e425ed45ed5bd0a5" - }, - { - "key": "X-Request-ID", - "value": "2dbb0b8c-a6c8-4bf2-9005-ec19ff68f5b2" - }, - { - "key": "X-Correlation-ID", - "value": "ec9a3692-5922-491d-8df1-da17fe8e473b" - }, - { - "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_PARAMETER\",\n \"display\": \"Required parameter(s) are invalid.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"Invalid request with error - _include parameter is invalid.\",\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" - } - ] - }, - { - "name": "Proxy role not found - Get proxy role", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent/:consent_id", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - ":consent_id" - ], - "variable": [ - { - "key": "consent_id", - "value": "4cfccac1-673c-4fea-9b73-54b1a605c9a0" - } - ] - }, - "description": "## Example scenario\n\n**Given** a proxy role does not exist between a performer and a patient in the National Proxy Store \n**When** a GET /Consent/{id} request is sent \n**Then** a 404 error is returned with details including 'Resource that has been marked as invalid was requested - invalid resources cannot be retrieved'" - }, - "response": [ - { - "name": "Proxy role not found error response", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "ed862755-76fc-47b5-9381-9578062418e3", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "5095096c-4f78-4544-b812-ba9a4b21d08d", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent/:consent_id", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - ":consent_id" - ], - "variable": [ - { - "key": "consent_id", - "value": "4cfccac1-673c-4fea-9b73-54b1a605c9a0" - } - ] - } - }, - "status": "Not Found", - "code": 404, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Thu, 27 Nov 2025 16:50:22 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "478" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "ece32b72-4d4a-43c9-b42a-e47b729e04da" - }, - { - "key": "x-amz-apigw-id", - "value": "UtkkIHJprPEFiYw=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-6928814d-5023dcb7c8009889ccde4f3d" - }, - { - "key": "X-Request-ID", - "value": "3ec49ee6-c56c-4df9-aa7a-f54bb6b3e795" - }, - { - "key": "X-Correlation-ID", - "value": "74eb5dd5-2d74-4b3a-a482-5480e1ad6464" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"issue\": [\n {\n \"code\": \"processing\",\n \"details\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\",\n \"code\": \"INVALIDATED_RESOURCE\",\n \"display\": \"Resource that has been marked as invalid was requested - invalid resources cannot be retrieved\"\n }\n ]\n },\n \"diagnostics\": \"Resource that has been marked as invalid was requested - invalid resources cannot be retrieved\",\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" - } - ] - }, - { - "name": "Missing consent id value - Get proxy role", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent/", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - "" - ] - }, - "description": "## Example scenario\n\n**Given** a proxy role exists between a performer and a patient in the National Proxy Store \n**When** a GET /Consent/{id} request is sent with the ID value missing \n**Then** a 400 error is returned with details including 'Required parameter(s) are missing.'" - }, - "response": [ - { - "name": "Missing consent id value error returned", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "7c50dc2d-fc25-4bed-8ce8-d58b4811f58c", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "210ede12-efec-4195-b2cd-1a04d1827a81", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent/", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - "" - ] - } - }, - "status": "Bad Request", - "code": 400, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Thu, 27 Nov 2025 16:51:00 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "417" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "c4a3d99b-0ea1-40de-82bf-5cd2fa60afd6" - }, - { - "key": "x-amz-apigw-id", - "value": "UtkqLGF_rPEFcMw=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-69288173-c5d997b9110a61bf7b655fe7" - }, - { - "key": "X-Request-ID", - "value": "de0e2e5b-1f1b-4448-a7ee-42d0236b88a6" - }, - { - "key": "X-Correlation-ID", - "value": "6f458de2-64c6-4764-9044-34a5617d3d43" - }, - { - "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_IDENTIFIER_VALUE\",\n \"display\": \"Required parameter(s) are missing.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"Invalid request with error - performer:identifier or patient:identifier parameter not found.\",\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" - } - ] - } - ], - "description": "## Allowed auth methods\n\n- NHS Login token - Auth with test user `9730675929`\n \n- CIS2 token - Auth with test user `656005750108`\n \n\nSee collection level documentation for info about how to get authorization tokens.", - "auth": { - "type": "bearer", - "bearer": [ - { - "key": "token", - "value": "{{cis2_token}}", - "type": "string" - } - ] - }, - "event": [ - { - "listen": "prerequest", - "script": { - "type": "text/javascript", - "packages": {}, - "requests": {}, - "exec": [ - "" - ] - } - }, - { - "listen": "test", - "script": { - "type": "text/javascript", - "packages": {}, - "requests": {}, - "exec": [ - "" - ] - } - } - ] - }, - { - "name": "Create a new access request (POST /QuestionnaireResponse)", - "item": [ - { - "name": "Valid request - Proxy applicant - New adult to adult access request", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/fhir+json", - "type": "text" - }, - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Use-National-Proxy-Store", - "value": "False", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"resourceType\": \"QuestionnaireResponse\",\n \"status\": \"completed\",\n \"authored\": \"{{$isoTimestamp}}\",\n \"source\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9730675929\"\n }\n },\n \"subject\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898202\"\n }\n },\n \"questionnaire\": \"Questionnaire/{{$randomUUID}}\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson\",\n \"text\": \"relatedPerson\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_identifier\",\n \"text\": \"NHS Number\",\n \"answer\": [\n {\n \"valueString\": \"9730675929\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name\",\n \"text\": \"relatedPerson_name\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_name_first\",\n \"text\": \"First name.\",\n \"answer\": [\n {\n \"valueString\": \"Betty\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name_family\",\n \"text\": \"Family name (often called Surname).\",\n \"answer\": [\n {\n \"valueString\": \"MORLEY\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_birthDate\",\n \"text\": \"Date of Birth\",\n \"answer\": [\n {\n \"valueDate\": \"2005-01-20\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_basisForAccess\",\n \"text\": \"Basis For Access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_relationship\",\n \"text\": \"Relationship\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient\",\n \"text\": \"patient\",\n \"item\": [\n {\n \"linkId\": \"patient_identifier\",\n \"text\": \"NHS Number\",\n \"answer\": [\n {\n \"valueString\": \"9736898202\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name\",\n \"text\": \"patient_name\",\n \"item\": [\n {\n \"linkId\": \"patient_name_first\",\n \"text\": \"First name.\",\n \"answer\": [\n {\n \"valueString\": \"URIEL\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name_family\",\n \"text\": \"Family name (often called Surname).\",\n \"answer\": [\n {\n \"valueString\": \"ROTH\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient_birthDate\",\n \"text\": \"Date of Birth\",\n \"answer\": [\n {\n \"valueDate\": \"1988-11-10\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess\",\n \"text\": \"requestedAccess\",\n \"item\": [\n {\n \"linkId\": \"requestedAccess_accessLevel\",\n \"text\": \"Requested access level\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"APPT\",\n \"display\": \"Appointment Booking\"\n }\n },\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"VACC\",\n \"display\": \"Vaccination Records\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccess\",\n \"text\": \"Reason for access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-ReasonForAccess\",\n \"code\": \"COMB\",\n \"display\": \"Communication Barriers\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccessMoreinfo\",\n \"text\": \"Reason for access - further information\",\n \"answer\": [\n {\n \"valueString\": \"No internet connection\"\n }\n ]\n }\n ]\n }\n ]\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/QuestionnaireResponse", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "QuestionnaireResponse" - ] - }, - "description": "## Example scenario\n\n**Given** no proxy role exists between two adults \n**When** a valid access request is sent with the proxy as the applicant \n**Then** a 201 response is returned" - }, - "response": [ - { - "name": "A2A proxy applicant access request created", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/fhir+json", - "type": "text" - }, - { - "key": "X-Request-ID", - "value": "5ef96245-493a-468c-9936-06fb46e387af", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "15ace5c8-dc43-435f-baf8-3437b76ffdbf", - "type": "text" - }, - { - "key": "X-Use-National-Proxy-Store", - "value": "False", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"resourceType\": \"QuestionnaireResponse\",\n \"status\": \"completed\",\n \"authored\": \"2026-01-12T15:09:45.790Z\",\n \"source\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9730675929\"\n }\n },\n \"subject\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898202\"\n }\n },\n \"questionnaire\": \"Questionnaire/2e61ba16-f2ee-4e16-8526-194873d63f24\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson\",\n \"text\": \"relatedPerson\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_identifier\",\n \"text\": \"NHS Number\",\n \"answer\": [\n {\n \"valueString\": \"9730675929\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name\",\n \"text\": \"relatedPerson_name\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_name_first\",\n \"text\": \"First name.\",\n \"answer\": [\n {\n \"valueString\": \"Betty\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name_family\",\n \"text\": \"Family name (often called Surname).\",\n \"answer\": [\n {\n \"valueString\": \"MORLEY\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_birthDate\",\n \"text\": \"Date of Birth\",\n \"answer\": [\n {\n \"valueDate\": \"2005-01-20\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_basisForAccess\",\n \"text\": \"Basis For Access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_relationship\",\n \"text\": \"Relationship\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient\",\n \"text\": \"patient\",\n \"item\": [\n {\n \"linkId\": \"patient_identifier\",\n \"text\": \"NHS Number\",\n \"answer\": [\n {\n \"valueString\": \"9736898202\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name\",\n \"text\": \"patient_name\",\n \"item\": [\n {\n \"linkId\": \"patient_name_first\",\n \"text\": \"First name.\",\n \"answer\": [\n {\n \"valueString\": \"URIEL\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name_family\",\n \"text\": \"Family name (often called Surname).\",\n \"answer\": [\n {\n \"valueString\": \"ROTH\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient_birthDate\",\n \"text\": \"Date of Birth\",\n \"answer\": [\n {\n \"valueDate\": \"1988-11-10\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess\",\n \"text\": \"requestedAccess\",\n \"item\": [\n {\n \"linkId\": \"requestedAccess_accessLevel\",\n \"text\": \"Requested access level\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"APPT\",\n \"display\": \"Appointment Booking\"\n }\n },\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"VACC\",\n \"display\": \"Vaccination Records\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccess\",\n \"text\": \"Reason for access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-ReasonForAccess\",\n \"code\": \"COMB\",\n \"display\": \"Communication Barriers\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccessMoreinfo\",\n \"text\": \"Reason for access - further information\",\n \"answer\": [\n {\n \"valueString\": \"No internet connection\"\n }\n ]\n }\n ]\n }\n ]\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/QuestionnaireResponse", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "QuestionnaireResponse" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Mon, 01 Dec 2025 16:09:01 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "186" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "720499ae-68fe-495a-8485-862105f276a9" - }, - { - "key": "x-amz-apigw-id", - "value": "U6qQkGxVrPEFeoA=" - }, - { - "key": "location", - "value": "https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/QuestionnaireResponse/e185e5e3-901e-4b6a-bfe2-f9adb0b311a4" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-692dbd9c-999e6478f9613be345a68c77" - }, - { - "key": "X-Request-ID", - "value": "687bfc1b-b7a7-4681-a7bf-01ac6e7dd97a" - }, - { - "key": "X-Correlation-ID", - "value": "6adda3bb-aacf-4e4f-a459-a2a0fe6d34be" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"OperationOutcome\",\n \"issue\": [\n {\n \"severity\": \"information\",\n \"code\": \"informational\",\n \"details\": {\n \"coding\": [\n {\n \"code\": \"19C01XB6WC\",\n \"display\": \"19C01XB6WC\"\n }\n ]\n }\n }\n ]\n}" - } - ] - }, - { - "name": "Valid request - Patient applicant - New adult to adult access request", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/fhir+json", - "type": "text" - }, - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Use-National-Proxy-Store", - "value": "False", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"resourceType\": \"QuestionnaireResponse\",\n \"status\": \"completed\",\n \"authored\": \"{{$isoTimestamp}}\",\n \"source\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9730675929\"\n }\n },\n \"subject\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9730675929\"\n }\n },\n \"questionnaire\": \"Questionnaire/{{$randomUUID}}\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson\",\n \"text\": \"relatedPerson\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_identifier\",\n \"text\": \"NHS Number\",\n \"answer\": [\n {\n \"valueString\": \"9736898164\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name\",\n \"text\": \"relatedPerson_name\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_name_first\",\n \"text\": \"First name.\",\n \"answer\": [\n {\n \"valueString\": \"Heidi\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name_family\",\n \"text\": \"Family name (often called Surname).\",\n \"answer\": [\n {\n \"valueString\": \"LAW\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_birthDate\",\n \"text\": \"Date of Birth\",\n \"answer\": [\n {\n \"valueDate\": \"1997-09-15\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_basisForAccess\",\n \"text\": \"Basis For Access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_relationship\",\n \"text\": \"Relationship\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient\",\n \"text\": \"patient\",\n \"item\": [\n {\n \"linkId\": \"patient_identifier\",\n \"text\": \"NHS Number\",\n \"answer\": [\n {\n \"valueString\": \"9730675929\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name\",\n \"text\": \"patient_name\",\n \"item\": [\n {\n \"linkId\": \"patient_name_first\",\n \"text\": \"First name.\",\n \"answer\": [\n {\n \"valueString\": \"Betty\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name_family\",\n \"text\": \"Family name (often called Surname).\",\n \"answer\": [\n {\n \"valueString\": \"MORLEY\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient_birthDate\",\n \"text\": \"Date of Birth\",\n \"answer\": [\n {\n \"valueDate\": \"2005-01-20\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess\",\n \"text\": \"requestedAccess\",\n \"item\": [\n {\n \"linkId\": \"requestedAccess_accessLevel\",\n \"text\": \"Requested access level\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"APPT\",\n \"display\": \"Appointment Booking\"\n }\n },\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"VACC\",\n \"display\": \"Vaccination Records\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccess\",\n \"text\": \"Reason for access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-ReasonForAccess\",\n \"code\": \"COMB\",\n \"display\": \"Communication Barriers\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccessMoreinfo\",\n \"text\": \"Reason for access - further information\",\n \"answer\": [\n {\n \"valueString\": \"No internet connection\"\n }\n ]\n }\n ]\n }\n ]\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/QuestionnaireResponse", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "QuestionnaireResponse" - ] - }, - "description": "## Example scenario\n\n**Given** no proxy role exists between two adults \n**When** a valid access request is sent with the patient as the applicant \n**Then** a 201 response is returned" - }, - "response": [ - { - "name": "A2A patient applicant access request created", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/fhir+json", - "type": "text" - }, - { - "key": "X-Request-ID", - "value": "8af428cd-7e1e-4ed3-b127-0b751d6ae98d", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "e5cc0a6d-ea0d-433b-9307-30c988926969", - "type": "text" - }, - { - "key": "X-Use-National-Proxy-Store", - "value": "False", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"resourceType\": \"QuestionnaireResponse\",\n \"status\": \"completed\",\n \"authored\": \"2026-01-12T15:09:46.233Z\",\n \"source\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9730675929\"\n }\n },\n \"subject\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9730675929\"\n }\n },\n \"questionnaire\": \"Questionnaire/aa952e3f-3657-4ec3-bec0-25d881ed2e20\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson\",\n \"text\": \"relatedPerson\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_identifier\",\n \"text\": \"NHS Number\",\n \"answer\": [\n {\n \"valueString\": \"9736898164\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name\",\n \"text\": \"relatedPerson_name\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_name_first\",\n \"text\": \"First name.\",\n \"answer\": [\n {\n \"valueString\": \"Heidi\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name_family\",\n \"text\": \"Family name (often called Surname).\",\n \"answer\": [\n {\n \"valueString\": \"LAW\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_birthDate\",\n \"text\": \"Date of Birth\",\n \"answer\": [\n {\n \"valueDate\": \"1997-09-15\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_basisForAccess\",\n \"text\": \"Basis For Access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_relationship\",\n \"text\": \"Relationship\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient\",\n \"text\": \"patient\",\n \"item\": [\n {\n \"linkId\": \"patient_identifier\",\n \"text\": \"NHS Number\",\n \"answer\": [\n {\n \"valueString\": \"9730675929\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name\",\n \"text\": \"patient_name\",\n \"item\": [\n {\n \"linkId\": \"patient_name_first\",\n \"text\": \"First name.\",\n \"answer\": [\n {\n \"valueString\": \"Betty\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name_family\",\n \"text\": \"Family name (often called Surname).\",\n \"answer\": [\n {\n \"valueString\": \"MORLEY\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient_birthDate\",\n \"text\": \"Date of Birth\",\n \"answer\": [\n {\n \"valueDate\": \"2005-01-20\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess\",\n \"text\": \"requestedAccess\",\n \"item\": [\n {\n \"linkId\": \"requestedAccess_accessLevel\",\n \"text\": \"Requested access level\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"APPT\",\n \"display\": \"Appointment Booking\"\n }\n },\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"VACC\",\n \"display\": \"Vaccination Records\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccess\",\n \"text\": \"Reason for access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-ReasonForAccess\",\n \"code\": \"COMB\",\n \"display\": \"Communication Barriers\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccessMoreinfo\",\n \"text\": \"Reason for access - further information\",\n \"answer\": [\n {\n \"valueString\": \"No internet connection\"\n }\n ]\n }\n ]\n }\n ]\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/QuestionnaireResponse", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "QuestionnaireResponse" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Mon, 01 Dec 2025 16:10:22 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "186" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "d15e2ba0-3698-4fcf-80fe-d73279dd89a8" - }, - { - "key": "x-amz-apigw-id", - "value": "U6qdWHFfLPEFoUA=" - }, - { - "key": "location", - "value": "https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/QuestionnaireResponse/bdbba534-6e11-4491-aa3a-1631b0009628" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-692dbdee-08b18875f6f85ab2a7353bd4" - }, - { - "key": "X-Request-ID", - "value": "82cb14a5-09d0-41d4-8f73-2936794c32de" - }, - { - "key": "X-Correlation-ID", - "value": "73873b5d-1e2e-4a42-9dc3-83f1292f944b" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"OperationOutcome\",\n \"issue\": [\n {\n \"severity\": \"information\",\n \"code\": \"informational\",\n \"details\": {\n \"coding\": [\n {\n \"code\": \"19C0177GRI\",\n \"display\": \"19C0177GRI\"\n }\n ]\n }\n }\n ]\n}" - } - ] - }, - { - "name": "Valid request - New adult to child access request", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/fhir+json", - "type": "text" - }, - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Use-National-Proxy-Store", - "value": "False", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"resourceType\": \"QuestionnaireResponse\",\n \"status\": \"completed\",\n \"authored\": \"{{$isoTimestamp}}\",\n \"source\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9730675929\"\n }\n },\n \"subject\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898245\"\n }\n },\n \"questionnaire\": \"Questionnaire/01dc6813-3421-4d14-948d-a4888241add1\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson\",\n \"text\": \"relatedPerson\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_identifier\",\n \"text\": \"NHS Number\",\n \"answer\": [\n {\n \"valueString\": \"9730675929\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name\",\n \"text\": \"relatedPerson_name\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_name_first\",\n \"text\": \"First name.\",\n \"answer\": [\n {\n \"valueString\": \"Betty\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name_family\",\n \"text\": \"Family name (often called Surname).\",\n \"answer\": [\n {\n \"valueString\": \"MORLEY\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_birthDate\",\n \"text\": \"Date of Birth\",\n \"answer\": [\n {\n \"valueDate\": \"2005-01-20\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_basisForAccess\",\n \"text\": \"Basis For Access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_relationship\",\n \"text\": \"Relationship\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails\",\n \"text\": \"parentalApplicationSupplementaryDetails\",\n \"item\": [\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_evidenceOfResponsibility\",\n \"text\": \"Evidence of parental responsibility\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-EvidenceOfResponsibility\",\n \"code\": \"BRTH\",\n \"display\": \"Birth certificate\"\n }\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_evidenceOfResponsibilityMoreinfo\",\n \"text\": \"Evidence of responsibility - Further Information\",\n \"answer\": [\n {\n \"valueString\": \"Birth Certificate is original\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_isCurrentAddressConfirmed\",\n \"text\": \"Is current address confirmed?\",\n \"answer\": [\n {\n \"valueString\": \"Yes\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_newAddress\",\n \"text\": \"parentalApplicationSupplementaryDetails_newAddress\",\n \"item\": [\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_line1\",\n \"text\": \"Address Line 1\",\n \"answer\": [\n {\n \"valueString\": \"101 MESSINGHAM ROAD\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_line2\",\n \"text\": \"Address Line 2\",\n \"answer\": [\n {\n \"valueString\": \"\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_line3\",\n \"text\": \"Address Line 3\",\n \"answer\": [\n {\n \"valueString\": \"\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_city\",\n \"text\": \"Town / City\",\n \"answer\": [\n {\n \"valueString\": \"SCUNTHORPE\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_district\",\n \"text\": \"County\",\n \"answer\": [\n {\n \"valueString\": \"S HUMBERSIDE\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_postalCode\",\n \"text\": \"Postcode\",\n \"answer\": [\n {\n \"valueString\": \"DN17 2LN\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_liveAtSameAddress\",\n \"text\": \"Do the adult and child live at the same address?\",\n \"answer\": [\n {\n \"valueString\": \"Yes\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_canChildConsent\",\n \"text\": \"Can the child consent?\",\n \"answer\": [\n {\n \"valueString\": \"No\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_reasonNoChildConsent\",\n \"text\": \"Reason the child cannot consent\",\n \"answer\": [\n {\n \"valueString\": \"Child is too young\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient\",\n \"text\": \"patient\",\n \"item\": [\n {\n \"linkId\": \"patient_identifier\",\n \"text\": \"NHS Number\",\n \"answer\": [\n {\n \"valueString\": \"9736898245\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name\",\n \"text\": \"patient_name\",\n \"item\": [\n {\n \"linkId\": \"patient_name_first\",\n \"text\": \"First name.\",\n \"answer\": [\n {\n \"valueString\": \"Amber\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name_family\",\n \"text\": \"Family name (often called Surname).\",\n \"answer\": [\n {\n \"valueString\": \"TUCKER\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient_birthDate\",\n \"text\": \"Date of Birth\",\n \"answer\": [\n {\n \"valueDate\": \"2017-06-09\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess\",\n \"text\": \"requestedAccess\",\n \"item\": [\n {\n \"linkId\": \"requestedAccess_accessLevel\",\n \"text\": \"Requested access level\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"APPT\",\n \"display\": \"Appointment Booking\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccess\",\n \"text\": \"Reason for access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-ReasonForAccess\",\n \"code\": \"COMB\",\n \"display\": \"Communication Barriers\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccessMoreinfo\",\n \"text\": \"Reason for access - further information\",\n \"answer\": [\n {\n \"valueString\": \"No internet connection\"\n }\n ]\n }\n ]\n }\n ]\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/QuestionnaireResponse", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "QuestionnaireResponse" - ] - }, - "description": "## Example scenario\n\n**Given** no proxy role exists between an adult and child \n**When** a valid access request is sent with the proxy as the applicant \n**Then** a 201 response is returned" - }, - "response": [ - { - "name": "A2C access request created", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/fhir+json", - "type": "text" - }, - { - "key": "X-Request-ID", - "value": "d6f3b8fe-0041-4c34-aeb4-eac71020170d", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "46efa85e-d5c4-403b-a38a-1945f33bac2c", - "type": "text" - }, - { - "key": "X-Use-National-Proxy-Store", - "value": "False", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"resourceType\": \"QuestionnaireResponse\",\n \"status\": \"completed\",\n \"authored\": \"2026-01-12T15:09:46.453Z\",\n \"source\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9730675929\"\n }\n },\n \"subject\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898245\"\n }\n },\n \"questionnaire\": \"Questionnaire/01dc6813-3421-4d14-948d-a4888241add1\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson\",\n \"text\": \"relatedPerson\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_identifier\",\n \"text\": \"NHS Number\",\n \"answer\": [\n {\n \"valueString\": \"9730675929\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name\",\n \"text\": \"relatedPerson_name\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_name_first\",\n \"text\": \"First name.\",\n \"answer\": [\n {\n \"valueString\": \"Betty\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name_family\",\n \"text\": \"Family name (often called Surname).\",\n \"answer\": [\n {\n \"valueString\": \"MORLEY\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_birthDate\",\n \"text\": \"Date of Birth\",\n \"answer\": [\n {\n \"valueDate\": \"2005-01-20\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_basisForAccess\",\n \"text\": \"Basis For Access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_relationship\",\n \"text\": \"Relationship\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails\",\n \"text\": \"parentalApplicationSupplementaryDetails\",\n \"item\": [\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_evidenceOfResponsibility\",\n \"text\": \"Evidence of parental responsibility\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-EvidenceOfResponsibility\",\n \"code\": \"BRTH\",\n \"display\": \"Birth certificate\"\n }\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_evidenceOfResponsibilityMoreinfo\",\n \"text\": \"Evidence of responsibility - Further Information\",\n \"answer\": [\n {\n \"valueString\": \"Birth Certificate is original\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_isCurrentAddressConfirmed\",\n \"text\": \"Is current address confirmed?\",\n \"answer\": [\n {\n \"valueString\": \"Yes\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_newAddress\",\n \"text\": \"parentalApplicationSupplementaryDetails_newAddress\",\n \"item\": [\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_line1\",\n \"text\": \"Address Line 1\",\n \"answer\": [\n {\n \"valueString\": \"101 MESSINGHAM ROAD\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_line2\",\n \"text\": \"Address Line 2\",\n \"answer\": [\n {\n \"valueString\": \"\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_line3\",\n \"text\": \"Address Line 3\",\n \"answer\": [\n {\n \"valueString\": \"\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_city\",\n \"text\": \"Town / City\",\n \"answer\": [\n {\n \"valueString\": \"SCUNTHORPE\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_district\",\n \"text\": \"County\",\n \"answer\": [\n {\n \"valueString\": \"S HUMBERSIDE\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_postalCode\",\n \"text\": \"Postcode\",\n \"answer\": [\n {\n \"valueString\": \"DN17 2LN\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_liveAtSameAddress\",\n \"text\": \"Do the adult and child live at the same address?\",\n \"answer\": [\n {\n \"valueString\": \"Yes\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_canChildConsent\",\n \"text\": \"Can the child consent?\",\n \"answer\": [\n {\n \"valueString\": \"No\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_reasonNoChildConsent\",\n \"text\": \"Reason the child cannot consent\",\n \"answer\": [\n {\n \"valueString\": \"Child is too young\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient\",\n \"text\": \"patient\",\n \"item\": [\n {\n \"linkId\": \"patient_identifier\",\n \"text\": \"NHS Number\",\n \"answer\": [\n {\n \"valueString\": \"9736898245\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name\",\n \"text\": \"patient_name\",\n \"item\": [\n {\n \"linkId\": \"patient_name_first\",\n \"text\": \"First name.\",\n \"answer\": [\n {\n \"valueString\": \"Amber\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name_family\",\n \"text\": \"Family name (often called Surname).\",\n \"answer\": [\n {\n \"valueString\": \"TUCKER\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient_birthDate\",\n \"text\": \"Date of Birth\",\n \"answer\": [\n {\n \"valueDate\": \"2017-06-09\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess\",\n \"text\": \"requestedAccess\",\n \"item\": [\n {\n \"linkId\": \"requestedAccess_accessLevel\",\n \"text\": \"Requested access level\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"APPT\",\n \"display\": \"Appointment Booking\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccess\",\n \"text\": \"Reason for access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-ReasonForAccess\",\n \"code\": \"COMB\",\n \"display\": \"Communication Barriers\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccessMoreinfo\",\n \"text\": \"Reason for access - further information\",\n \"answer\": [\n {\n \"valueString\": \"No internet connection\"\n }\n ]\n }\n ]\n }\n ]\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/QuestionnaireResponse", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "QuestionnaireResponse" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Mon, 01 Dec 2025 16:11:33 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "186" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "4eba2237-3c13-4bab-afb1-1261b5ac6a19" - }, - { - "key": "x-amz-apigw-id", - "value": "U6qoVF-JLPEFXqQ=" - }, - { - "key": "location", - "value": "https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/QuestionnaireResponse/29a7f71a-2554-4e53-87de-07553d40d5ec" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-692dbe34-f306ba0e1a55aba127add964" - }, - { - "key": "X-Request-ID", - "value": "848e592d-a42e-4fee-b529-8ac484fd459c" - }, - { - "key": "X-Correlation-ID", - "value": "73de9aa5-5951-4d30-8f2d-e64482fb1990" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"OperationOutcome\",\n \"issue\": [\n {\n \"severity\": \"information\",\n \"code\": \"informational\",\n \"details\": {\n \"coding\": [\n {\n \"code\": \"19C01N8Q37\",\n \"display\": \"19C01N8Q37\"\n }\n ]\n }\n }\n ]\n}" - }, - { - "name": "A2C access request created - Verified relationship", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/fhir+json", - "type": "text" - }, - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Use-National-Proxy-Store", - "value": "False", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"resourceType\": \"QuestionnaireResponse\",\n \"status\": \"completed\",\n \"authored\": \"{{$isoTimestamp}}\",\n \"source\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9730675929\"\n }\n },\n \"subject\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9730675422\"\n }\n },\n \"questionnaire\": \"Questionnaire/01dc6813-3421-4d14-948d-a4888241add1\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson\",\n \"text\": \"relatedPerson\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_identifier\",\n \"text\": \"NHS Number\",\n \"answer\": [\n {\n \"valueString\": \"9730675929\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name\",\n \"text\": \"relatedPerson_name\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_name_first\",\n \"text\": \"First name.\",\n \"answer\": [\n {\n \"valueString\": \"Betty\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name_family\",\n \"text\": \"Family name (often called Surname).\",\n \"answer\": [\n {\n \"valueString\": \"MORLEY\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_birthDate\",\n \"text\": \"Date of Birth\",\n \"answer\": [\n {\n \"valueDate\": \"2005-01-20\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_basisForAccess\",\n \"text\": \"Basis For Access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_relationship\",\n \"text\": \"Relationship\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails\",\n \"text\": \"parentalApplicationSupplementaryDetails\",\n \"item\": [\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_evidenceOfResponsibility\",\n \"text\": \"Evidence of parental responsibility\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-EvidenceOfResponsibility\",\n \"code\": \"BRTH\",\n \"display\": \"Birth certificate\"\n }\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_evidenceOfResponsibilityMoreinfo\",\n \"text\": \"Evidence of responsibility - Further Information\",\n \"answer\": [\n {\n \"valueString\": \"Birth Certificate is original\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_isCurrentAddressConfirmed\",\n \"text\": \"Is current address confirmed?\",\n \"answer\": [\n {\n \"valueString\": \"Yes\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_newAddress\",\n \"text\": \"parentalApplicationSupplementaryDetails_newAddress\",\n \"item\": [\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_line1\",\n \"text\": \"Address Line 1\",\n \"answer\": [\n {\n \"valueString\": \"101 MESSINGHAM ROAD\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_line2\",\n \"text\": \"Address Line 2\",\n \"answer\": [\n {\n \"valueString\": \"\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_line3\",\n \"text\": \"Address Line 3\",\n \"answer\": [\n {\n \"valueString\": \"\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_city\",\n \"text\": \"Town / City\",\n \"answer\": [\n {\n \"valueString\": \"SCUNTHORPE\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_district\",\n \"text\": \"County\",\n \"answer\": [\n {\n \"valueString\": \"S HUMBERSIDE\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_postalCode\",\n \"text\": \"Postcode\",\n \"answer\": [\n {\n \"valueString\": \"DN17 2LN\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_liveAtSameAddress\",\n \"text\": \"Do the adult and child live at the same address?\",\n \"answer\": [\n {\n \"valueString\": \"Yes\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_canChildConsent\",\n \"text\": \"Can the child consent?\",\n \"answer\": [\n {\n \"valueString\": \"No\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_reasonNoChildConsent\",\n \"text\": \"Reason the child cannot consent\",\n \"answer\": [\n {\n \"valueString\": \"Child is too young\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient\",\n \"text\": \"patient\",\n \"item\": [\n {\n \"linkId\": \"patient_identifier\",\n \"text\": \"NHS Number\",\n \"answer\": [\n {\n \"valueString\": \"9730675422\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name\",\n \"text\": \"patient_name\",\n \"item\": [\n {\n \"linkId\": \"patient_name_first\",\n \"text\": \"First name.\",\n \"answer\": [\n {\n \"valueString\": \"Rowena\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name_family\",\n \"text\": \"Family name (often called Surname).\",\n \"answer\": [\n {\n \"valueString\": \"HIRST\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient_birthDate\",\n \"text\": \"Date of Birth\",\n \"answer\": [\n {\n \"valueDate\": \"2015-08-09\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess\",\n \"text\": \"requestedAccess\",\n \"item\": [\n {\n \"linkId\": \"requestedAccess_accessLevel\",\n \"text\": \"Requested access level\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"APPT\",\n \"display\": \"Appointment Booking\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccess\",\n \"text\": \"Reason for access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-ReasonForAccess\",\n \"code\": \"COMB\",\n \"display\": \"Communication Barriers\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccessMoreinfo\",\n \"text\": \"Reason for access - further information\",\n \"answer\": [\n {\n \"valueString\": \"No internet connection\"\n }\n ]\n }\n ]\n }\n ]\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/QuestionnaireResponse", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "QuestionnaireResponse" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Mon, 01 Dec 2025 16:11:33 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "186" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "4eba2237-3c13-4bab-afb1-1261b5ac6a19" - }, - { - "key": "x-amz-apigw-id", - "value": "U6qoVF-JLPEFXqQ=" - }, - { - "key": "location", - "value": "https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/QuestionnaireResponse/29a7f71a-2554-4e53-87de-07553d40d5ec" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-692dbe34-f306ba0e1a55aba127add964" - }, - { - "key": "X-Request-ID", - "value": "848e592d-a42e-4fee-b529-8ac484fd459c" - }, - { - "key": "X-Correlation-ID", - "value": "73de9aa5-5951-4d30-8f2d-e64482fb1990" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"OperationOutcome\",\n \"issue\": [\n {\n \"severity\": \"information\",\n \"code\": \"informational\",\n \"details\": {\n \"coding\": [\n {\n \"code\": \"19C01N8Q37\",\n \"display\": \"19C01N8Q37\"\n }\n ]\n }\n }\n ]\n}" - } - ] - }, - { - "name": "Invalid request body - New adult to adult access request", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/fhir+json", - "type": "text" - }, - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Use-National-Proxy-Store", - "value": "False", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/QuestionnaireResponse", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "QuestionnaireResponse" - ] - }, - "description": "## Example scenario\n\n**Given** no proxy role exists between two adults \n**When** a access request is sent with invalid body \n**Then** a 400 error response is returned with code 'INVALID_VALUE'" - }, - "response": [ - { - "name": "Invalid request body error response", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/fhir+json", - "type": "text" - }, - { - "key": "X-Request-ID", - "value": "94d7227f-f801-465f-b04c-8dd7494faf5f", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "7f829c8e-bec6-4cbe-8ed0-d71bf981095b", - "type": "text" - }, - { - "key": "X-Use-National-Proxy-Store", - "value": "False", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/QuestionnaireResponse", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "QuestionnaireResponse" - ] - } - }, - "status": "Bad Request", - "code": 400, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Mon, 01 Dec 2025 16:13:37 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "377" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "28073546-4513-47c5-9d2e-17caeb920a78" - }, - { - "key": "x-amz-apigw-id", - "value": "U6q7zHXFLPEF3Bg=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-692dbeb1-7dd1e1125d0b5422386cffe9" - }, - { - "key": "X-Request-ID", - "value": "d82f5db5-1c08-4251-a94b-50684ea1a06b" - }, - { - "key": "X-Correlation-ID", - "value": "7eeca365-bf2b-4859-9e2c-b5c7731bbe1b" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"issue\": [\n {\n \"code\": \"invalid\",\n \"details\": {\n \"coding\": [\n {\n \"code\": \"BAD_REQUEST\",\n \"display\": \"The request could not be processed.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"The supplied input is not a valid FHIR QuestionnaireResponse.\",\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" - } - ] - } - ], - "description": "## Allowed auth methods\n\n- NHS Login token - Auth with test user `9730675929`\n \n\nSee collection level documentation for info about how to get authorization tokens.", - "auth": { - "type": "bearer", - "bearer": [ - { - "key": "token", - "value": "{{login_token}}", - "type": "string" - } - ] - }, - "event": [ - { - "listen": "prerequest", - "script": { - "type": "text/javascript", - "packages": {}, - "requests": {}, - "exec": [ - "" - ] - } - }, - { - "listen": "test", - "script": { - "type": "text/javascript", - "packages": {}, - "requests": {}, - "exec": [ - "" - ] - } - } - ] - }, - { - "name": "Get access request (GET /QuestionnaireResponse/{id})", - "item": [ - { - "name": "Valid request - Get access request", - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/QuestionnaireResponse/:access_request_id", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "QuestionnaireResponse", - ":access_request_id" - ], - "variable": [ - { - "key": "access_request_id", - "value": "32a5cc78-eb64-4367-abea-cfdb6e9fa2e4" - } - ] - }, - "description": "## Example scenario\n\n**Given** a valid access request has been sent to VRS \n**When** a GET /QuestionnaireResponse/{id} request is sent with the access request UUID \n**Then** the access request is returned" - }, - "response": [] - }, - { - "name": "No access request found - Get access request", - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/QuestionnaireResponse/:access_request_id", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "QuestionnaireResponse", - ":access_request_id" - ], - "variable": [ - { - "key": "access_request_id", - "value": "32a5cc78-eb64-4367-abea-cfdb6e9fa2e4" - } - ] - }, - "description": "## Example scenario\n\n**Given** a valid access request has been sent to VRS \n**When** a GET /QuestionnaireResponse/{id} request is sent with a random UUID \n**Then** a 404 error is returned with message 'QUESTIONNAIRE_RESPONSE_NOT_FOUND'" - }, - "response": [ - { - "name": "No access request found error returned", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "074b07d8-104e-4574-abd7-bdc5181280da", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "f47a9a68-34a5-4a11-881b-8b45695f2e76", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/QuestionnaireResponse/:access_request_id", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "QuestionnaireResponse", - ":access_request_id" - ], - "variable": [ - { - "key": "access_request_id", - "value": "32a5cc78-eb64-4367-abea-cfdb6e9fa2e4" - } - ] - } - }, - "status": "Not Found", - "code": 404, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Mon, 01 Dec 2025 14:37:04 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "400" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "64959769-f136-4d27-9369-b4e01224c066" - }, - { - "key": "x-amz-apigw-id", - "value": "U6cyYE4brPEFXvw=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-692da80e-520fcf28565fe1ea77ceb7fc" - }, - { - "key": "X-Request-ID", - "value": "f6fe610a-d80b-4436-b727-67960c9687a1" - }, - { - "key": "X-Correlation-ID", - "value": "076421a4-1c56-43e4-95a9-6139434516a7" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"OperationOutcome\",\n \"issue\": [\n {\n \"severity\": \"error\",\n \"code\": \"not-found\",\n \"details\": {\n \"coding\": [\n {\n \"code\": \"QUESTIONNAIRE_RESPONSE_NOT_FOUND\",\n \"display\": \"Questionnaire response not found\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\"\n }\n ]\n },\n \"diagnostics\": \"The Questionnaire response could not be found using the provided access request ID.\"\n }\n ]\n}" - } - ] - }, - { - "name": "No access request UUID - Get access request", - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/QuestionnaireResponse/", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "QuestionnaireResponse", - "" - ] - }, - "description": "## Example scenario\n\n**Given** a valid access request has been sent to VRS \n**When** a GET /QuestionnaireResponse/{id} request is sent without a UUID \n**Then** a 400 error is returned with message 'METHOD_NOT_ALLOWED'" - }, - "response": [ - { - "name": "No access request UUID invalid response", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "6e763c1c-b24b-4ffe-8598-e2983ae5e3cf", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "87ed4d25-05d6-4ab6-985e-a254cdd26339", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/QuestionnaireResponse/", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "QuestionnaireResponse", - "" - ] - } - }, - "status": "Bad Request", - "code": 400, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Mon, 01 Dec 2025 15:15:37 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "370" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "42e98c18-f152-4e8f-8cd2-fc0ba2bcc590" - }, - { - "key": "x-amz-apigw-id", - "value": "U6ibrGjDrPEFgRQ=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-692db117-2a87f1ac0c50e6702fcbc5ce" - }, - { - "key": "X-Request-ID", - "value": "4270ae5f-3cc9-418e-a6f8-aab43372486a" - }, - { - "key": "X-Correlation-ID", - "value": "a23d9c20-bcf2-4e03-ba6b-092a703947f3" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"issue\": [\n {\n \"code\": \"not-supported\",\n \"details\": {\n \"coding\": [\n {\n \"code\": \"METHOD_NOT_ALLOWED\",\n \"display\": \"The method is not allowed.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"The method is not allowed for the requested resource.\",\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" - } - ] - }, - { - "name": "Invalid access request UUID - Get access request", - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/QuestionnaireResponse/invalid", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "QuestionnaireResponse", - "invalid" - ] - }, - "description": "## Example scenario\n\n**Given** a valid access request has been sent to VRS \n**When** a GET /QuestionnaireResponse/{id} request is sent with an invalid UUID \n**Then** a 400 error is returned with message 'INVALID_IDENTIFIER_VALUE'" - }, - "response": [ - { - "name": "Invalid access request UUID invalid response", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "30e863b4-b90b-439e-a757-06eadf3cae48", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "79bc7284-1f65-407a-bc5e-1e5bd8d0496b", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/QuestionnaireResponse/invalid", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "QuestionnaireResponse", - "invalid" - ] - } - }, - "status": "Bad Request", - "code": 400, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Mon, 01 Dec 2025 15:15:37 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "370" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "42e98c18-f152-4e8f-8cd2-fc0ba2bcc590" - }, - { - "key": "x-amz-apigw-id", - "value": "U6ibrGjDrPEFgRQ=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-692db117-2a87f1ac0c50e6702fcbc5ce" - }, - { - "key": "X-Request-ID", - "value": "4270ae5f-3cc9-418e-a6f8-aab43372486a" - }, - { - "key": "X-Correlation-ID", - "value": "a23d9c20-bcf2-4e03-ba6b-092a703947f3" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"OperationOutcome\",\n \"issue\": [\n {\n \"severity\": \"error\",\n \"code\": \"invalid\",\n \"details\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/STU3/CodeSystem/Spine-ErrorOrWarningCode-1\",\n \"code\": \"INVALID_IDENTIFIER_VALUE\",\n \"display\": \"Invalid identifier value\"\n }\n ]\n },\n \"diagnostics\": \"The specified access request ID is invalid. Access request IDs must be a valid UUID.\"\n }\n ]\n}" - } - ] - } - ], - "description": "## Allowed auth methods\n\n- CIS2 token - Auth with test user `656005750108`\n \n- NHS Login token - Auth with test user `9730675929`\n \n\nSee collection level documentation for info about how to get authorization tokens.", - "auth": { - "type": "bearer", - "bearer": [ - { - "key": "token", - "value": "{{cis2_token}}", - "type": "string" - } - ] - }, - "event": [ - { - "listen": "prerequest", - "script": { - "type": "text/javascript", - "packages": {}, - "requests": {}, - "exec": [ - "" - ] - } - }, - { - "listen": "test", - "script": { - "type": "text/javascript", - "packages": {}, - "requests": {}, - "exec": [ - "" - ] - } - } - ] - }, - { - "name": "Create a new proxy role (POST /Consent)", - "item": [ - { - "name": "Valid request - New proxy role", - "request": { - "auth": { - "type": "bearer", - "bearer": [ - { - "key": "token", - "value": "{{cis2_token}}", - "type": "string" - } - ] - }, - "method": "POST", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "Content-Type", - "value": "application/fhir+json", - "type": "text" - } - ], - "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\": \"{{$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 from scratch by GP\"\n }\n ],\n \"text\": \"Some text\"\n }\n }\n ]\n}\n", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/Consent", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ] - }, - "description": "## Important - duplicates\n\nWe cannot currently accept duplicate proxy role requests for testing purposes.\n\nThis may lead to you experiencing 409 errors on the 'valid request' scenarios if the same request has already been sent.\n\n## 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 \n**Then** a 201 success response is returned" - }, - "response": [ - { - "name": "Adult to child - New proxy role created", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "X-Request-ID", - "value": "df29a1cb-3861-4d7f-918d-3bcf6f5ef362", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "0b7ed233-3055-48ac-93ef-c71922ccc577", - "type": "text" - }, - { - "key": "Content-Type", - "value": "application/fhir+json", - "type": "text" - } - ], - "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.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 from scratch by GP\"\n }\n ]\n }\n }\n ]\n}\n", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/Consent", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Fri, 28 Nov 2025 15:14:39 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "101" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "bf6bc3d8-1829-4a81-9433-c0b1c21376d6" - }, - { - "key": "x-amz-apigw-id", - "value": "Uwpe7FCjrPEF5aQ=" - }, - { - "key": "location", - "value": "https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/4f15f399-d381-4949-a744-25f9cbfecfb3" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-6929bc5f-f6012c539553033b0859994a" - }, - { - "key": "X-Request-ID", - "value": "46baf4c8-5bb5-4a6e-9bd4-264452817dab" - }, - { - "key": "X-Correlation-ID", - "value": "65bdf903-1cb2-4722-a291-d5056c44e712" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"OperationOutcome\",\n \"issue\": [\n {\n \"severity\": \"information\",\n \"code\": \"informational\"\n }\n ]\n}" - }, - { - "name": "Adult to adult - New proxy role created", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "Content-Type", - "value": "application/fhir+json", - "type": "text" - } - ], - "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\": \"9736898202\"\n }\n },\n \"dateTime\": \"{{$isoTimestamp}}\",\n \"performer\": [\n {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898164\"\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\": \"9736898164\"\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 from scratch by GP\"\n }\n ]\n }\n }\n ]\n}\n", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/Consent", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Fri, 28 Nov 2025 15:14:39 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "101" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "bf6bc3d8-1829-4a81-9433-c0b1c21376d6" - }, - { - "key": "x-amz-apigw-id", - "value": "Uwpe7FCjrPEF5aQ=" - }, - { - "key": "location", - "value": "https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/4f15f399-d381-4949-a744-25f9cbfecfb3" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-6929bc5f-f6012c539553033b0859994a" - }, - { - "key": "X-Request-ID", - "value": "46baf4c8-5bb5-4a6e-9bd4-264452817dab" - }, - { - "key": "X-Correlation-ID", - "value": "65bdf903-1cb2-4722-a291-d5056c44e712" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"OperationOutcome\",\n \"issue\": [\n {\n \"severity\": \"information\",\n \"code\": \"informational\"\n }\n ]\n}" - } - ] - }, - { - "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": {}, - "requests": {} - } - } - ], - "request": { - "auth": { - "type": "bearer", - "bearer": [ - { - "key": "token", - "value": "{{cis2_token}}", - "type": "string" - } - ] - }, - "method": "POST", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "Content-Type", - "value": "application/fhir+json", - "type": "text" - } - ], - "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\": \"{{$isoTimestamp}}\",\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.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" - } - } - }, - "url": { - "raw": "{{api_base_url}}/Consent", - "host": [ - "{{api_base_url}}" - ], - "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 identifier value error returned", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "X-Request-ID", - "value": "fa822d40-196d-4112-8c87-b46631ba7463", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "13f1ba14-20e9-48c8-b1ef-7f2c34d9bab3", - "type": "text" - }, - { - "key": "Content-Type", - "value": "application/fhir+json", - "type": "text" - } - ], - "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.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" - } - } - }, - "url": { - "raw": "{{api_base_url}}/Consent", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ] - } - }, - "status": "Unprocessable Entity (WebDAV) (RFC 4918)", - "code": 422, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Fri, 28 Nov 2025 12:46:09 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "402" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "369c4598-e093-44d1-8d27-015c1e1f8a40" - }, - { - "key": "x-amz-apigw-id", - "value": "UwTu1FORLPEFh3Q=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-69299991-27f38de5fa687e1e7d4659b3" - }, - { - "key": "X-Request-ID", - "value": "70591ef1-fbe0-442b-bd9a-545fb5713859" - }, - { - "key": "X-Correlation-ID", - "value": "037cf36b-1014-4177-bcc6-c1cd647aae42" - }, - { - "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_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}" - } - ] - }, - { - "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": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "Content-Type", - "value": "application/fhir+json", - "type": "text" - } - ], - "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.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",\n \"code\": \"OTHER\",\n \"display\": \"Other\"\n }\n ]\n }\n }\n ]\n}\n", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/Consent", - "host": [ - "{{api_base_url}}" - ], - "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": "Missing free text code error returned", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "Content-Type", - "value": "application/fhir+json", - "type": "text" - } - ], - "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.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",\n \"code\": \"OTHER\",\n \"display\": \"Other\"\n }\n ]\n }\n }\n ]\n}\n", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/Consent", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ] - } - }, - "status": "Unprocessable Entity (WebDAV) (RFC 4918)", - "code": 422, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Fri, 28 Nov 2025 12:46:09 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "402" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "369c4598-e093-44d1-8d27-015c1e1f8a40" - }, - { - "key": "x-amz-apigw-id", - "value": "UwTu1FORLPEFh3Q=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-69299991-27f38de5fa687e1e7d4659b3" - }, - { - "key": "X-Request-ID", - "value": "70591ef1-fbe0-442b-bd9a-545fb5713859" - }, - { - "key": "X-Correlation-ID", - "value": "037cf36b-1014-4177-bcc6-c1cd647aae42" - }, - { - "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_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": "Duplicate role - New proxy role", - "request": { - "auth": { - "type": "bearer", - "bearer": [ - { - "key": "token", - "value": "{{cis2_token}}", - "type": "string" - } - ] - }, - "method": "POST", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "Content-Type", - "value": "application/fhir+json", - "type": "text" - } - ], - "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\": \"9736898148\"\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 from scratch by GP\"\n }\n ],\n \"text\": \"Some text\"\n }\n }\n ]\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/Consent", - "host": [ - "{{api_base_url}}" - ], - "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", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "X-Request-ID", - "value": "8616edc0-f04b-4d56-ac54-4c5dd8930d87", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "42cf4c55-e180-4b8f-abe3-60acd1780311", - "type": "text" - }, - { - "key": "Content-Type", - "value": "application/fhir+json", - "type": "text" - } - ], - "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\": \"9736898148\"\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 from scratch by GP\"\n }\n ],\n \"text\": \"Some text\"\n }\n }\n ]\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/Consent", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ] - } - }, - "status": "Conflict", - "code": 409, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Fri, 28 Nov 2025 12:41:31 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "352" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "de65a534-5cee-45c1-845e-023e9ffab375" - }, - { - "key": "x-amz-apigw-id", - "value": "UwTC8H42LPEFggg=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-69299878-54ea0e3b7bd5d7e836eaea8f" - }, - { - "key": "X-Request-ID", - "value": "dd90c863-82e3-4ef8-9568-3e68a64de1e0" - }, - { - "key": "X-Correlation-ID", - "value": "b08cd6b6-96fc-410c-84a9-e52732fcbc09" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "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}" - } - ] - }, - { - "name": "Missing scope - New proxy role", - "request": { - "method": "POST", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "Content-Type", - "value": "application/fhir+json", - "type": "text" - } - ], - "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 \"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\": \"{{$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" - } - } - }, - "url": { - "raw": "{{api_base_url}}/Consent", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ] - } - }, - "response": [ - { - "name": "Missing scope error returned", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "X-Request-ID", - "value": "2aa3293e-ad0e-4389-a466-d3209ebbfa4e", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "425ca0da-e10c-4010-86b4-93ca9bf737eb", - "type": "text" - }, - { - "key": "Content-Type", - "value": "application/fhir+json", - "type": "text" - } - ], - "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 \"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:50.676Z\",\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" - } - } - }, - "url": { - "raw": "{{api_base_url}}/Consent", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ] - } - }, - "status": "Bad Request", - "code": 400, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Fri, 28 Nov 2025 15:18:49 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "353" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "75bfd563-8f97-4b8a-8d50-a08643917d89" - }, - { - "key": "x-amz-apigw-id", - "value": "UwqGBE7MLPEFySQ=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-6929bd59-918cef993de61bcebe339d3e" - }, - { - "key": "X-Request-ID", - "value": "2ca06d13-2568-4f70-b06c-077af0f57137" - }, - { - "key": "X-Correlation-ID", - "value": "8c8ffb79-cc4c-4cb0-a62e-31dc1310a387" - }, - { - "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_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": "Invalid status - New proxy role", - "request": { - "method": "POST", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "Content-Type", - "value": "application/fhir+json", - "type": "text" - } - ], - "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 \"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\": \"{{$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" - } - } - }, - "url": { - "raw": "{{api_base_url}}/Consent", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ] - } - }, - "response": [ - { - "name": "Invalid status - New proxy role", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "X-Request-ID", - "value": "1e0a0136-6025-4190-8450-5676ada97c3c", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "bc404ec3-52fa-465c-9401-2b70484989bc", - "type": "text" - }, - { - "key": "Content-Type", - "value": "application/fhir+json", - "type": "text" - } - ], - "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 \"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:50.953Z\",\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" - } - } - }, - "url": { - "raw": "{{api_base_url}}/Consent", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ] - } - }, - "status": "Unprocessable Entity (WebDAV) (RFC 4918)", - "code": 422, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Fri, 28 Nov 2025 15:27:32 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "339" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "47dd1183-4b49-44f1-a524-79fe459589a9" - }, - { - "key": "x-amz-apigw-id", - "value": "UwrXkFOZrPEF1ZA=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-6929bf63-31132bda7b3f654ea3534f15" - }, - { - "key": "X-Request-ID", - "value": "e23fbdd1-027c-4281-b37d-094691df9fc7" - }, - { - "key": "X-Correlation-ID", - "value": "226277b1-9d7c-411a-b3fd-3a4a70a4d90e" - }, - { - "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_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 code - Missing free text for Other", - "request": { - "method": "POST", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "Content-Type", - "value": "application/fhir+json", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"resourceType\": \"Consent\",\n \"status\": \"blah\",\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\": \"2025-02-11T14:30:00Z\",\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 from scratch by GP\"\n }\n ],\n \"text\": \"Some text\"\n }\n }\n ]\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/Consent", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ] - } - }, - "response": [ - { - "name": "Invalid status - New proxy role", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "X-Request-ID", - "value": "5209f087-7de5-4070-9964-16b26334d147", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "f6571cd8-1edf-4827-aa8a-be6dac5a7620", - "type": "text" - }, - { - "key": "Content-Type", - "value": "application/fhir+json", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"resourceType\": \"Consent\",\n \"status\": \"blah\",\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\": \"2025-02-11T14:30:00Z\",\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 from scratch by GP\"\n }\n ],\n \"text\": \"Some text\"\n }\n }\n ]\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/Consent", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ] - } - }, - "status": "Unprocessable Entity (WebDAV) (RFC 4918)", - "code": 422, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Fri, 28 Nov 2025 15:27:32 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "339" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "47dd1183-4b49-44f1-a524-79fe459589a9" - }, - { - "key": "x-amz-apigw-id", - "value": "UwrXkFOZrPEF1ZA=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-6929bf63-31132bda7b3f654ea3534f15" - }, - { - "key": "X-Request-ID", - "value": "e23fbdd1-027c-4281-b37d-094691df9fc7" - }, - { - "key": "X-Correlation-ID", - "value": "226277b1-9d7c-411a-b3fd-3a4a70a4d90e" - }, - { - "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_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 identifer system - New proxy role", - "request": { - "method": "POST", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "Content-Type", - "value": "application/fhir+json", - "type": "text" - } - ], - "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/invalid\",\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/invalid\",\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" - } - } - }, - "url": { - "raw": "{{api_base_url}}/Consent", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ] - } - }, - "response": [ - { - "name": "Invalid status error returned", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "X-Request-ID", - "value": "004491e4-b270-4882-99c8-af4e387a505f", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "5f51e084-afd4-442b-b229-5470a750de52", - "type": "text" - }, - { - "key": "Content-Type", - "value": "application/fhir+json", - "type": "text" - } - ], - "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/invalid\",\n \"value\": \"9736898717\"\n }\n },\n \"dateTime\": \"2026-01-12T15:10:06.762Z\",\n \"performer\": [\n {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number/invalid\",\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" - } - } - }, - "url": { - "raw": "{{api_base_url}}/Consent", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ] - } - }, - "status": "Unprocessable Entity (WebDAV) (RFC 4918)", - "code": 422, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Fri, 28 Nov 2025 15:29:32 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "399" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "9ca19fe7-0a06-4da0-9b72-9e6135da40f1" - }, - { - "key": "x-amz-apigw-id", - "value": "UwrqcGPaLPEFWkg=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-6929bfdc-4e9f2ada8f5faf65f1630c1c" - }, - { - "key": "X-Request-ID", - "value": "21cc43ac-e531-477d-bc97-3e77e9657b52" - }, - { - "key": "X-Correlation-ID", - "value": "aeeaa71d-0a78-4e83-8c81-3b2884371ae9" - }, - { - "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_IDENTIFIER_SYSTEM\",\n \"display\": \"Invalid identifier system.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"Patient identifier system is invalid\",\n \"expression\": [\n \"patient.identifier.system\"\n ],\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" - } - ] - } - ], - "description": "## Allowed auth methods\n\n- CIS2 token - Auth with test user `656005750108`\n \n\nSee collection level documentation for info about how to get authorization tokens.", - "auth": { - "type": "bearer", - "bearer": [ - { - "key": "token", - "value": "{{cis2_token}}", - "type": "string" - } - ] - }, - "event": [ - { - "listen": "prerequest", - "script": { - "type": "text/javascript", - "packages": {}, - "requests": {}, - "exec": [ - "" - ] - } - }, - { - "listen": "test", - "script": { - "type": "text/javascript", - "packages": {}, - "requests": {}, - "exec": [ - "" - ] - } - } - ] - }, - { - "name": "Update proxy role (PATCH /Consent/{id})", - "item": [ - { - "name": "Valid request - Single update - Update proxy role", - "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 {\"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 patients request\"\n }\n ]\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": "Proxy role updated to 'inactive' status", - "originalRequest": { - "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 {\"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 patients request\"\n }\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" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Fri, 28 Nov 2025 16:23:31 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "101" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "5b03d759-c55a-462d-ba3c-e2dbf92d031a" - }, - { - "key": "x-amz-apigw-id", - "value": "UwzkUE0urPEFqHg=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-6929cc81-0d146fcdbc79baf5a5279c3d" - }, - { - "key": "X-Request-ID", - "value": "4555113e-aa4d-409d-bac0-41b0ed91cfc2" - }, - { - "key": "X-Correlation-ID", - "value": "b8c69a60-667d-4b0f-89c7-9de6d4e289a4" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"OperationOutcome\",\n \"issue\": [\n {\n \"severity\": \"information\",\n \"code\": \"informational\"\n }\n ]\n}" - }, - { - "name": "Proxy role end date updated", - "originalRequest": { - "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\": \"/provision/period/end\",\n \"value\": \"2026-12-31\"\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" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Date", - "value": "Thu, 04 Dec 2025 15:48:46 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "101" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "eb0a2130-76e5-41a0-9916-e7c8aa25a4ea" - }, - { - "key": "x-amz-apigw-id", - "value": "VEgG2Hh6LPEFXRQ=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-6931ad5e-d4506ade6d4f3410b20618b9" - }, - { - "key": "X-Request-ID", - "value": "90a9a964-db4c-4ec7-9498-76087f979bb5" - }, - { - "key": "X-Correlation-ID", - "value": "2aa6936b-c5ba-437d-898e-c58794601a01" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"OperationOutcome\",\n \"issue\": [\n {\n \"severity\": \"information\",\n \"code\": \"informational\"\n }\n ]\n}" - }, - { - "name": "Proxy role legal basis updated", - "originalRequest": { - "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\": \"/provision/actor\",\n \"value\": [\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]", - "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" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Date", - "value": "Thu, 04 Dec 2025 15:54:54 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "101" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "63072889-896c-43b1-aff1-0e4eceb2b4d4" - }, - { - "key": "x-amz-apigw-id", - "value": "VEg_9FQxLPEF1mA=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-6931aecc-d571f76cb8f3900088a01c45" - }, - { - "key": "X-Request-ID", - "value": "e436ebda-5011-431a-9de3-1d0749c6f45e" - }, - { - "key": "X-Correlation-ID", - "value": "930a58a1-7ca9-4a89-ac33-a24f5277b1d9" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"OperationOutcome\",\n \"issue\": [\n {\n \"severity\": \"information\",\n \"code\": \"informational\"\n }\n ]\n}" - } - ] - }, - { - "name": "Valid request - Multiple updates - Update proxy role", - "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 {\"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 patients request\"\n }\n ]\n }\n }\n ]\n },\n {\n \"op\": \"replace\",\n \"path\": \"/provision/period/end\",\n \"value\": \"2026-12-31\"\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 with multiple updates for the proxy role \n**Then** a 200 response is returned and the role is updated" - }, - "response": [ - { - "name": "Proxy role status updated with end date", - "originalRequest": { - "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 {\"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 patients request\"\n }\n ]\n }\n }\n ]\n },\n {\n \"op\": \"replace\",\n \"path\": \"/provision/period/end\",\n \"value\": \"2026-12-31\"\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" - } - ] - } - }, - "status": "Not Found", - "code": 404, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Date", - "value": "Thu, 04 Dec 2025 15:56:16 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "348" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "fbb23fc6-d143-4ad4-ab95-fef1276bf7d0" - }, - { - "key": "x-amz-apigw-id", - "value": "VEhNJE2VrPEFXkA=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-6931af20-0cc7e03b708f8949fc05bdfa" - }, - { - "key": "X-Request-ID", - "value": "0aa389b6-9542-428f-9e1c-b5411ff0a531" - }, - { - "key": "X-Correlation-ID", - "value": "e3845975-3d6b-4185-81cb-22a80f7ed0da" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"OperationOutcome\",\n \"issue\": [\n {\n \"severity\": \"information\",\n \"code\": \"informational\"\n }\n ]\n}" - } - ] - }, - { - "name": "Resource not found - Update proxy role", - "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 {\"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 patients request\"\n }\n ]\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": "{{$randomUUID}}" - } - ] - }, - "description": "## Example scenario\n\n**Given** a proxy role exists in the National Proxy Store for a given UUID \n**When** a PATCH /Consent request is sent using the UUID \n**Then** a 404 error is returned with code 'RESOURCE_NOT_FOUND'" - }, - "response": [ - { - "name": "Resource not found error response", - "originalRequest": { - "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 {\"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 patients request\"\n }\n ]\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": "{{$randomUUID}}" - } - ] - } - }, - "status": "Not Found", - "code": 404, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Fri, 28 Nov 2025 16:51:31 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "348" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "5940dd45-0b04-4e71-8fce-6a69665b256e" - }, - { - "key": "x-amz-apigw-id", - "value": "Uw3q4HTZrPEFxLQ=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-6929d312-f383a46c595faa9361bb8326" - }, - { - "key": "X-Request-ID", - "value": "4cfc1e62-1d97-47b2-825e-2f72eed5e29e" - }, - { - "key": "X-Correlation-ID", - "value": "db86232d-68a5-492d-96e3-02613a3cf6bf" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"issue\": [\n {\n \"code\": \"invalid\",\n \"diagnostics\": \"Proxy role not found.\",\n \"details\": {\n \"coding\": [\n {\n \"code\": \"RESOURCE_NOT_FOUND\",\n \"display\": \"Request must be for a existing proxy role.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" - } - ] - }, - { - "name": "Invalid status code - Update proxy role", - "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 {\"op\": \"replace\", \"path\": \"/status\", \"value\": \"invalid_status\"},\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 patients request\"\n }\n ]\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 for a given UUID \n**When** a PATCH /Consent request is sent using the UUID \n**Then** a 404 error is returned with code 'RESOURCE_NOT_FOUND'" - }, - "response": [ - { - "name": "Invalid status code error returned", - "originalRequest": { - "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 {\"op\": \"replace\", \"path\": \"/status\", \"value\": \"invalid_status\"},\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 patients request\"\n }\n ]\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": "aa58f9b7-2a02-45a2-9cb4-0d6fefe07a02" - } - ] - } - }, - "status": "Unprocessable Entity (WebDAV) (RFC 4918)", - "code": 422, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Fri, 28 Nov 2025 16:56:26 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "329" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "557c0652-9a38-434c-99c1-f979920055bf" - }, - { - "key": "x-amz-apigw-id", - "value": "Uw4ZOEOOLPEFggg=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-6929d43a-6c636f683c11b4ac83776aa6" - }, - { - "key": "X-Request-ID", - "value": "1a4ee8bf-0d2b-4398-950f-b3fd9332e7d3" - }, - { - "key": "X-Correlation-ID", - "value": "986fe591-c2f0-422d-9e1e-c99628e9a1df" - }, - { - "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_STATUS_CODE\",\n \"display\": \"Status code is invalid.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"Invalid status code.\",\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" - } - ] - }, - { - "name": "Invalid state transition - Update proxy role", - "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 {\"op\": \"replace\", \"path\": \"/status\", \"value\": \"proposed\"},\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\": \"APPLICATION_RESUBMITTED\",\n \"display\": \"Application re-submitted online after previously rejected\"\n }\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 for a given UUID \n**When** a PATCH /Consent request is sent using the UUID \n**Then** a 404 error is returned with code 'RESOURCE_NOT_FOUND'" - }, - "response": [ - { - "name": "Invalid status code error returned", - "originalRequest": { - "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\": \"someinvalidcode\"\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": "aa58f9b7-2a02-45a2-9cb4-0d6fefe07a02" - } - ] - } - }, - "status": "Unprocessable Entity (WebDAV) (RFC 4918)", - "code": 422, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Fri, 28 Nov 2025 16:56:26 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "329" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "557c0652-9a38-434c-99c1-f979920055bf" - }, - { - "key": "x-amz-apigw-id", - "value": "Uw4ZOEOOLPEFggg=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-6929d43a-6c636f683c11b4ac83776aa6" - }, - { - "key": "X-Request-ID", - "value": "1a4ee8bf-0d2b-4398-950f-b3fd9332e7d3" - }, - { - "key": "X-Correlation-ID", - "value": "986fe591-c2f0-422d-9e1e-c99628e9a1df" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"issue\": [\n {\n \"code\": \"invalid\",\n \"diagnostics\": \"Patch attempting invalid status change.\",\n \"details\": {\n \"coding\": [\n {\n \"code\": \"INVALID_STATE_TRANSITION\",\n \"display\": \"Status change is invalid.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" - } - ] - }, - { - "name": "Invalid path - Update proxy role", - "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\": \"/someotherpath\",\n \"value\": \"active\"\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 for a given UUID \n**When** a PATCH /Consent request with an invalid path is sent using the UUID \n**Then** a 400 error is returned with code 'INVALID_PATCH_PATH'" - }, - "response": [ - { - "name": "Invalid path error returned", - "originalRequest": { - "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\": \"/someotherpath\",\n \"value\": \"active\"\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": "aa58f9b7-2a02-45a2-9cb4-0d6fefe07a02" - } - ] - } - }, - "status": "Unprocessable Entity (WebDAV) (RFC 4918)", - "code": 422, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Fri, 28 Nov 2025 16:58:39 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "346" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "9c37f3a0-d1af-4a9d-8664-20edf45bd111" - }, - { - "key": "x-amz-apigw-id", - "value": "Uw4t7HzBrPEFTsw=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-6929d4bf-e038f4c128983e6e945b14ad" - }, - { - "key": "X-Request-ID", - "value": "3e5e943f-2647-4a09-b216-7d3551a637e7" - }, - { - "key": "X-Correlation-ID", - "value": "65dc6940-bcb3-466d-b25d-0a10ab98d7e6" - }, - { - "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_PATCH_PATH\",\n \"display\": \"Patch target is invalid.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"Patch targeting non-existent element.\",\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" - } - ] - }, - { - "name": "Missing free text for Other", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "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 {\"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\": \"OTHER\",\n \"display\": \"Other\"\n }\n ]\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 for a given UUID \n**When** a PATCH /Consent request with a missing free text and status reason of 'Other' is sent using the UUID \n**Then** a 400 error is returned with code 'MISSING_FREE_TEXT_FOR_OTHER'" - }, - "response": [ - { - "name": "Missing free text error", - "originalRequest": { - "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 {\"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\": \"OTHER\",\n \"display\": \"Other\"\n }\n ]\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" - } - ] - } - }, - "status": "Unprocessable Entity (WebDAV) (RFC 4918)", - "code": 422, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Fri, 28 Nov 2025 16:58:39 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "346" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "9c37f3a0-d1af-4a9d-8664-20edf45bd111" - }, - { - "key": "x-amz-apigw-id", - "value": "Uw4t7HzBrPEFTsw=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-6929d4bf-e038f4c128983e6e945b14ad" - }, - { - "key": "X-Request-ID", - "value": "3e5e943f-2647-4a09-b216-7d3551a637e7" - }, - { - "key": "X-Correlation-ID", - "value": "65dc6940-bcb3-466d-b25d-0a10ab98d7e6" - }, - { - "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_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}" - } - ] - } - ], - "description": "## Allowed auth methods\n\n- CIS2 token - Auth with test user `656005750108`\n \n- NHS Login token - Auth with test user `9730675929`\n \n\nSee collection level documentation for info about how to get authorization tokens." - }, - { - "name": "Get verified candidate relationships (GET /RelatedPerson)", - "item": [ - { - "name": "Valid request - Get verified candidate relationships", - "event": [ - { - "listen": "prerequest", - "script": { - "exec": [ - "" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/RelatedPerson?identifier=9736898121", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "RelatedPerson" - ], - "query": [ - { - "key": "identifier", - "value": "9736898121", - "description": "NHS number of the user to retrieve verified relationships for" - } - ] - }, - "description": "## Example scenario\n\n**Given** an NHS user has multiple related person relationships in PDS \n**When** a GET /RelatedPerson request is sent for the user \n**Then** the relationships are returned" - }, - "response": [ - { - "name": "Candidate relationship returned", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/RelatedPerson?identifier=9736898148", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "RelatedPerson" - ], - "query": [ - { - "key": "identifier", - "value": "9736898148", - "description": "NHS number of the user to retrieve verified relationships for" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Fri, 28 Nov 2025 17:10:29 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "927" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "3c77c3f5-2f94-4718-b4df-a994b49a9c8d" - }, - { - "key": "x-amz-apigw-id", - "value": "Uw6coGWKLPEFyvQ=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-6929d783-8368a433a0eae3395c7136cb" - }, - { - "key": "X-Request-ID", - "value": "e464b1c8-ad9b-41a2-9de3-2dd0e34d0fce" - }, - { - "key": "X-Correlation-ID", - "value": "056c8f1f-9d95-44b2-a4f7-582554f53387" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/IyKYB\",\n \"resource\": {\n \"id\": \"IyKYB\",\n \"birthDate\": \"2015-09-26\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n ],\n \"name\": [\n {\n \"family\": \"SHEPP\",\n \"given\": [\n \"Ashley\",\n \"Ellen\"\n ],\n \"period\": {\n \"start\": \"2025-08-06\"\n },\n \"prefix\": [\n \"MS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"MTH\",\n \"display\": \"mother\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n }\n ],\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson?identifier=9736898148\"\n }\n ],\n \"timestamp\": \"2025-11-28T17:10:29.231159+00:00\",\n \"total\": 1,\n \"type\": \"searchset\",\n \"resourceType\": \"Bundle\"\n}" - }, - { - "name": "Candidate relationship returned with patient details", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/RelatedPerson?identifier=9736898148&_include=RelatedPerson:patient", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "RelatedPerson" - ], - "query": [ - { - "key": "identifier", - "value": "9736898148", - "description": "NHS number of the user to retrieve verified relationships for" - }, - { - "key": "_include", - "value": "RelatedPerson:patient" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Date", - "value": "Fri, 28 Nov 2025 17:13:27 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "1395" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "a34914f5-c757-4a7c-b8e6-2061793de970" - }, - { - "key": "x-amz-apigw-id", - "value": "Uw63LFuCLPEFtfA=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-6929d82d-7210a91047b09608692e6ff6" - }, - { - "key": "X-Request-ID", - "value": "c46487fa-a7a9-4adb-82ec-dc7702fa66d4" - }, - { - "key": "X-Correlation-ID", - "value": "755116de-f4ef-406b-8088-1af14dd85c8d" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898644\",\n \"resource\": {\n \"id\": \"9736898644\",\n \"birthDate\": \"2015-09-26\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n ],\n \"name\": [\n {\n \"family\": \"SHEPP\",\n \"given\": [\n \"Ashley\",\n \"Ellen\"\n ],\n \"period\": {\n \"start\": \"2025-08-06\"\n },\n \"prefix\": [\n \"MS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/IyKYB\",\n \"resource\": {\n \"id\": \"IyKYB\",\n \"birthDate\": \"2015-09-26\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n ],\n \"name\": [\n {\n \"family\": \"SHEPP\",\n \"given\": [\n \"Ashley\",\n \"Ellen\"\n ],\n \"period\": {\n \"start\": \"2025-08-06\"\n },\n \"prefix\": [\n \"MS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"MTH\",\n \"display\": \"mother\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n }\n ],\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson?identifier=9736898148&_include=RelatedPerson%3Apatient\"\n }\n ],\n \"timestamp\": \"2025-11-28T17:13:27.630813+00:00\",\n \"total\": 1,\n \"type\": \"searchset\",\n \"resourceType\": \"Bundle\"\n}" - } - ] - }, - { - "name": "Valid request - No relationships returned - Get verified candidate relationships", - "event": [ - { - "listen": "prerequest", - "script": { - "exec": [ - "" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/RelatedPerson?identifier=9736898199", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "RelatedPerson" - ], - "query": [ - { - "key": "identifier", - "value": "9736898199", - "description": "NHS number of the user to retrieve verified relationships for" - } - ] - }, - "description": "## Example scenario\n\n**Given** an NHS user has no related person relationships in PDS \n**When** a GET /RelatedPerson request is sent for the user \n**Then** no relationships are returned" - }, - "response": [ - { - "name": "No relationships returned", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/RelatedPerson?identifier=9736898199", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "RelatedPerson" - ], - "query": [ - { - "key": "identifier", - "value": "9736898199", - "description": "NHS number of the user to retrieve verified relationships for" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Fri, 28 Nov 2025 17:15:06 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "249" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "9305e61b-2b8b-4a0c-84dd-0be9c4e1ce72" - }, - { - "key": "x-amz-apigw-id", - "value": "Uw7IDHSxrPEF7gg=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-6929d899-c345d4868005c5dc5999d598" - }, - { - "key": "X-Request-ID", - "value": "189b9dd8-722e-4e1b-b76b-75d2dd05fd00" - }, - { - "key": "X-Correlation-ID", - "value": "38045e59-8b2a-4f52-a1a5-834c91c25a9f" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson?identifier=9736898199\"\n }\n ],\n \"timestamp\": \"2025-11-28T17:15:05.994606+00:00\",\n \"total\": 0,\n \"type\": \"searchset\",\n \"resourceType\": \"Bundle\"\n}" - } - ] - }, - { - "name": "Valid request - Verify relationship - Get verified candidate relationships", - "event": [ - { - "listen": "prerequest", - "script": { - "exec": [ - "" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/RelatedPerson?identifier=9736898148&patient:identifier=9736898644", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "RelatedPerson" - ], - "query": [ - { - "key": "identifier", - "value": "9736898148", - "description": "NHS number of the user to retrieve verified relationships for" - }, - { - "key": "patient:identifier", - "value": "9736898644" - } - ] - }, - "description": "## Example scenario\n\n**Given** a proxy has a related person relationship in PDS \n**When** a GET /RelatedPerson request is sent for the proxy and the patient \n**Then** the relationship is returned" - }, - "response": [ - { - "name": "Verified relationship returned", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/RelatedPerson?identifier=9736898148&patient:identifier=9736898644", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "RelatedPerson" - ], - "query": [ - { - "key": "identifier", - "value": "9736898148", - "description": "NHS number of the user to retrieve verified relationships for" - }, - { - "key": "patient:identifier", - "value": "9736898644" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Fri, 28 Nov 2025 17:19:37 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "959" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "2ac409be-e9ce-4d73-a4b4-3c8a791aa51e" - }, - { - "key": "x-amz-apigw-id", - "value": "Uw7x4HIMrPEF-Fg=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-6929d9a5-d9df4059c3c602feabe873fc" - }, - { - "key": "X-Request-ID", - "value": "88367407-4953-4b64-9da0-6308c007b120" - }, - { - "key": "X-Correlation-ID", - "value": "8b55ca15-93fb-4ce9-be1b-eb0eb5e728fa" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/IyKYB\",\n \"resource\": {\n \"id\": \"IyKYB\",\n \"birthDate\": \"2015-09-26\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n ],\n \"name\": [\n {\n \"family\": \"SHEPP\",\n \"given\": [\n \"Ashley\",\n \"Ellen\"\n ],\n \"period\": {\n \"start\": \"2025-08-06\"\n },\n \"prefix\": [\n \"MS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"MTH\",\n \"display\": \"mother\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n }\n ],\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson?identifier=9736898148&patient%3Aidentifier=9736898644\"\n }\n ],\n \"timestamp\": \"2025-11-28T17:19:37.300736+00:00\",\n \"total\": 1,\n \"type\": \"searchset\",\n \"resourceType\": \"Bundle\"\n}" - }, - { - "name": "Verified relationship returned with patient details", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/RelatedPerson?identifier=9736898148&patient:identifier=9736898644&_include=RelatedPerson:patient", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "RelatedPerson" - ], - "query": [ - { - "key": "identifier", - "value": "9736898148", - "description": "NHS number of the user to retrieve verified relationships for" - }, - { - "key": "patient:identifier", - "value": "9736898644" - }, - { - "key": "_include", - "value": "RelatedPerson:patient" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Fri, 28 Nov 2025 17:19:37 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "959" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "2ac409be-e9ce-4d73-a4b4-3c8a791aa51e" - }, - { - "key": "x-amz-apigw-id", - "value": "Uw7x4HIMrPEF-Fg=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-6929d9a5-d9df4059c3c602feabe873fc" - }, - { - "key": "X-Request-ID", - "value": "88367407-4953-4b64-9da0-6308c007b120" - }, - { - "key": "X-Correlation-ID", - "value": "8b55ca15-93fb-4ce9-be1b-eb0eb5e728fa" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/IyKYB\",\n \"resource\": {\n \"id\": \"IyKYB\",\n \"birthDate\": \"2015-09-26\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n ],\n \"name\": [\n {\n \"family\": \"SHEPP\",\n \"given\": [\n \"Ashley\",\n \"Ellen\"\n ],\n \"period\": {\n \"start\": \"2025-08-06\"\n },\n \"prefix\": [\n \"MS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"MTH\",\n \"display\": \"mother\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n }\n ],\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson?identifier=9736898148&patient%3Aidentifier=9736898644\"\n }\n ],\n \"timestamp\": \"2025-11-28T17:19:37.300736+00:00\",\n \"total\": 1,\n \"type\": \"searchset\",\n \"resourceType\": \"Bundle\"\n}" - } - ] - }, - { - "name": "Missing identifier value - Get verified candidate relationships", - "event": [ - { - "listen": "prerequest", - "script": { - "exec": [ - "" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/RelatedPerson", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "RelatedPerson" - ] - }, - "description": "## Example scenario\n\n**Given** a proxy has a related person relationship in PDS \n**When** a GET /RelatedPerson request is sent with no identifier \n**Then** a 400 error is returned with code 'MISSING_IDENTIFIER_VALUE'" - }, - "response": [ - { - "name": "Missing identifier value error returned", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/RelatedPerson", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "RelatedPerson" - ] - } - }, - "status": "Bad Request", - "code": 400, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Fri, 28 Nov 2025 17:45:09 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "362" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "f524a29e-b0e9-45b0-af70-ad23fd87158c" - }, - { - "key": "x-amz-apigw-id", - "value": "Uw_h7GQFrPEF8xw=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-6929dfa5-ca879ed8f2a8b5c139182a8b" - }, - { - "key": "X-Request-ID", - "value": "28dbd904-517c-4e42-a3f6-37772b2da578" - }, - { - "key": "X-Correlation-ID", - "value": "e1229f7b-b14f-4858-b4fd-dcb3c9151a99" - }, - { - "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_IDENTIFIER_VALUE\",\n \"display\": \"Missing RelatedPerson NHS number.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"The 'identifier' parameter is required\",\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" - } - ] - }, - { - "name": "Invalid identifier value - Get verified candidate relationships", - "event": [ - { - "listen": "prerequest", - "script": { - "exec": [ - "" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/RelatedPerson?identifier=invalid", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "RelatedPerson" - ], - "query": [ - { - "key": "identifier", - "value": "invalid" - } - ] - }, - "description": "## Example scenario\n\n**Given** a proxy has a related person relationship in PDS \n**When** a GET /RelatedPerson request is sent with an invalid identifier \n**Then** a 400 error is returned with code 'INVALID_IDENTIFIER_VALUE'" - }, - "response": [ - { - "name": "Invalid identifier value error returned", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/RelatedPerson?identifier=invalid", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "RelatedPerson" - ], - "query": [ - { - "key": "identifier", - "value": "invalid" - } - ] - } - }, - "status": "Bad Request", - "code": 400, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Fri, 28 Nov 2025 17:47:15 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "422" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "7a627dc1-8fe7-4a07-9a17-5e8a7c77963b" - }, - { - "key": "x-amz-apigw-id", - "value": "Uw_1hFJWLPEFbKQ=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-6929e022-4dc5c06769a0b866a6456227" - }, - { - "key": "X-Request-ID", - "value": "c695d77b-b94e-4e04-9e2b-f7e34ef2e414" - }, - { - "key": "X-Correlation-ID", - "value": "46db2d38-e52b-4fcc-a8cf-2617fec4557a" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"issue\": [\n {\n \"code\": \"invalid\",\n \"diagnostics\": \"Not a valid NHS Number provided for the 'identifier' parameter\",\n \"expression\": [\n \"RelatedPerson.identifier\"\n ],\n \"details\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\",\n \"code\": \"INVALID_IDENTIFIER_VALUE\",\n \"display\": \"Provided value is invalid\"\n }\n ]\n },\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" - } - ] - }, - { - "name": "Invalid identifier system - Get verified candidate relationships", - "event": [ - { - "listen": "prerequest", - "script": { - "exec": [ - "" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/RelatedPerson?identifier=https://fhir.nhs.uk/Id/nhs-number/invalid|730675929", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "RelatedPerson" - ], - "query": [ - { - "key": "identifier", - "value": "https://fhir.nhs.uk/Id/nhs-number/invalid|730675929" - } - ] - }, - "description": "## Example scenario\n\n**Given** a proxy has a related person relationship in PDS \n**When** a GET /RelatedPerson request is sent with an invalid identifier \n**Then** a 400 error is returned with code 'INVALID_IDENTIFIER_VALUE'" - }, - "response": [ - { - "name": "Invalid identifier value error returned", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/RelatedPerson?identifier=https://fhir.nhs.uk/Id/nhs-number/invalid|730675929", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "RelatedPerson" - ], - "query": [ - { - "key": "identifier", - "value": "https://fhir.nhs.uk/Id/nhs-number/invalid|730675929" - } - ] - } - }, - "status": "Bad Request", - "code": 400, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Fri, 28 Nov 2025 17:48:42 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "352" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "66e70023-f78b-48aa-a29f-3df08e3e895c" - }, - { - "key": "x-amz-apigw-id", - "value": "UxADKEqiLPEFbWw=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-6929e07a-ade89162a2d0b573830554ca" - }, - { - "key": "X-Request-ID", - "value": "a6c275c6-3964-4d18-8860-fcf25e510f14" - }, - { - "key": "X-Correlation-ID", - "value": "1d7ecfb8-29fb-461a-9904-e28216b510f8" - }, - { - "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_IDENTIFIER_SYSTEM\",\n \"display\": \"Invalid identifier system\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"The identifier system is not valid.\",\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" - } - ] - } - ], - "description": "## Allowed auth methods\n\n- NHS Login token - Auth with test user `9730675929`\n \n- CIS2 token - Auth with test user `656005750108`\n \n\nSee collection level documentation for info about how to get authorization tokens.", - "auth": { - "type": "bearer", - "bearer": [ - { - "key": "token", - "value": "{{cis2_token}}", - "type": "string" - } - ] - }, - "event": [ - { - "listen": "prerequest", - "script": { - "type": "text/javascript", - "packages": {}, - "requests": {}, - "exec": [ - "" - ] - } - }, - { - "listen": "test", - "script": { - "type": "text/javascript", - "packages": {}, - "requests": {}, - "exec": [ - "" - ] - } - } - ] - } - ], - "auth": { - "type": "bearer", - "bearer": [ - { - "key": "token", - "value": "{{authorization_header_value}}", - "type": "string" - } - ] - }, - "event": [ - { - "listen": "prerequest", - "script": { - "type": "text/javascript", - "packages": {}, - "requests": {}, - "exec": [ - "" - ] - } - }, - { - "listen": "test", - "script": { - "type": "text/javascript", - "packages": {}, - "requests": {}, - "exec": [ - "" - ] - } - } - ], - "variable": [ - { - "key": "nps_enabled", - "value": "", - "description": "Boolean to determine whether the National Proxy Store should be used when fulfilling the request" - }, - { - "key": "nam_cache_enabled", - "value": "", - "description": "Boolean to determine if cached data from NAM should be used when fulfilling the request" - }, - { - "key": "nam_enabled", - "value": "", - "description": "Boolean to determine whether NAM should be called when fulfilling the request" - }, - { - "key": "use_nam_mock", - "value": "", - "description": "Boolean to determine whether the NAM mock should be used when fulfilling the request" - } - ] + "info": { + "_postman_id": "a359139d-5115-463f-926e-dea326d9f2a6", + "name": "Validated Relationship Service - Integration - 21/01/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 \n- App-restricted - for service-to-service authorization\n \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 \n- get_cis2_access_token_int.py - for CIS2 authorization\n \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\n \n2. Go to the Authorization tab for this Postman request\n \n3. Select 'Bearer token' from the drop-down\n \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 \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": "18067099" + }, + "item": [ + { + "name": "Get proxy roles (GET /Consent)", + "item": [ + { + "name": "Valid request - NPS - Get proxy roles for performer", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "" + ], + "type": "text/javascript", + "packages": {}, + "requests": {} + } + }, + { + "listen": "test", + "script": { + "exec": [ + "" + ], + "type": "text/javascript", + "packages": {}, + "requests": {} + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "SomeToken;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9736898148", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9736898148" + } + ] + }, + "description": "This request and its examples will only retrieve proxy roles from the National Proxy Store and not directly from GPIT suppliers via NAM.\n\nSee folder-level docs for more info.\n\n## Example scenario\n\n**Given** proxy roles exist for a performer (proxy) in the National Proxy Store (NPS) \n**When** a GET /Consent request is sent with the performer identifier \n**Then** the proxy roles in NPS are returned\n\n## Authorization\n\nPlease see the folder overview for details of how to generate tokens for this endpoint." + }, + "response": [ + { + "name": "Proxy roles returned - No patient or performer details", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "1c190795-98fc-40d0-b13d-4b566650950a", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "3bedabd0-b86f-4d7b-92d9-94f020b4a834", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "some_token;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9736898148", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9736898148" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Date", + "value": "Thu, 04 Dec 2025 10:48:19 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "3486" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "cf3a99a3-7592-4968-893c-e443d6cb27c8" + }, + { + "key": "x-amz-apigw-id", + "value": "VD0FoHiurPEFXqQ=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-693166f0-1bb8c61dd3aa101687d0b754" + }, + { + "key": "X-Request-ID", + "value": "d3ec5ec8-088f-4db6-8342-1a21d2a2af16" + }, + { + "key": "X-Correlation-ID", + "value": "656bfa49-711b-48c4-9427-1ed8fa34260f" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T10:48:19Z\",\n \"total\": 2,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9736898148\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"resource\": {\n \"id\": \"7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T10:46:27Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/b22d6068-fe78-40f4-b71a-b916dac48c0b\",\n \"resource\": {\n \"id\": \"b22d6068-fe78-40f4-b71a-b916dac48c0b\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T10:47:43Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n }\n ]\n}" + }, + { + "name": "Proxy roles returned - Include patient details", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "some_token;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9736898148&_include=Consent:patient", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9736898148" + }, + { + "key": "_include", + "value": "Consent:patient" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Date", + "value": "Thu, 04 Dec 2025 10:50:25 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "6923" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "edd035fd-2cdb-4c7a-a55c-a55e6faf5743" + }, + { + "key": "x-amz-apigw-id", + "value": "VD0ZXFA2LPEFYqg=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-6931676e-74035c00139aae000a60b5d7" + }, + { + "key": "X-Request-ID", + "value": "64b0f06f-a35e-44bb-baf4-33de94895236" + }, + { + "key": "X-Correlation-ID", + "value": "6a95b411-9936-49bb-bbcb-8e6776417762" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T10:50:25Z\",\n \"total\": 2,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9736898148&_include=Consent%3Apatient\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"resource\": {\n \"id\": \"7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T10:46:27Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/b22d6068-fe78-40f4-b71a-b916dac48c0b\",\n \"resource\": {\n \"id\": \"b22d6068-fe78-40f4-b71a-b916dac48c0b\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T10:47:43Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898644\",\n \"resource\": {\n \"id\": \"9736898644\",\n \"meta\": {\n \"security\": [\n {\n \"code\": \"U\",\n \"display\": \"unrestricted\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-Confidentiality\"\n },\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ],\n \"versionId\": \"4\"\n },\n \"address\": [\n {\n \"extension\": [\n {\n \"extension\": [\n {\n \"url\": \"type\",\n \"valueCoding\": {\n \"code\": \"PAF\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType\"\n }\n },\n {\n \"url\": \"value\",\n \"valueString\": \"29706100\"\n }\n ],\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey\"\n }\n ],\n \"id\": \"gDmhc\",\n \"line\": [\n \"BRAMBLE COTTAGE\",\n \"OLD VICARAGE PARK\",\n \"SCAWBY\",\n \"BRIGG\",\n \"S HUMBERSIDE\"\n ],\n \"period\": {\n \"start\": \"2021-09-10\"\n },\n \"postalCode\": \"DN20 9RL\",\n \"use\": \"home\"\n }\n ],\n \"birthDate\": \"2015-09-26\",\n \"gender\": \"female\",\n \"generalPractitioner\": [\n {\n \"id\": \"gDHTb\",\n \"identifier\": {\n \"period\": {\n \"start\": \"2018-08-22\"\n },\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A20047\"\n }\n }\n ],\n \"identifier\": [\n {\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"01\",\n \"display\": \"Number present and verified\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\n \"version\": \"1.0.0\"\n }\n ]\n }\n }\n ],\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n ],\n \"name\": [\n {\n \"family\": \"SHEPP\",\n \"given\": [\n \"Ashley\",\n \"Ellen\"\n ],\n \"period\": {\n \"start\": \"2025-08-06\"\n },\n \"prefix\": [\n \"MS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898717\",\n \"resource\": {\n \"id\": \"9736898717\",\n \"meta\": {\n \"security\": [\n {\n \"code\": \"U\",\n \"display\": \"unrestricted\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-Confidentiality\"\n },\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ],\n \"versionId\": \"4\"\n },\n \"address\": [\n {\n \"extension\": [\n {\n \"extension\": [\n {\n \"url\": \"type\",\n \"valueCoding\": {\n \"code\": \"PAF\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType\"\n }\n },\n {\n \"url\": \"value\",\n \"valueString\": \"16654057\"\n }\n ],\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey\"\n }\n ],\n \"id\": \"YoGEf\",\n \"line\": [\n \"GLENVILLE\",\n \"FERRY ROAD\",\n \"GOXHILL\",\n \"BARROW-UPON-HUMBER\",\n \"S HUMBERSIDE\"\n ],\n \"period\": {\n \"start\": \"2016-04-09\"\n },\n \"postalCode\": \"DN19 7JY\",\n \"use\": \"home\"\n }\n ],\n \"birthDate\": \"2010-05-31\",\n \"gender\": \"male\",\n \"generalPractitioner\": [\n {\n \"id\": \"bYoHa\",\n \"identifier\": {\n \"period\": {\n \"start\": \"2016-02-12\"\n },\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A20047\"\n }\n }\n ],\n \"identifier\": [\n {\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"01\",\n \"display\": \"Number present and verified\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\n \"version\": \"1.0.0\"\n }\n ]\n }\n }\n ],\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n ],\n \"name\": [\n {\n \"family\": \"CASH\",\n \"given\": [\n \"Jacob\",\n \"Chas\"\n ],\n \"period\": {\n \"start\": \"2025-07-22\"\n },\n \"prefix\": [\n \"MR\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" + }, + { + "name": "Proxy roles returned - Include performer details", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "some_token;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9736898148&_include=Consent:performer", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9736898148" + }, + { + "key": "_include", + "value": "Consent:performer" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Date", + "value": "Thu, 04 Dec 2025 10:50:45 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "5289" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "60649be0-6363-4601-b792-d631af45a966" + }, + { + "key": "x-amz-apigw-id", + "value": "VD0cyFTYLPEF-Fg=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-69316784-cee1c757e6d4e43fb4837684" + }, + { + "key": "X-Request-ID", + "value": "8a113b57-8af9-4d34-b300-100c84059319" + }, + { + "key": "X-Correlation-ID", + "value": "a3683a8c-6172-44a7-8410-0e78a705907b" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T10:50:45Z\",\n \"total\": 2,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9736898148&_include=Consent%3Aperformer\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"resource\": {\n \"id\": \"7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T10:46:27Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/b22d6068-fe78-40f4-b71a-b916dac48c0b\",\n \"resource\": {\n \"id\": \"b22d6068-fe78-40f4-b71a-b916dac48c0b\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T10:47:43Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/ZfgKO\",\n \"resource\": {\n \"id\": \"ZfgKO\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/UwTCq\",\n \"resource\": {\n \"id\": \"UwTCq\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" + }, + { + "name": "Proxy roles returned - Include patient and performer details", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "some_token;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9736898148&_include=Consent:performer&_include=Consent:patient", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9736898148" + }, + { + "key": "_include", + "value": "Consent:performer" + }, + { + "key": "_include", + "value": "Consent:patient" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Date", + "value": "Thu, 04 Dec 2025 10:51:06 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "8726" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "2b36e22f-2649-44c9-b3ce-929ea840df0f" + }, + { + "key": "x-amz-apigw-id", + "value": "VD0gJFjQLPEF_Ew=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-6931679a-aa7dfa232b694d8fdbd9823f" + }, + { + "key": "X-Request-ID", + "value": "d5743541-7330-4347-b9c7-9067feb4b144" + }, + { + "key": "X-Correlation-ID", + "value": "af030657-aad8-45f4-9c70-85e4755a189f" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T10:51:06Z\",\n \"total\": 2,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9736898148&_include=Consent%3Aperformer&_include=Consent%3Apatient\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"resource\": {\n \"id\": \"7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T10:46:27Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/b22d6068-fe78-40f4-b71a-b916dac48c0b\",\n \"resource\": {\n \"id\": \"b22d6068-fe78-40f4-b71a-b916dac48c0b\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T10:47:43Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898644\",\n \"resource\": {\n \"id\": \"9736898644\",\n \"meta\": {\n \"security\": [\n {\n \"code\": \"U\",\n \"display\": \"unrestricted\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-Confidentiality\"\n },\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ],\n \"versionId\": \"4\"\n },\n \"address\": [\n {\n \"extension\": [\n {\n \"extension\": [\n {\n \"url\": \"type\",\n \"valueCoding\": {\n \"code\": \"PAF\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType\"\n }\n },\n {\n \"url\": \"value\",\n \"valueString\": \"29706100\"\n }\n ],\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey\"\n }\n ],\n \"id\": \"gDmhc\",\n \"line\": [\n \"BRAMBLE COTTAGE\",\n \"OLD VICARAGE PARK\",\n \"SCAWBY\",\n \"BRIGG\",\n \"S HUMBERSIDE\"\n ],\n \"period\": {\n \"start\": \"2021-09-10\"\n },\n \"postalCode\": \"DN20 9RL\",\n \"use\": \"home\"\n }\n ],\n \"birthDate\": \"2015-09-26\",\n \"gender\": \"female\",\n \"generalPractitioner\": [\n {\n \"id\": \"gDHTb\",\n \"identifier\": {\n \"period\": {\n \"start\": \"2018-08-22\"\n },\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A20047\"\n }\n }\n ],\n \"identifier\": [\n {\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"01\",\n \"display\": \"Number present and verified\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\n \"version\": \"1.0.0\"\n }\n ]\n }\n }\n ],\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n ],\n \"name\": [\n {\n \"family\": \"SHEPP\",\n \"given\": [\n \"Ashley\",\n \"Ellen\"\n ],\n \"period\": {\n \"start\": \"2025-08-06\"\n },\n \"prefix\": [\n \"MS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898717\",\n \"resource\": {\n \"id\": \"9736898717\",\n \"meta\": {\n \"security\": [\n {\n \"code\": \"U\",\n \"display\": \"unrestricted\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-Confidentiality\"\n },\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ],\n \"versionId\": \"4\"\n },\n \"address\": [\n {\n \"extension\": [\n {\n \"extension\": [\n {\n \"url\": \"type\",\n \"valueCoding\": {\n \"code\": \"PAF\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType\"\n }\n },\n {\n \"url\": \"value\",\n \"valueString\": \"16654057\"\n }\n ],\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey\"\n }\n ],\n \"id\": \"YoGEf\",\n \"line\": [\n \"GLENVILLE\",\n \"FERRY ROAD\",\n \"GOXHILL\",\n \"BARROW-UPON-HUMBER\",\n \"S HUMBERSIDE\"\n ],\n \"period\": {\n \"start\": \"2016-04-09\"\n },\n \"postalCode\": \"DN19 7JY\",\n \"use\": \"home\"\n }\n ],\n \"birthDate\": \"2010-05-31\",\n \"gender\": \"male\",\n \"generalPractitioner\": [\n {\n \"id\": \"bYoHa\",\n \"identifier\": {\n \"period\": {\n \"start\": \"2016-02-12\"\n },\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A20047\"\n }\n }\n ],\n \"identifier\": [\n {\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"01\",\n \"display\": \"Number present and verified\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\n \"version\": \"1.0.0\"\n }\n ]\n }\n }\n ],\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n ],\n \"name\": [\n {\n \"family\": \"CASH\",\n \"given\": [\n \"Jacob\",\n \"Chas\"\n ],\n \"period\": {\n \"start\": \"2025-07-22\"\n },\n \"prefix\": [\n \"MR\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/ZfgKO\",\n \"resource\": {\n \"id\": \"ZfgKO\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/UwTCq\",\n \"resource\": {\n \"id\": \"UwTCq\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" + }, + { + "name": "Proxy roles returned - Filtered by status 'inactive'", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "some_token;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9736898156&status=inactive", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9736898156" + }, + { + "key": "status", + "value": "inactive" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Date", + "value": "Thu, 04 Dec 2025 11:09:14 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "1888" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "290a4ffd-6021-435c-af76-8d6c80492b72" + }, + { + "key": "x-amz-apigw-id", + "value": "VD3JoHOkrPEFSoA=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-69316bd6-5bd69e7021cf6e4e0696d153" + }, + { + "key": "X-Request-ID", + "value": "8b8298dc-a9a4-4257-a6b9-f99d5ff65983" + }, + { + "key": "X-Correlation-ID", + "value": "5af5dfe2-b247-4624-8268-bb4e78593eb3" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:09:14Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9736898156&status=inactive\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/750cb586-eb9b-46c7-a1a5-711307a087af\",\n \"resource\": {\n \"id\": \"750cb586-eb9b-46c7-a1a5-711307a087af\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T10:55:53Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898652\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2025-12-05\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"inactive\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n }\n ]\n}" + }, + { + "name": "Proxy roles returned - Filtered by status 'active' and include patient and performer details", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "some_token;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9736898156&status=active&_include=Consent:performer&_include=Consent:patient", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9736898156" + }, + { + "key": "status", + "value": "active" + }, + { + "key": "_include", + "value": "Consent:performer" + }, + { + "key": "_include", + "value": "Consent:patient" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Date", + "value": "Thu, 04 Dec 2025 11:09:41 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "4528" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "44c6f0cf-6bdb-4b96-8889-55ebe68b8c60" + }, + { + "key": "x-amz-apigw-id", + "value": "VD3M5FGYrPEFZVg=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-69316beb-f2f5e05791f831ed34fb0afa" + }, + { + "key": "X-Request-ID", + "value": "73bded49-9645-4418-bf08-ebd13d92c2a1" + }, + { + "key": "X-Correlation-ID", + "value": "15b5d9d5-9909-458a-91c5-64ee20e93a01" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:09:40Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9736898156&status=active&_include=Consent%3Aperformer&_include=Consent%3Apatient\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40\",\n \"resource\": {\n \"id\": \"4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:08:46Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898660\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-12-05\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898660\",\n \"resource\": {\n \"id\": \"9736898660\",\n \"meta\": {\n \"security\": [\n {\n \"code\": \"U\",\n \"display\": \"unrestricted\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-Confidentiality\"\n },\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ],\n \"versionId\": \"4\"\n },\n \"address\": [\n {\n \"extension\": [\n {\n \"extension\": [\n {\n \"url\": \"type\",\n \"valueCoding\": {\n \"code\": \"PAF\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType\"\n }\n },\n {\n \"url\": \"value\",\n \"valueString\": \"19976537\"\n }\n ],\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey\"\n }\n ],\n \"id\": \"pBQDr\",\n \"line\": [\n \"CARLTON\",\n \"VICARAGE LANE\",\n \"REDBOURNE\",\n \"GAINSBOROUGH\",\n \"LINCS\"\n ],\n \"period\": {\n \"start\": \"2025-07-15\"\n },\n \"postalCode\": \"DN21 4QW\",\n \"use\": \"home\"\n }\n ],\n \"birthDate\": \"2012-04-24\",\n \"gender\": \"female\",\n \"generalPractitioner\": [\n {\n \"id\": \"xSEnH\",\n \"identifier\": {\n \"period\": {\n \"start\": \"2024-11-06\"\n },\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A20047\"\n }\n }\n ],\n \"identifier\": [\n {\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"01\",\n \"display\": \"Number present and verified\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\n \"version\": \"1.0.0\"\n }\n ]\n }\n }\n ],\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898660\"\n }\n ],\n \"name\": [\n {\n \"family\": \"GODREY\",\n \"given\": [\n \"Davina\",\n \"Linda\"\n ],\n \"period\": {\n \"start\": \"2017-04-22\"\n },\n \"prefix\": [\n \"MISS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/nVLgl\",\n \"resource\": {\n \"id\": \"nVLgl\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898660\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" + } + ] + }, + { + "name": "Valid request - NPS - Get proxy roles for patient", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "" + ], + "type": "text/javascript", + "packages": {}, + "requests": {} + } + }, + { + "listen": "test", + "script": { + "exec": [ + "" + ], + "type": "text/javascript", + "packages": {}, + "requests": {} + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "SomeToken;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?patient:identifier=9736898644", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "patient:identifier", + "value": "9736898644" + } + ] + }, + "description": "This request and its examples will only retrieve proxy roles from the National Proxy Store and not directly from GPIT suppliers via NAM.\n\nSee folder level docs for more info.\n\n## Example scenario\n\n**Given** proxy roles exist for a patient in the National Proxy Store (NPS) \n**When** a GET /Consent request is sent with the patient identifier \n**Then** the proxy roles in NPS are returned\n\n## Authorization\n\nPlease see the folder overview for details of how to generate tokens for this endpoint." + }, + "response": [ + { + "name": "Proxy roles returned - No patient or performer details", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "a8fe6a8d-44c5-4451-b8e8-5cf5adc2db03", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "43c2ad8f-43a2-4cfc-8d3a-2b4298ab2b6d", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "some_token;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?patient:identifier=9736898644", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "patient:identifier", + "value": "9736898644" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Date", + "value": "Thu, 04 Dec 2025 11:17:19 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "3484" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "cd84643e-5789-445f-9d2f-eb53fe6b57c5" + }, + { + "key": "x-amz-apigw-id", + "value": "VD4VeEsnLPEFmxA=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-69316dbc-851b7fe822d672bb07d0be6d" + }, + { + "key": "X-Request-ID", + "value": "b7120974-233d-4634-80e2-f404e817f80b" + }, + { + "key": "X-Correlation-ID", + "value": "73e7ab39-f339-4f53-8090-d4320c6a1fc5" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:17:19Z\",\n \"total\": 2,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?patient%3Aidentifier=9736898644\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"resource\": {\n \"id\": \"7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T10:46:27Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"resource\": {\n \"id\": \"553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:15:26Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n }\n ]\n}" + }, + { + "name": "Proxy roles returned - Include performer details", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "some_token;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?patient:identifier=9736898644&_include=Consent:performer", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "patient:identifier", + "value": "9736898644" + }, + { + "key": "_include", + "value": "Consent:performer" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Date", + "value": "Thu, 04 Dec 2025 11:17:45 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "5287" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "d6ea589d-359b-43a5-ac3d-6b570eec9cac" + }, + { + "key": "x-amz-apigw-id", + "value": "VD4YuGlSLPEF7zw=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-69316dd1-47a064ac1a1d588355c13564" + }, + { + "key": "X-Request-ID", + "value": "eb00dad3-5e15-4ade-8ee9-f3597bfab4d3" + }, + { + "key": "X-Correlation-ID", + "value": "a496e8bd-c333-4e87-9927-bbe9ead436a4" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:17:45Z\",\n \"total\": 2,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?patient%3Aidentifier=9736898644&_include=Consent%3Aperformer\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"resource\": {\n \"id\": \"7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T10:46:27Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"resource\": {\n \"id\": \"553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:15:26Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/ZfgKO\",\n \"resource\": {\n \"id\": \"ZfgKO\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/EAONj\",\n \"resource\": {\n \"id\": \"EAONj\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" + }, + { + "name": "Proxy roles returned - Include patient details", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "some_token;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?patient:identifier=9736898644&_include=Consent:patient", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "patient:identifier", + "value": "9736898644" + }, + { + "key": "_include", + "value": "Consent:patient" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Date", + "value": "Thu, 04 Dec 2025 11:18:02 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "5218" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "3a81d012-80ef-4350-8d7b-1f8cda1ef809" + }, + { + "key": "x-amz-apigw-id", + "value": "VD4cPGnErPEFYsw=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-69316de7-bb724d308ffa3272269bfba9" + }, + { + "key": "X-Request-ID", + "value": "ada44c4a-9dcc-4666-a97e-72ebce5630a8" + }, + { + "key": "X-Correlation-ID", + "value": "cfa6112c-4235-41a4-9e58-f4f04d4f7614" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:18:02Z\",\n \"total\": 2,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?patient%3Aidentifier=9736898644&_include=Consent%3Apatient\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"resource\": {\n \"id\": \"7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T10:46:27Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"resource\": {\n \"id\": \"553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:15:26Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898644\",\n \"resource\": {\n \"id\": \"9736898644\",\n \"meta\": {\n \"security\": [\n {\n \"code\": \"U\",\n \"display\": \"unrestricted\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-Confidentiality\"\n },\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ],\n \"versionId\": \"4\"\n },\n \"address\": [\n {\n \"extension\": [\n {\n \"extension\": [\n {\n \"url\": \"type\",\n \"valueCoding\": {\n \"code\": \"PAF\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType\"\n }\n },\n {\n \"url\": \"value\",\n \"valueString\": \"29706100\"\n }\n ],\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey\"\n }\n ],\n \"id\": \"gDmhc\",\n \"line\": [\n \"BRAMBLE COTTAGE\",\n \"OLD VICARAGE PARK\",\n \"SCAWBY\",\n \"BRIGG\",\n \"S HUMBERSIDE\"\n ],\n \"period\": {\n \"start\": \"2021-09-10\"\n },\n \"postalCode\": \"DN20 9RL\",\n \"use\": \"home\"\n }\n ],\n \"birthDate\": \"2015-09-26\",\n \"gender\": \"female\",\n \"generalPractitioner\": [\n {\n \"id\": \"gDHTb\",\n \"identifier\": {\n \"period\": {\n \"start\": \"2018-08-22\"\n },\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A20047\"\n }\n }\n ],\n \"identifier\": [\n {\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"01\",\n \"display\": \"Number present and verified\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\n \"version\": \"1.0.0\"\n }\n ]\n }\n }\n ],\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n ],\n \"name\": [\n {\n \"family\": \"SHEPP\",\n \"given\": [\n \"Ashley\",\n \"Ellen\"\n ],\n \"period\": {\n \"start\": \"2025-08-06\"\n },\n \"prefix\": [\n \"MS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" + }, + { + "name": "Proxy roles returned - Include patient and performer details", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "some_token;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?patient:identifier=9736898644&_include=Consent:performer&_include=Consent:patient", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "patient:identifier", + "value": "9736898644" + }, + { + "key": "_include", + "value": "Consent:performer" + }, + { + "key": "_include", + "value": "Consent:patient" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Date", + "value": "Thu, 04 Dec 2025 11:18:17 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "7021" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "013f49d1-ffbe-4880-bfd6-1b92d13d08a3" + }, + { + "key": "x-amz-apigw-id", + "value": "VD4evE6yLPEFZZA=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-69316df7-175910d69cd894708a0921b9" + }, + { + "key": "X-Request-ID", + "value": "9ce9a6d5-2bd2-4d5e-a984-2c78a457f4d4" + }, + { + "key": "X-Correlation-ID", + "value": "02eabdf7-0a76-4fec-9c99-306273ea8da5" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:18:17Z\",\n \"total\": 2,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?patient%3Aidentifier=9736898644&_include=Consent%3Aperformer&_include=Consent%3Apatient\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"resource\": {\n \"id\": \"7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T10:46:27Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"resource\": {\n \"id\": \"553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:15:26Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898644\",\n \"resource\": {\n \"id\": \"9736898644\",\n \"meta\": {\n \"security\": [\n {\n \"code\": \"U\",\n \"display\": \"unrestricted\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-Confidentiality\"\n },\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ],\n \"versionId\": \"4\"\n },\n \"address\": [\n {\n \"extension\": [\n {\n \"extension\": [\n {\n \"url\": \"type\",\n \"valueCoding\": {\n \"code\": \"PAF\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType\"\n }\n },\n {\n \"url\": \"value\",\n \"valueString\": \"29706100\"\n }\n ],\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey\"\n }\n ],\n \"id\": \"gDmhc\",\n \"line\": [\n \"BRAMBLE COTTAGE\",\n \"OLD VICARAGE PARK\",\n \"SCAWBY\",\n \"BRIGG\",\n \"S HUMBERSIDE\"\n ],\n \"period\": {\n \"start\": \"2021-09-10\"\n },\n \"postalCode\": \"DN20 9RL\",\n \"use\": \"home\"\n }\n ],\n \"birthDate\": \"2015-09-26\",\n \"gender\": \"female\",\n \"generalPractitioner\": [\n {\n \"id\": \"gDHTb\",\n \"identifier\": {\n \"period\": {\n \"start\": \"2018-08-22\"\n },\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A20047\"\n }\n }\n ],\n \"identifier\": [\n {\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"01\",\n \"display\": \"Number present and verified\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\n \"version\": \"1.0.0\"\n }\n ]\n }\n }\n ],\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n ],\n \"name\": [\n {\n \"family\": \"SHEPP\",\n \"given\": [\n \"Ashley\",\n \"Ellen\"\n ],\n \"period\": {\n \"start\": \"2025-08-06\"\n },\n \"prefix\": [\n \"MS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/ZfgKO\",\n \"resource\": {\n \"id\": \"ZfgKO\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/EAONj\",\n \"resource\": {\n \"id\": \"EAONj\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" + }, + { + "name": "Proxy roles returned - Filtered by status 'inactive'", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "some_token;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?patient:identifier=9736898717&status=inactive", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "patient:identifier", + "value": "9736898717" + }, + { + "key": "status", + "value": "inactive" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Date", + "value": "Thu, 04 Dec 2025 11:18:37 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "1886" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "595418c1-5c22-46b6-907c-e799e9fdf609" + }, + { + "key": "x-amz-apigw-id", + "value": "VD4iFHTWLPEFnHA=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-69316e0c-b334c67c9e4d72fd5809672a" + }, + { + "key": "X-Request-ID", + "value": "e6ad06af-45a7-4f98-92c2-88300871c3bc" + }, + { + "key": "X-Correlation-ID", + "value": "8d75c837-bd9e-4784-ac40-84322ee4d188" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:18:37Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?patient%3Aidentifier=9736898717&status=inactive\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/cf7bc8e6-f8e0-41c5-8d08-1741eee5a256\",\n \"resource\": {\n \"id\": \"cf7bc8e6-f8e0-41c5-8d08-1741eee5a256\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:16:43Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"inactive\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n }\n ]\n}" + }, + { + "name": "Proxy roles returned - Filtered by status 'active' and include patient and performer details", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "some_token;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?patient:identifier=9736898717&status=active&_include=Consent:performer&_include=Consent:patient", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "patient:identifier", + "value": "9736898717" + }, + { + "key": "status", + "value": "active" + }, + { + "key": "_include", + "value": "Consent:performer" + }, + { + "key": "_include", + "value": "Consent:patient" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Date", + "value": "Thu, 04 Dec 2025 11:18:51 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "4528" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "bd5079fb-1fc3-428c-ab53-5ba1dfacc510" + }, + { + "key": "x-amz-apigw-id", + "value": "VD4kRHuoLPEF-DQ=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-69316e1a-0dc7c19d64d48ad8a86c4518" + }, + { + "key": "X-Request-ID", + "value": "8da5a25e-ef8b-4cec-84c0-81af22e5132f" + }, + { + "key": "X-Correlation-ID", + "value": "ce7840a8-db71-4897-9853-d06c699adca9" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:18:51Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?patient%3Aidentifier=9736898717&status=active&_include=Consent%3Aperformer&_include=Consent%3Apatient\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/b22d6068-fe78-40f4-b71a-b916dac48c0b\",\n \"resource\": {\n \"id\": \"b22d6068-fe78-40f4-b71a-b916dac48c0b\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T10:47:43Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898717\",\n \"resource\": {\n \"id\": \"9736898717\",\n \"meta\": {\n \"security\": [\n {\n \"code\": \"U\",\n \"display\": \"unrestricted\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-Confidentiality\"\n },\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ],\n \"versionId\": \"4\"\n },\n \"address\": [\n {\n \"extension\": [\n {\n \"extension\": [\n {\n \"url\": \"type\",\n \"valueCoding\": {\n \"code\": \"PAF\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType\"\n }\n },\n {\n \"url\": \"value\",\n \"valueString\": \"16654057\"\n }\n ],\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey\"\n }\n ],\n \"id\": \"YoGEf\",\n \"line\": [\n \"GLENVILLE\",\n \"FERRY ROAD\",\n \"GOXHILL\",\n \"BARROW-UPON-HUMBER\",\n \"S HUMBERSIDE\"\n ],\n \"period\": {\n \"start\": \"2016-04-09\"\n },\n \"postalCode\": \"DN19 7JY\",\n \"use\": \"home\"\n }\n ],\n \"birthDate\": \"2010-05-31\",\n \"gender\": \"male\",\n \"generalPractitioner\": [\n {\n \"id\": \"bYoHa\",\n \"identifier\": {\n \"period\": {\n \"start\": \"2016-02-12\"\n },\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A20047\"\n }\n }\n ],\n \"identifier\": [\n {\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"01\",\n \"display\": \"Number present and verified\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\n \"version\": \"1.0.0\"\n }\n ]\n }\n }\n ],\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n ],\n \"name\": [\n {\n \"family\": \"CASH\",\n \"given\": [\n \"Jacob\",\n \"Chas\"\n ],\n \"period\": {\n \"start\": \"2025-07-22\"\n },\n \"prefix\": [\n \"MR\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/UwTCq\",\n \"resource\": {\n \"id\": \"UwTCq\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" + } + ] + }, + { + "name": "Valid request - NPS - Get proxy roles for patient and proxy", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "" + ], + "type": "text/javascript", + "packages": {}, + "requests": {} + } + }, + { + "listen": "test", + "script": { + "exec": [ + "" + ], + "type": "text/javascript", + "packages": {}, + "requests": {} + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "SomeToken;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9736898121&patient:identifier=9736898644", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9736898121" + }, + { + "key": "patient:identifier", + "value": "9736898644" + } + ] + }, + "description": "This request and its examples will only retrieve proxy roles from the National Proxy Store and not directly from GPIT suppliers via NAM.\n\nSee folder level docs for more info.\n\n## Example scenario\n\n**Given** proxy roles exist for a patient in the National Proxy Store (NPS) \n**When** a GET /Consent request is sent with the performer and patient identifier \n**Then** a single proxy role from NPS is returned\n\n## Authorization\n\nPlease see the folder overview for details of how to generate tokens for this endpoint." + }, + "response": [ + { + "name": "Proxy roles returned - No patient or performer details", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "4d896833-170b-4dc9-a455-66db155cb5c1", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "1525b9dd-abde-44c0-a226-c93af7e47d8e", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "some_token;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9736898121&patient:identifier=9736898644", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9736898121" + }, + { + "key": "patient:identifier", + "value": "9736898644" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Date", + "value": "Thu, 04 Dec 2025 11:19:27 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "1902" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "3d56eb4c-4bc0-47d8-bc61-a55b098dfd9c" + }, + { + "key": "x-amz-apigw-id", + "value": "VD4p_GRgrPEFVPA=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-69316e3f-6ddd811fdb997165b9c6a0d5" + }, + { + "key": "X-Request-ID", + "value": "f8ac2f03-2a5f-4ff7-8ada-093f55fb9c38" + }, + { + "key": "X-Correlation-ID", + "value": "8fc4ed98-4b94-41e1-bff0-0065b6058201" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:19:27Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9736898121&patient%3Aidentifier=9736898644\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"resource\": {\n \"id\": \"553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:15:26Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n }\n ]\n}" + }, + { + "name": "Proxy roles returned - Include performer details", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "some_token;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9736898121&patient:identifier=9736898644&_include=Consent:performer", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9736898121" + }, + { + "key": "patient:identifier", + "value": "9736898644" + }, + { + "key": "_include", + "value": "Consent:performer" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Date", + "value": "Thu, 04 Dec 2025 11:19:44 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "2818" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "12da5c87-c8eb-4085-ad09-ab9df3923150" + }, + { + "key": "x-amz-apigw-id", + "value": "VD4slFJ5rPEF6Mg=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-69316e50-a15563e078d9633ab0d45fb6" + }, + { + "key": "X-Request-ID", + "value": "51afba5e-eea1-415e-a0c3-bc5d47e884fd" + }, + { + "key": "X-Correlation-ID", + "value": "c31bc807-8bc9-4aa5-b531-f44fbfeeef0c" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:19:44Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9736898121&patient%3Aidentifier=9736898644&_include=Consent%3Aperformer\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"resource\": {\n \"id\": \"553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:15:26Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/EAONj\",\n \"resource\": {\n \"id\": \"EAONj\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" + }, + { + "name": "Proxy roles returned - Include patient details", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "some_token;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9736898121&patient:identifier=9736898644&_include=Consent:patient", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9736898121" + }, + { + "key": "patient:identifier", + "value": "9736898644" + }, + { + "key": "_include", + "value": "Consent:patient" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Date", + "value": "Thu, 04 Dec 2025 11:19:57 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "3636" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "341e64dd-974f-4307-a16b-e775c0777fdd" + }, + { + "key": "x-amz-apigw-id", + "value": "VD4uhGhjLPEF8-A=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-69316e5c-16469b05761a5ee0d5ffe220" + }, + { + "key": "X-Request-ID", + "value": "2762b971-bfcc-42c6-be87-b2d2a98cf5b5" + }, + { + "key": "X-Correlation-ID", + "value": "94e42484-2c4d-46fc-8364-027c06a21798" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:19:56Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9736898121&patient%3Aidentifier=9736898644&_include=Consent%3Apatient\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"resource\": {\n \"id\": \"553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:15:26Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898644\",\n \"resource\": {\n \"id\": \"9736898644\",\n \"meta\": {\n \"security\": [\n {\n \"code\": \"U\",\n \"display\": \"unrestricted\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-Confidentiality\"\n },\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ],\n \"versionId\": \"4\"\n },\n \"address\": [\n {\n \"extension\": [\n {\n \"extension\": [\n {\n \"url\": \"type\",\n \"valueCoding\": {\n \"code\": \"PAF\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType\"\n }\n },\n {\n \"url\": \"value\",\n \"valueString\": \"29706100\"\n }\n ],\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey\"\n }\n ],\n \"id\": \"gDmhc\",\n \"line\": [\n \"BRAMBLE COTTAGE\",\n \"OLD VICARAGE PARK\",\n \"SCAWBY\",\n \"BRIGG\",\n \"S HUMBERSIDE\"\n ],\n \"period\": {\n \"start\": \"2021-09-10\"\n },\n \"postalCode\": \"DN20 9RL\",\n \"use\": \"home\"\n }\n ],\n \"birthDate\": \"2015-09-26\",\n \"gender\": \"female\",\n \"generalPractitioner\": [\n {\n \"id\": \"gDHTb\",\n \"identifier\": {\n \"period\": {\n \"start\": \"2018-08-22\"\n },\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A20047\"\n }\n }\n ],\n \"identifier\": [\n {\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"01\",\n \"display\": \"Number present and verified\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\n \"version\": \"1.0.0\"\n }\n ]\n }\n }\n ],\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n ],\n \"name\": [\n {\n \"family\": \"SHEPP\",\n \"given\": [\n \"Ashley\",\n \"Ellen\"\n ],\n \"period\": {\n \"start\": \"2025-08-06\"\n },\n \"prefix\": [\n \"MS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" + }, + { + "name": "Proxy roles returned - Include patient and performer details", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "some_token;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9736898121&patient:identifier=9736898644&_include=Consent:performer&_include=Consent:patient", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9736898121" + }, + { + "key": "patient:identifier", + "value": "9736898644" + }, + { + "key": "_include", + "value": "Consent:performer" + }, + { + "key": "_include", + "value": "Consent:patient" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Date", + "value": "Thu, 04 Dec 2025 11:20:24 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "4552" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "306d5243-752e-45e4-9c44-f175a008c1de" + }, + { + "key": "x-amz-apigw-id", + "value": "VD4y2Gg1rPEFcxQ=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-69316e78-df1338116d16a7272e1de2dc" + }, + { + "key": "X-Request-ID", + "value": "b05f7a59-c008-47d8-868c-011cbdf17500" + }, + { + "key": "X-Correlation-ID", + "value": "95f4ebb0-274e-4757-91f3-91a5fc0a3f0f" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:20:24Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9736898121&patient%3Aidentifier=9736898644&_include=Consent%3Aperformer&_include=Consent%3Apatient\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"resource\": {\n \"id\": \"553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:15:26Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898644\",\n \"resource\": {\n \"id\": \"9736898644\",\n \"meta\": {\n \"security\": [\n {\n \"code\": \"U\",\n \"display\": \"unrestricted\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-Confidentiality\"\n },\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ],\n \"versionId\": \"4\"\n },\n \"address\": [\n {\n \"extension\": [\n {\n \"extension\": [\n {\n \"url\": \"type\",\n \"valueCoding\": {\n \"code\": \"PAF\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType\"\n }\n },\n {\n \"url\": \"value\",\n \"valueString\": \"29706100\"\n }\n ],\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey\"\n }\n ],\n \"id\": \"gDmhc\",\n \"line\": [\n \"BRAMBLE COTTAGE\",\n \"OLD VICARAGE PARK\",\n \"SCAWBY\",\n \"BRIGG\",\n \"S HUMBERSIDE\"\n ],\n \"period\": {\n \"start\": \"2021-09-10\"\n },\n \"postalCode\": \"DN20 9RL\",\n \"use\": \"home\"\n }\n ],\n \"birthDate\": \"2015-09-26\",\n \"gender\": \"female\",\n \"generalPractitioner\": [\n {\n \"id\": \"gDHTb\",\n \"identifier\": {\n \"period\": {\n \"start\": \"2018-08-22\"\n },\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A20047\"\n }\n }\n ],\n \"identifier\": [\n {\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"01\",\n \"display\": \"Number present and verified\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\n \"version\": \"1.0.0\"\n }\n ]\n }\n }\n ],\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n ],\n \"name\": [\n {\n \"family\": \"SHEPP\",\n \"given\": [\n \"Ashley\",\n \"Ellen\"\n ],\n \"period\": {\n \"start\": \"2025-08-06\"\n },\n \"prefix\": [\n \"MS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/EAONj\",\n \"resource\": {\n \"id\": \"EAONj\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" + }, + { + "name": "Proxy roles returned - Filtered by status 'inactive'", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "some_token;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9736898156&patient:identifier=9736898652&status=inactive", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9736898156" + }, + { + "key": "patient:identifier", + "value": "9736898652" + }, + { + "key": "status", + "value": "inactive" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Date", + "value": "Thu, 04 Dec 2025 11:21:09 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "1920" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "24bfc7a0-5f30-47b4-a751-7534837f5224" + }, + { + "key": "x-amz-apigw-id", + "value": "VD455ErXrPEFuaQ=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-69316ea5-6c272d90a7d3656142da3073" + }, + { + "key": "X-Request-ID", + "value": "67a71930-24b3-4baa-8b13-65f27c413a41" + }, + { + "key": "X-Correlation-ID", + "value": "dd934795-88bf-44a3-a2c3-eff757413bfb" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:21:09Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9736898156&patient%3Aidentifier=9736898652&status=inactive\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/750cb586-eb9b-46c7-a1a5-711307a087af\",\n \"resource\": {\n \"id\": \"750cb586-eb9b-46c7-a1a5-711307a087af\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T10:55:53Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898652\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2025-12-05\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"inactive\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n }\n ]\n}" + }, + { + "name": "Proxy roles returned - Filtered by status 'active' and include patient and performer details", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "some_token;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9736898156&patient:identifier=9736898652&status=active&_include=Consent:performer&_include=Consent:patient", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9736898156" + }, + { + "key": "patient:identifier", + "value": "9736898652" + }, + { + "key": "status", + "value": "active" + }, + { + "key": "_include", + "value": "Consent:performer" + }, + { + "key": "_include", + "value": "Consent:patient" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Date", + "value": "Thu, 04 Dec 2025 11:21:28 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "2038" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "f44b69f0-f814-4e0f-89eb-349f1f7e143d" + }, + { + "key": "x-amz-apigw-id", + "value": "VD48uEKHLPEF67A=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-69316eb7-00b15aebe653e94192bc60ee" + }, + { + "key": "X-Request-ID", + "value": "8f40b74e-99fa-4401-bcf1-def08a63da50" + }, + { + "key": "X-Correlation-ID", + "value": "1460d166-ba8d-4d1c-8822-83394abe1169" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:21:27Z\",\n \"total\": 0,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9736898156&patient%3Aidentifier=9736898652&status=active&_include=Consent%3Aperformer&_include=Consent%3Apatient\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898652\",\n \"resource\": {\n \"id\": \"9736898652\",\n \"meta\": {\n \"security\": [\n {\n \"code\": \"U\",\n \"display\": \"unrestricted\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-Confidentiality\"\n },\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ],\n \"versionId\": \"4\"\n },\n \"address\": [\n {\n \"extension\": [\n {\n \"extension\": [\n {\n \"url\": \"type\",\n \"valueCoding\": {\n \"code\": \"PAF\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType\"\n }\n },\n {\n \"url\": \"value\",\n \"valueString\": \"6290975\"\n }\n ],\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey\"\n }\n ],\n \"id\": \"RPnzd\",\n \"line\": [\n \"77 ANGERSTEIN ROAD\",\n \"SCUNTHORPE\",\n \"S HUMBERSIDE\"\n ],\n \"period\": {\n \"start\": \"2019-11-10\"\n },\n \"postalCode\": \"DN17 2NB\",\n \"use\": \"home\"\n }\n ],\n \"birthDate\": \"2013-09-02\",\n \"gender\": \"female\",\n \"generalPractitioner\": [\n {\n \"id\": \"yIjPV\",\n \"identifier\": {\n \"period\": {\n \"start\": \"2021-01-07\"\n },\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A20047\"\n }\n }\n ],\n \"identifier\": [\n {\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"01\",\n \"display\": \"Number present and verified\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\n \"version\": \"1.0.0\"\n }\n ]\n }\n }\n ],\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898652\"\n }\n ],\n \"name\": [\n {\n \"family\": \"CLYDE\",\n \"given\": [\n \"Deanne\",\n \"Tara\"\n ],\n \"period\": {\n \"start\": \"2018-06-16\"\n },\n \"prefix\": [\n \"MS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" + } + ] + }, + { + "name": "Valid request - NAM - Get proxy roles", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "" + ], + "type": "text/javascript", + "packages": {}, + "requests": {} + } + }, + { + "listen": "test", + "script": { + "exec": [ + "" + ], + "type": "text/javascript", + "packages": {}, + "requests": {} + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "{{tpp_9674998535_access_token}};A82648", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=false;nam-cache-enabled=false;nam-enabled=true;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9674998535", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9674998535" + } + ] + }, + "description": "This request and its examples will only retrieve proxy roles directly from GPIT suppliers via NAM and not from the National Proxy Store.\n\nSee folder level docs for more info.\n\n## Example scenario\n\n**Given** proxy roles exist for a patient/performer in a GPIT system \n**And** no proxy roles exist in the National Proxy Store (NPS) for the patient/performer \n**When** a GET /Consent request is sent with the performer/patient identifier \n**Then** the proxy roles from GPIT are returned\n\n## Authorization\n\nPlease see the folder overview for details of how to generate tokens for this endpoint." + }, + "response": [ + { + "name": "No linked profiles returned from NAM - TPP user", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "83892b1a-6369-4657-a0c3-f6071a25e226", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "b496d552-f0c3-4e20-b362-cfc0c80724e3", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "{{tpp_9674998535_access_token}};A82648", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=false;nam-cache-enabled=false;nam-enabled=true;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9674998535&_include=Consent:performer&_include=Consent:patient", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9674998535" + }, + { + "key": "_include", + "value": "Consent:performer" + }, + { + "key": "_include", + "value": "Consent:patient" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Date", + "value": "Thu, 04 Dec 2025 11:22:00 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "5773" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "94465816-7aaa-4d03-81c9-e19156606316" + }, + { + "key": "x-amz-apigw-id", + "value": "VD5BAEGOLPEFVPA=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-69316ed8-af72bfe69942b25c155a4daa" + }, + { + "key": "X-Request-ID", + "value": "ed28025a-9c27-468c-85fd-9b1b8f794198" + }, + { + "key": "X-Correlation-ID", + "value": "fbd025d4-c7e1-4085-8bf8-d11b84652f8d" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:22:00Z\",\n \"total\": 2,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9674998535&_include=Consent%3Aperformer&_include=Consent%3Apatient\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/3a86ad92\",\n \"resource\": {\n \"id\": \"3a86ad92\",\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:21:58.915488+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9692113736\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998535\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998535\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/5c0c47d9\",\n \"resource\": {\n \"id\": \"5c0c47d9\",\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:21:58.915640+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998454\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998535\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998535\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/0b36c4e0\",\n \"resource\": {\n \"id\": \"0b36c4e0\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998535\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9692113736\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/bd6da0a0\",\n \"resource\": {\n \"id\": \"bd6da0a0\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998535\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998454\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/e41dfa63\",\n \"resource\": {\n \"id\": \"e41dfa63\",\n \"meta\": {\n \"profile\": [\n \"https://fhir.hl7.org.uk/StructureDefinition/UKCore-Patient\"\n ],\n \"security\": [\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ]\n },\n \"birthDate\": \"1985-05-29\",\n \"generalPractitioner\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A82648\"\n }\n }\n ],\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9692113736\"\n }\n ],\n \"name\": [\n {\n \"text\": \"Mr Kevin Barry\",\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/2d10a3d9\",\n \"resource\": {\n \"id\": \"2d10a3d9\",\n \"meta\": {\n \"profile\": [\n \"https://fhir.hl7.org.uk/StructureDefinition/UKCore-Patient\"\n ],\n \"security\": [\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ]\n },\n \"birthDate\": \"1921-10-17\",\n \"generalPractitioner\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A82648\"\n }\n }\n ],\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998454\"\n }\n ],\n \"name\": [\n {\n \"text\": \"Mr Landon Fahey\",\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" + }, + { + "name": "Linked profiles returned from NAM - TPP user", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "{{tpp_9674998454_access_token}};A82648", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=false;nam-cache-enabled=false;nam-enabled=true;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9674998454&_include=Consent:patient", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9674998454" + }, + { + "key": "_include", + "value": "Consent:patient" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Date", + "value": "Thu, 04 Dec 2025 11:22:15 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "4370" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "1b190446-e56f-4a64-8c54-25688af8f8f7" + }, + { + "key": "x-amz-apigw-id", + "value": "VD5EAFv1rPEF7zw=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-69316ee6-9925773ab605850282f2d18c" + }, + { + "key": "X-Request-ID", + "value": "dfa182c6-8f6a-46e9-bdc1-1ef5a00740c1" + }, + { + "key": "X-Correlation-ID", + "value": "d50ce1da-c025-451c-847e-c405c299115f" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:22:15Z\",\n \"total\": 2,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9674998454&_include=Consent%3Apatient\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/92a66114\",\n \"resource\": {\n \"id\": \"92a66114\",\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:22:15.290954+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998640\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998454\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998454\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/0b02be0a\",\n \"resource\": {\n \"id\": \"0b02be0a\",\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:22:15.290994+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998543\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998454\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998454\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/934bfd54\",\n \"resource\": {\n \"id\": \"934bfd54\",\n \"meta\": {\n \"profile\": [\n \"https://fhir.hl7.org.uk/StructureDefinition/UKCore-Patient\"\n ],\n \"security\": [\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ]\n },\n \"birthDate\": \"1998-11-14\",\n \"generalPractitioner\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A82648\"\n }\n }\n ],\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998640\"\n }\n ],\n \"name\": [\n {\n \"text\": \"Mr Harry Hood\",\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/29b6ab39\",\n \"resource\": {\n \"id\": \"29b6ab39\",\n \"meta\": {\n \"profile\": [\n \"https://fhir.hl7.org.uk/StructureDefinition/UKCore-Patient\"\n ],\n \"security\": [\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ]\n },\n \"birthDate\": \"1930-11-02\",\n \"generalPractitioner\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A82648\"\n }\n }\n ],\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998543\"\n }\n ],\n \"name\": [\n {\n \"text\": \"Miss Lisa Hankey\",\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" + }, + { + "name": "No linked profiles returned from NAM - EMIS user", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "{{emis_9692113612_access_token}};A29928", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=false;nam-cache-enabled=false;nam-enabled=true;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9692113612&_include=Consent:patient", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9692113612" + }, + { + "key": "_include", + "value": "Consent:patient" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Date", + "value": "Thu, 04 Dec 2025 11:22:37 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "283" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "15121c1a-99de-4830-86c7-00925d4faf3a" + }, + { + "key": "x-amz-apigw-id", + "value": "VD5HEE6MLPEFz5w=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-69316ef9-58a10d83bc130c381cdb0b44" + }, + { + "key": "X-Request-ID", + "value": "1828501c-86dc-4baf-9a13-e37a822e327f" + }, + { + "key": "X-Correlation-ID", + "value": "b891fe97-7778-4db5-be39-b23c03879d2d" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:22:36Z\",\n \"total\": 0,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9692113612&_include=Consent%3Apatient\"\n }\n ],\n \"entry\": []\n}" + }, + { + "name": "Linked profiles returned from NAM - EMIS user", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "{{emis_9692113698_access_token}};A00002", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=false;nam-cache-enabled=false;nam-enabled=true;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9692113698&_include=Consent:performer", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9692113698" + }, + { + "key": "_include", + "value": "Consent:patient", + "disabled": true + }, + { + "key": "_include", + "value": "Consent:performer" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Date", + "value": "Thu, 04 Dec 2025 11:24:08 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "17617" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "739313dc-9917-4df2-9b9d-e59bf36d8c4e" + }, + { + "key": "x-amz-apigw-id", + "value": "VD5U-FHkLPEF0fw=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-69316f52-1205235fe7d41983ba807831" + }, + { + "key": "X-Request-ID", + "value": "2eb98c87-f421-4902-a885-ecc408bd8d89" + }, + { + "key": "X-Correlation-ID", + "value": "4ac19b94-25d4-4de6-9be6-fe5a4a520d15" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:24:08Z\",\n \"total\": 9,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9692113698&_include=Consent%3Aperformer\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/2993b769\",\n \"resource\": {\n \"id\": \"2993b769\",\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:24:07.874676+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9661034451\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/c0d48822\",\n \"resource\": {\n \"id\": \"c0d48822\",\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:24:07.874715+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998403\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/75d0c9dc\",\n \"resource\": {\n \"id\": \"75d0c9dc\",\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:24:07.874739+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9661034400\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/2bed6c1e\",\n \"resource\": {\n \"id\": \"2bed6c1e\",\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:24:07.874762+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9661034168\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/ed77c791\",\n \"resource\": {\n \"id\": \"ed77c791\",\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:24:07.874785+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9253046414\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/02e9fe06\",\n \"resource\": {\n \"id\": \"02e9fe06\",\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:24:07.874807+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9930725970\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/70f274ba\",\n \"resource\": {\n \"id\": \"70f274ba\",\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:24:07.874830+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9803007025\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/87501704\",\n \"resource\": {\n \"id\": \"87501704\",\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:24:07.874852+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9734615173\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/022a7290\",\n \"resource\": {\n \"id\": \"022a7290\",\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:24:07.874874+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9694154065\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/4931d7ae\",\n \"resource\": {\n \"id\": \"4931d7ae\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9661034451\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/34e6ba88\",\n \"resource\": {\n \"id\": \"34e6ba88\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998403\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/1b0f7204\",\n \"resource\": {\n \"id\": \"1b0f7204\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9661034400\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/7115d670\",\n \"resource\": {\n \"id\": \"7115d670\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9661034168\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/63bd0423\",\n \"resource\": {\n \"id\": \"63bd0423\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9253046414\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/04683858\",\n \"resource\": {\n \"id\": \"04683858\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9930725970\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/e0cff956\",\n \"resource\": {\n \"id\": \"e0cff956\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9803007025\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/a9f54c1c\",\n \"resource\": {\n \"id\": \"a9f54c1c\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9734615173\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/8b794ba5\",\n \"resource\": {\n \"id\": \"8b794ba5\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9694154065\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" + } + ] + }, + { + "name": "Valid request - No proxy roles returned - Get proxy roles", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "" + ], + "type": "text/javascript", + "packages": {}, + "requests": {} + } + }, + { + "listen": "prerequest", + "script": { + "exec": [ + "" + ], + "type": "text/javascript", + "packages": {}, + "requests": {} + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "SomeToken;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?patient:identifier=9736898199", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "patient:identifier", + "value": "9736898199" + } + ] + }, + "description": "## Example scenario\n\n**Given** no proxy roles exist for a patient/performer in NPS or GPIT systems \n**When** a GET /Consent request is sent with the performer/patient identifier \n**Then** no proxy roles are returned\n\n## Authorization\n\nPlease see the folder overview for details of how to generate tokens for this endpoint." + }, + "response": [ + { + "name": "No roles returned", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "b8b052ae-6841-4b64-bdf0-c969d32d94bd", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "e9920101-1ae7-4644-8ae9-5298f7bdda3b", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "SomeToken;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?patient:identifier=9736898199", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "patient:identifier", + "value": "9736898199" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Thu, 27 Nov 2025 15:20:11 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "254" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "62f7a9ef-477a-4a24-8bba-c3da1f684805" + }, + { + "key": "x-amz-apigw-id", + "value": "UtXWqH7MLPEFkaw=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-69286c2a-60c4f8c5c094e6753e2352ce" + }, + { + "key": "X-Request-ID", + "value": "31683198-4901-4516-8522-baf7a3de343a" + }, + { + "key": "X-Correlation-ID", + "value": "bdc29a81-c2c3-4622-b1cb-6b0d939ef622" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2025-11-27T15:20:11Z\",\n \"total\": 0,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?patient%3Aidentifier=9736898199\"\n }\n ],\n \"entry\": []\n}" + } + ] + }, + { + "name": "Invalid status parameter - Get proxy roles", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "" + ], + "type": "text/javascript", + "packages": {}, + "requests": {} + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "SomeToken;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?patient:identifier=9736898199&status=test", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "patient:identifier", + "value": "9736898199" + }, + { + "key": "status", + "value": "test" + } + ] + }, + "description": "## Example scenario\n\n**Given** proxy roles exist for a patient/performer in NPS or a GPIT system \n**When** a GET /Consent request is sent with an invalid status parameter \n**Then** a 422 error is returned with the detail 'Required parameter(s) are invalid.'\n\n## Authorization\n\nPlease see the folder overview for details of how to generate tokens for this endpoint." + }, + "response": [ + { + "name": "Invalid status parameter error returned", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "dcc26889-b2fe-4794-9531-88c887f7e134", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "91e70db5-6a5d-4382-bfc1-027d2b81bc3c", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "SomeToken;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?patient:identifier=9736898199&status=test", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "patient:identifier", + "value": "9736898199" + }, + { + "key": "status", + "value": "test" + } + ] + } + }, + "status": "Unprocessable Entity (WebDAV) (RFC 4918)", + "code": 422, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Thu, 27 Nov 2025 16:45:57 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "375" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "072d3fa4-9703-4b80-88ba-e679c01b3129" + }, + { + "key": "x-amz-apigw-id", + "value": "Utj6vHGjLPEFvyQ=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-69288044-9a8fa9560202aeb1b9390e51" + }, + { + "key": "X-Request-ID", + "value": "0437a831-fa18-43ca-a376-21b2a8f33900" + }, + { + "key": "X-Correlation-ID", + "value": "8cf2b8d1-d98e-4b93-bb62-34583b31f0ea" + }, + { + "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_PARAMETER\",\n \"display\": \"Required parameter(s) are invalid.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"Invalid request with error - status parameter is invalid.\",\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" + } + ] + }, + { + "name": "Invalid include parameter - Get proxy roles", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "" + ], + "type": "text/javascript", + "packages": {}, + "requests": {} + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "SomeToken;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9736898148&_include=Consent:test", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9736898148" + }, + { + "key": "_include", + "value": "Consent:test" + } + ] + }, + "description": "## Gherkin scenario\n\n**Given** proxy roles exist for a patient/performer in NPS or a GPIT system \n**When** a GET /Consent request is sent with an invalid include parameter \n**Then** a 422 error is returned with the detail 'Required parameter(s) are invalid.'\n\n## Authorization\n\nPlease see the folder overview for details of how to generate tokens for this endpoint." + }, + "response": [ + { + "name": "Invalid include parameter error returned", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "b14c0f0f-ad95-45e4-9b2a-9286fb050453", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "e7e0d226-d580-44a6-8688-2aeb0deedf00", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "SomeToken;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9736898148&_include=Consent:test", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9736898148" + }, + { + "key": "_include", + "value": "Consent:test" + } + ] + } + }, + "status": "Unprocessable Entity (WebDAV) (RFC 4918)", + "code": 422, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Thu, 27 Nov 2025 16:46:36 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "377" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "e9f62008-61ec-417a-8231-506b51d07844" + }, + { + "key": "x-amz-apigw-id", + "value": "UtkBAFkIrPEFuvQ=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-6928806c-3f5337b27e75f90c703fd6b0" + }, + { + "key": "X-Request-ID", + "value": "fb15a103-bf9a-499e-a7b1-24dc6563eb13" + }, + { + "key": "X-Correlation-ID", + "value": "f5ec5ae0-c762-4efb-95e3-317628c5cd80" + }, + { + "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_PARAMETER\",\n \"display\": \"Required parameter(s) are invalid.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"Invalid request with error - _include parameter is invalid.\",\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" + } + ] + }, + { + "name": "Invalid performer identifier - Get proxy roles", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "" + ], + "type": "text/javascript", + "packages": {}, + "requests": {} + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "SomeToken;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=90000000", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "90000000" + } + ] + }, + "description": "## Example scenario\n\n**Given** proxy roles exist for a patient/performer in NPS or a GPIT system \n**When** a GET /Consent request is sent with an invalid performer identifier \n**Then** a 422 error is returned with the detail 'Required parameter(s) are invalid.'\n\n## Authorization\n\nPlease see the folder overview for details of how to generate tokens for this endpoint." + }, + "response": [ + { + "name": "Invalid performer identifier returned", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "6e975672-d1b4-402c-b47d-0994d55e1517", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "268d0936-6ffb-474a-a7bf-f44d4214e36e", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "SomeToken;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=90000000", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "90000000" + } + ] + } + }, + "status": "Unprocessable Entity (WebDAV) (RFC 4918)", + "code": 422, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Thu, 27 Nov 2025 16:47:01 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "428" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "2c57ff69-fe19-498b-8163-00b392e47313" + }, + { + "key": "x-amz-apigw-id", + "value": "UtkE-EaXLPEFV9Q=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-69288085-dfbdd45a57543fb9bb4ebd8b" + }, + { + "key": "X-Request-ID", + "value": "2d274752-140d-49de-ab31-56012d28c2cb" + }, + { + "key": "X-Correlation-ID", + "value": "7187bca7-8d57-4561-b0f2-a5aba91ec94c" + }, + { + "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_IDENTIFIER_VALUE\",\n \"display\": \"Required parameter(s) are invalid.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"Invalid request with error - performer:identifier or patient:identifier parameter is invalid.\",\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" + } + ] + }, + { + "name": "Invalid performer identifier system - Get proxy roles", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "" + ], + "type": "text/javascript", + "packages": {}, + "requests": {} + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "SomeToken;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=invalid|9736898199", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "invalid|9736898199" + } + ] + }, + "description": "## Example scenario\n\n**Given** proxy roles exist for a patient/performer in NPS or a GPIT system \n**When** a GET /Consent request is sent with an invalid performer identifier system \n**Then** a 422 error is returned with the detail 'Required parameter(s) are invalid.'\n\n## Authorization\n\nPlease see the folder overview for details of how to generate tokens for this endpoint." + }, + "response": [ + { + "name": "Invalid performer identifier system error returned", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "995e5222-fce7-40e2-8424-1e920d920491", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "16ec5418-1591-45f7-a84c-e95cbcd5cd67", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "SomeToken;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=invalid|9736898199", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "invalid|9736898199" + } + ] + } + }, + "status": "Unprocessable Entity (WebDAV) (RFC 4918)", + "code": 422, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Thu, 27 Nov 2025 16:47:46 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "426" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "8a8529b6-34ac-46b1-8868-0a6ec0440151" + }, + { + "key": "x-amz-apigw-id", + "value": "UtkL-HDVLPEFVxg=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-692880b2-6286da8b511f08a6d7ccf9db" + }, + { + "key": "X-Request-ID", + "value": "9cc2d0ef-8f7a-46b7-89c9-c884bf61cc3a" + }, + { + "key": "X-Correlation-ID", + "value": "57948f02-5db0-4267-a6b7-cae30485e5eb" + }, + { + "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_IDENTIFIER_SYSTEM\",\n \"display\": \"Required parameter(s) are invalid.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"Invalid request with error - performer:identifier or patient:identifier system parameter is invalid.\",\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" + } + ] + }, + { + "name": "Missing performer identifier value - Get proxy roles", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "" + ], + "type": "text/javascript", + "packages": {}, + "requests": {} + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "SomeToken;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ] + }, + "description": "## Example scenario\n\n**Given** proxy roles exist for a patient/performer in NPS or a GPIT system \n**When** a GET /Consent request is sent with an missing performer identifier value \n**Then** a 400 error is returned with the detail 'Required parameter(s) are missing.'\n\n## Authorization\n\nPlease see the folder overview for details of how to generate tokens for this endpoint." + }, + "response": [ + { + "name": "Missing performer identifier value error returned", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "53b3ca95-ad9d-4cd5-a194-78a42daff0df", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "88aaae3f-7168-4f69-b71a-60641082ab4b", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "SomeToken;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Thu, 27 Nov 2025 16:48:15 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "417" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "4984ba67-d994-4f08-910e-e25024a8ba57" + }, + { + "key": "x-amz-apigw-id", + "value": "UtkQdERvrPEFrBg=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-692880cf-614067cb88aa075eca482015" + }, + { + "key": "X-Request-ID", + "value": "f536a55f-7115-4ab4-a1c9-3049ca919351" + }, + { + "key": "X-Correlation-ID", + "value": "636e5f80-53b3-4bcf-9176-2967325a9e85" + }, + { + "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_IDENTIFIER_VALUE\",\n \"display\": \"Required parameter(s) are missing.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"Invalid request with error - performer:identifier or patient:identifier parameter not found.\",\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" + } + ] + }, + { + "name": "GP practice not found - Get proxy roles", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "" + ], + "type": "text/javascript", + "packages": {}, + "requests": {} + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "SomeToken;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=false;nam-cache-enabled=false;nam-enabled=true;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9736898229", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9736898229" + } + ] + }, + "description": "## Example scenario\n\n**Given** a performer/patient is not registered at a GP \n**And** the performer/patient has no proxy roles in the National Proxy Store \n**When** a GET /Consent request is sent for the performer/patient \n**Then** a 404 error is returned with the detail 'GP Practice could not be found - invalid resources cannot be retrieved'\n\n## Authorization\n\nPlease see the folder overview for details of how to generate tokens for this endpoint." + }, + "response": [ + { + "name": "GP practice not found error returned", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "7c22ece1-b0a0-4067-8ad7-56f8bceced93", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "f1b40261-0aa6-44de-8563-3bfcc5813510", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "SomeToken;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=false;nam-cache-enabled=false;nam-enabled=true;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9736898229", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9736898229" + } + ] + } + }, + "status": "Not Found", + "code": 404, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Thu, 27 Nov 2025 16:48:38 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "391" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "e0bae044-bde7-4def-a600-199f72ea2e50" + }, + { + "key": "x-amz-apigw-id", + "value": "UtkTcEIOLPEF5aQ=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-692880e2-7d058bc8fc71f9ee272f339d" + }, + { + "key": "X-Request-ID", + "value": "c1f8bed5-6729-4b9f-b20c-180b069809ed" + }, + { + "key": "X-Correlation-ID", + "value": "3132cc74-64ef-465d-aac9-502f27c6ac1d" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"issue\": [\n {\n \"code\": \"processing\",\n \"details\": {\n \"coding\": [\n {\n \"code\": \"GP_PRACTICE_NOT_FOUND\",\n \"display\": \"GP Practice could not be found - invalid resources cannot be retrieved\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"GP Practice could not be found\",\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" + } + ] + } + ], + "description": "## Authorization\n\n### Allowed auth methods\n\n- App restricted token\n \n- NHS Login token - Auth with test user `9730675929`\n \n- CIS2 token - Auth with test user `656005750108`\n \n\nSee collection level documentation for info about how to get authorization tokens.\n\n## NPS and NAM routing\n\nYou will notice that there are 'Valid request - NPS' and 'Valid request - NAM' requests and examples within this folder. These are set up to retrieve the proxy roles from different data sources:\n\n- **Valid request - NPS**: Retrieves the roles from the National Proxy Store (NPS) only. Following the eventual migration of all proxy and related person data from GPIT to NPS, this will become the only route for all requests.\n \n- **Valid request - NAM:** Retrives the roles as related person data from the GPIT suppliers via NAM without checking if any exist in NPS first. This requires specific connection parameters to authorise with the GPIT supplier systems\n \n\nThis routing is controlled in the requests by the `X-Test-Routing-Flag` header. This header is used in the VRS pre-prod environments to control where the proxy roles are retrieved from. It is intended to be used for testing purposes only. Omission of this header will cause the default routing settings for the given environment to be followed instead. This is typically for roles to be retrieved from NPS, with NAM used as a fallback if none are found.", + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{consent_app_auth_header_value}}", + "type": "string" + } + ] + }, + "event": [ + { + "listen": "prerequest", + "script": { + "type": "text/javascript", + "packages": {}, + "requests": {}, + "exec": [ + "var uuid = require('uuid');", + "", + "var privateKey = pm.environment.get('vrs_api_private_key') || '';", + "var api_key_value = pm.environment.get('nhs_developer_account_api_key') || '';", + "", + "if (!privateKey) {", + " throw new Error(\"Variable vrs_api_private_key must be set with your private key for signed JWT authentication.\");", + "}", + "", + "// Replace any '/n' new lines with actual new lines", + "privateKey = privateKey.replace(/\\\\n/g, '\\n');", + "", + "if (!api_key_value) {", + " throw new Error(\"Variable nhs_developer_account_app_key must be set with your integration testing application API key.\");", + "}", + "", + "var auth_url = 'https://int.api.service.nhs.uk/oauth2-mock/token';", + "var navigator = {};", + "var window = {};", + "const interval = setTimeout(() => {}, 2147483647);", + "", + "return new Promise((resolve, reject) => { ", + " if (pm.globals.has('jsrsasign-js') && pm.globals.get('jsrsasign-js') !== \"\") {", + " return resolve();", + " }", + "", + " pm.sendRequest(", + " {", + " url: 'https://kjur.github.io/jsrsasign/jsrsasign-all-min.js',", + " method: 'GET'", + " }, function (err, res) {", + " if (err) {", + " return reject(err);", + " }", + "", + " pm.globals.set('jsrsasign-js', res.text()); ", + " return resolve();", + " }", + " );", + "}).then(() => { ", + " eval(pm.globals.get(\"jsrsasign-js\")); ", + "", + " // Set headers for JWT", + " var header = {", + " 'typ': 'JWT',", + " 'alg': 'RS512',", + " 'kid': 'VRS-dev-12-nov-2025'", + " };", + "", + " // Prepare timestamp in seconds", + " var currentTimestamp = Math.floor(Date.now() / 1000)", + " var uuid = require('uuid');", + " var jti_value = uuid.v4();", + " var data = {", + " 'sub': api_key_value,", + " 'iss': api_key_value,", + " 'jti': jti_value,", + " 'aud': auth_url,", + " 'exp': currentTimestamp + 180, // expiry time is 180 seconds from time of creation", + " } ", + "", + " var sJWT = KJUR.jws.JWS.sign(header.alg, JSON.stringify(header), JSON.stringify(data), privateKey); ", + " return new Promise((resolve, reject) => { ", + " pm.sendRequest({", + " url: auth_url,", + " method: \"POST\",", + " header: {", + " \"Content-Type\": \"application/x-www-form-urlencoded\"", + " },", + " body: {", + " mode: \"urlencoded\",", + " urlencoded: [", + " {", + " key: \"grant_type\",", + " value: \"client_credentials\"", + " },", + " {", + " key: \"client_assertion_type\",", + " value: \"urn:ietf:params:oauth:client-assertion-type:jwt-bearer\",", + " },", + " {", + " key: \"client_assertion\",", + " value: sJWT", + " }", + " ]", + " }", + " }, function (err, res) { ", + " if (err) {", + " return reject(err);", + " }", + "", + " //assign the authorization header value", + " pm.environment.set('consent_app_auth_header_value', `${res.json().access_token}`);", + "", + " return resolve();", + " }); ", + " });", + "}).then(() => { ", + " clearTimeout(interval);", + "}).catch((err) => { ", + " console.error(err); ", + " clearTimeout(interval); ", + "});" + ] + } + }, + { + "listen": "test", + "script": { + "type": "text/javascript", + "packages": {}, + "requests": {}, + "exec": [ + "" + ] + } + } + ] + }, + { + "name": "Get proxy role (GET /Consent/{id})", + "item": [ + { + "name": "Valid request - Get proxy role", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "" + ], + "type": "text/javascript", + "packages": {}, + "requests": {} + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent/:consent_id", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent", + ":consent_id" + ], + "variable": [ + { + "key": "consent_id", + "value": "4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40" + } + ] + }, + "description": "## Example scenario\n\n**Given** a proxy role exists between a performer and a patient in the National Proxy Store \n**When** a GET /Consent/{id} request is sent with the consent id of the proxy role \n**Then** the proxy role is returned" + }, + "response": [ + { + "name": "Proxy role returned - No patient or performer details", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "4b1a8cf8-aa7e-4aa2-b465-44a5d25be876", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "b09740bc-b71f-4d04-a597-c89ab3804f90", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent/:consent_id", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent", + ":consent_id" + ], + "variable": [ + { + "key": "consent_id", + "value": "4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Date", + "value": "Thu, 04 Dec 2025 11:28:18 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "1873" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "23636f8d-f5ef-4050-8c67-51e393b47c87" + }, + { + "key": "x-amz-apigw-id", + "value": "VD581F_4LPEFyDg=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-69317051-6384bdf9e3106d26096daa32" + }, + { + "key": "X-Request-ID", + "value": "784fb8d0-37ff-4716-bf77-81a395fd20f8" + }, + { + "key": "X-Correlation-ID", + "value": "ec404ce9-1721-4158-91af-2064ad3e7ea4" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:28:18Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40\",\n \"resource\": {\n \"id\": \"4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:08:46Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898660\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-12-05\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n }\n ]\n}" + }, + { + "name": "Proxy role returned - Include performer details", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent/:consent_id?_include=Consent:performer", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent", + ":consent_id" + ], + "query": [ + { + "key": "_include", + "value": "Consent:performer" + } + ], + "variable": [ + { + "key": "consent_id", + "value": "4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Date", + "value": "Thu, 04 Dec 2025 11:28:48 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "2789" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "a1f034c1-6ee8-499e-aa60-eea157ad4bd9" + }, + { + "key": "x-amz-apigw-id", + "value": "VD6AYFQMrPEFgjw=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-69317068-3a18b175fb02b76c68acfce1" + }, + { + "key": "X-Request-ID", + "value": "e8a5dada-5577-4738-abd5-7a09251e8c3b" + }, + { + "key": "X-Correlation-ID", + "value": "5eeb9d78-133f-4132-b121-649162a6bc14" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:28:47Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40?_include=Consent%3Aperformer\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40\",\n \"resource\": {\n \"id\": \"4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:08:46Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898660\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-12-05\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/nVLgl\",\n \"resource\": {\n \"id\": \"nVLgl\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898660\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" + }, + { + "name": "Proxy role returned - Include patient details", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent/:consent_id?_include=Consent:patient", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent", + ":consent_id" + ], + "query": [ + { + "key": "_include", + "value": "Consent:patient" + } + ], + "variable": [ + { + "key": "consent_id", + "value": "4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Date", + "value": "Thu, 04 Dec 2025 11:29:08 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "3601" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "b6cb5439-d1a8-4f95-bd3e-9dca7bed9e88" + }, + { + "key": "x-amz-apigw-id", + "value": "VD6ErHoPLPEF1rg=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-69317083-b57a368a7776107b8b3e5f7a" + }, + { + "key": "X-Request-ID", + "value": "22ca0610-1b6e-4e3a-aa1a-ede697da4a1d" + }, + { + "key": "X-Correlation-ID", + "value": "71035b63-936a-4ce4-b036-3d592c764d88" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:29:08Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40?_include=Consent%3Apatient\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40\",\n \"resource\": {\n \"id\": \"4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:08:46Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898660\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-12-05\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898660\",\n \"resource\": {\n \"id\": \"9736898660\",\n \"meta\": {\n \"security\": [\n {\n \"code\": \"U\",\n \"display\": \"unrestricted\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-Confidentiality\"\n },\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ],\n \"versionId\": \"4\"\n },\n \"address\": [\n {\n \"extension\": [\n {\n \"extension\": [\n {\n \"url\": \"type\",\n \"valueCoding\": {\n \"code\": \"PAF\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType\"\n }\n },\n {\n \"url\": \"value\",\n \"valueString\": \"19976537\"\n }\n ],\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey\"\n }\n ],\n \"id\": \"pBQDr\",\n \"line\": [\n \"CARLTON\",\n \"VICARAGE LANE\",\n \"REDBOURNE\",\n \"GAINSBOROUGH\",\n \"LINCS\"\n ],\n \"period\": {\n \"start\": \"2025-07-15\"\n },\n \"postalCode\": \"DN21 4QW\",\n \"use\": \"home\"\n }\n ],\n \"birthDate\": \"2012-04-24\",\n \"gender\": \"female\",\n \"generalPractitioner\": [\n {\n \"id\": \"xSEnH\",\n \"identifier\": {\n \"period\": {\n \"start\": \"2024-11-06\"\n },\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A20047\"\n }\n }\n ],\n \"identifier\": [\n {\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"01\",\n \"display\": \"Number present and verified\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\n \"version\": \"1.0.0\"\n }\n ]\n }\n }\n ],\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898660\"\n }\n ],\n \"name\": [\n {\n \"family\": \"GODREY\",\n \"given\": [\n \"Davina\",\n \"Linda\"\n ],\n \"period\": {\n \"start\": \"2017-04-22\"\n },\n \"prefix\": [\n \"MISS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" + }, + { + "name": "Proxy role returned - Include performer and patient details", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent/:consent_id?_include=Consent:patient&_include=Consent:performer", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent", + ":consent_id" + ], + "query": [ + { + "key": "_include", + "value": "Consent:patient" + }, + { + "key": "_include", + "value": "Consent:performer" + } + ], + "variable": [ + { + "key": "consent_id", + "value": "4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Date", + "value": "Thu, 04 Dec 2025 11:29:26 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "4517" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "9db19dac-df92-4494-8f31-076621ab3d1a" + }, + { + "key": "x-amz-apigw-id", + "value": "VD6HkGFkrPEFxmw=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-69317096-6ad930e767f145f7dd07b977" + }, + { + "key": "X-Request-ID", + "value": "5fd5c3dc-1f5c-4ac5-a9b4-018fdd7f1a0b" + }, + { + "key": "X-Correlation-ID", + "value": "fd7368b4-0828-40b0-97fa-6d19fb51a9e0" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:29:26Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40?_include=Consent%3Apatient&_include=Consent%3Aperformer\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40\",\n \"resource\": {\n \"id\": \"4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:08:46Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898660\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-12-05\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898660\",\n \"resource\": {\n \"id\": \"9736898660\",\n \"meta\": {\n \"security\": [\n {\n \"code\": \"U\",\n \"display\": \"unrestricted\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-Confidentiality\"\n },\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ],\n \"versionId\": \"4\"\n },\n \"address\": [\n {\n \"extension\": [\n {\n \"extension\": [\n {\n \"url\": \"type\",\n \"valueCoding\": {\n \"code\": \"PAF\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType\"\n }\n },\n {\n \"url\": \"value\",\n \"valueString\": \"19976537\"\n }\n ],\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey\"\n }\n ],\n \"id\": \"pBQDr\",\n \"line\": [\n \"CARLTON\",\n \"VICARAGE LANE\",\n \"REDBOURNE\",\n \"GAINSBOROUGH\",\n \"LINCS\"\n ],\n \"period\": {\n \"start\": \"2025-07-15\"\n },\n \"postalCode\": \"DN21 4QW\",\n \"use\": \"home\"\n }\n ],\n \"birthDate\": \"2012-04-24\",\n \"gender\": \"female\",\n \"generalPractitioner\": [\n {\n \"id\": \"xSEnH\",\n \"identifier\": {\n \"period\": {\n \"start\": \"2024-11-06\"\n },\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A20047\"\n }\n }\n ],\n \"identifier\": [\n {\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"01\",\n \"display\": \"Number present and verified\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\n \"version\": \"1.0.0\"\n }\n ]\n }\n }\n ],\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898660\"\n }\n ],\n \"name\": [\n {\n \"family\": \"GODREY\",\n \"given\": [\n \"Davina\",\n \"Linda\"\n ],\n \"period\": {\n \"start\": \"2017-04-22\"\n },\n \"prefix\": [\n \"MISS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/nVLgl\",\n \"resource\": {\n \"id\": \"nVLgl\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898660\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" + } + ] + }, + { + "name": "Invalid consent id - Get proxy role", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "" + ], + "type": "text/javascript", + "packages": {}, + "requests": {} + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent/:consent_id", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent", + ":consent_id" + ], + "variable": [ + { + "key": "consent_id", + "value": "invalid" + } + ] + }, + "description": "## Example scenario\n\n**Given** a proxy role exists between a performer and a patient in the National Proxy Store \n**When** a GET /Consent/{id} request is sent where the ID is invalid \n**Then** a 400 error is returned with details including 'Required parameter(s) are invalid.'" + }, + "response": [ + { + "name": "Invalid consent id error returned", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "6ada3f0b-6520-4517-a71c-8ee93616f52b", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "ac9c9714-f361-44f2-92be-ea1eb00f9990", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent/:consent_id", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent", + ":consent_id" + ], + "variable": [ + { + "key": "consent_id", + "value": "invalid" + } + ] + } + }, + "status": "Unprocessable Entity (WebDAV) (RFC 4918)", + "code": 422, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Thu, 27 Nov 2025 16:49:51 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "370" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "8bae29b7-2cf9-4f6f-b054-0ff6133092b7" + }, + { + "key": "x-amz-apigw-id", + "value": "UtkfVE6VLPEFmDg=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-6928812e-f15d362bb65b30e32885ea32" + }, + { + "key": "X-Request-ID", + "value": "51f1c948-51e0-4719-8307-fd1f987809a1" + }, + { + "key": "X-Correlation-ID", + "value": "cf91adbc-f994-4a56-9d6b-2b324c0af196" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"issue\": [\n {\n \"code\": \"invalid\",\n \"diagnostics\": \"Invalid request with error - ID must be a valid UUID.\",\n \"details\": {\n \"coding\": [\n {\n \"code\": \"INVALID_ID_VALUE\",\n \"display\": \"Required parameter(s) are invalid.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" + } + ] + }, + { + "name": "Invalid include parameter - Get proxy role", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "" + ], + "type": "text/javascript", + "packages": {}, + "requests": {} + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent/:consent_id?_include=Consent:invalid", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent", + ":consent_id" + ], + "query": [ + { + "key": "_include", + "value": "Consent:invalid" + } + ], + "variable": [ + { + "key": "consent_id", + "value": "77363c92-8c33-490f-b5c9-9ef81c2cf16f" + } + ] + }, + "description": "## Example scenario\n\n**Given** a proxy role exists between a performer and a patient in the National Proxy Store \n**When** a GET /Consent/{id} request is sent with an invalid include parameter \n**Then** a 422 error is returned with details including 'Required parameter(s) are invalid.'" + }, + "response": [ + { + "name": "Invalid include parameter error returned", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "b6656a79-4fde-4def-b9ae-5cb1d5667d8f", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "7ae117a4-5b43-4aac-aa00-5fcc0c460fac", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent/:consent_id?_include=Consent:invalid", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent", + ":consent_id" + ], + "query": [ + { + "key": "_include", + "value": "Consent:invalid" + } + ], + "variable": [ + { + "key": "consent_id", + "value": "77363c92-8c33-490f-b5c9-9ef81c2cf16f" + } + ] + } + }, + "status": "Unprocessable Entity (WebDAV) (RFC 4918)", + "code": 422, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Thu, 27 Nov 2025 16:50:07 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "377" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "6da48428-7512-4d8b-9856-b2cc37713381" + }, + { + "key": "x-amz-apigw-id", + "value": "Utkh9GPDLPEF3pw=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-6928813f-6ca71472e425ed45ed5bd0a5" + }, + { + "key": "X-Request-ID", + "value": "2dbb0b8c-a6c8-4bf2-9005-ec19ff68f5b2" + }, + { + "key": "X-Correlation-ID", + "value": "ec9a3692-5922-491d-8df1-da17fe8e473b" + }, + { + "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_PARAMETER\",\n \"display\": \"Required parameter(s) are invalid.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"Invalid request with error - _include parameter is invalid.\",\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" + } + ] + }, + { + "name": "Proxy role not found - Get proxy role", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "" + ], + "type": "text/javascript", + "packages": {}, + "requests": {} + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent/:consent_id", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent", + ":consent_id" + ], + "variable": [ + { + "key": "consent_id", + "value": "4cfccac1-673c-4fea-9b73-54b1a605c9a0" + } + ] + }, + "description": "## Example scenario\n\n**Given** a proxy role does not exist between a performer and a patient in the National Proxy Store \n**When** a GET /Consent/{id} request is sent \n**Then** a 404 error is returned with details including 'Resource that has been marked as invalid was requested - invalid resources cannot be retrieved'" + }, + "response": [ + { + "name": "Proxy role not found error response", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "ed862755-76fc-47b5-9381-9578062418e3", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "5095096c-4f78-4544-b812-ba9a4b21d08d", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent/:consent_id", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent", + ":consent_id" + ], + "variable": [ + { + "key": "consent_id", + "value": "4cfccac1-673c-4fea-9b73-54b1a605c9a0" + } + ] + } + }, + "status": "Not Found", + "code": 404, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Thu, 27 Nov 2025 16:50:22 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "478" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "ece32b72-4d4a-43c9-b42a-e47b729e04da" + }, + { + "key": "x-amz-apigw-id", + "value": "UtkkIHJprPEFiYw=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-6928814d-5023dcb7c8009889ccde4f3d" + }, + { + "key": "X-Request-ID", + "value": "3ec49ee6-c56c-4df9-aa7a-f54bb6b3e795" + }, + { + "key": "X-Correlation-ID", + "value": "74eb5dd5-2d74-4b3a-a482-5480e1ad6464" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"issue\": [\n {\n \"code\": \"processing\",\n \"details\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\",\n \"code\": \"INVALIDATED_RESOURCE\",\n \"display\": \"Resource that has been marked as invalid was requested - invalid resources cannot be retrieved\"\n }\n ]\n },\n \"diagnostics\": \"Resource that has been marked as invalid was requested - invalid resources cannot be retrieved\",\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" + } + ] + }, + { + "name": "Missing consent id value - Get proxy role", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "" + ], + "type": "text/javascript", + "packages": {}, + "requests": {} + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent/", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent", + "" + ] + }, + "description": "## Example scenario\n\n**Given** a proxy role exists between a performer and a patient in the National Proxy Store \n**When** a GET /Consent/{id} request is sent with the ID value missing \n**Then** a 400 error is returned with details including 'Required parameter(s) are missing.'" + }, + "response": [ + { + "name": "Missing consent id value error returned", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "7c50dc2d-fc25-4bed-8ce8-d58b4811f58c", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "210ede12-efec-4195-b2cd-1a04d1827a81", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent/", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent", + "" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Thu, 27 Nov 2025 16:51:00 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "417" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "c4a3d99b-0ea1-40de-82bf-5cd2fa60afd6" + }, + { + "key": "x-amz-apigw-id", + "value": "UtkqLGF_rPEFcMw=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-69288173-c5d997b9110a61bf7b655fe7" + }, + { + "key": "X-Request-ID", + "value": "de0e2e5b-1f1b-4448-a7ee-42d0236b88a6" + }, + { + "key": "X-Correlation-ID", + "value": "6f458de2-64c6-4764-9044-34a5617d3d43" + }, + { + "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_IDENTIFIER_VALUE\",\n \"display\": \"Required parameter(s) are missing.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"Invalid request with error - performer:identifier or patient:identifier parameter not found.\",\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" + } + ] + } + ], + "description": "## Allowed auth methods\n\n- NHS Login token - Auth with test user `9730675929`\n \n- CIS2 token - Auth with test user `656005750108`\n \n\nSee collection level documentation for info about how to get authorization tokens.", + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{cis2_token}}", + "type": "string" + } + ] + }, + "event": [ + { + "listen": "prerequest", + "script": { + "type": "text/javascript", + "packages": {}, + "requests": {}, + "exec": [ + "" + ] + } + }, + { + "listen": "test", + "script": { + "type": "text/javascript", + "packages": {}, + "requests": {}, + "exec": [ + "" + ] + } + } + ] + }, + { + "name": "Create a new access request (POST /QuestionnaireResponse)", + "item": [ + { + "name": "Valid request - Proxy applicant - New adult to adult access request", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/fhir+json", + "type": "text" + }, + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Use-National-Proxy-Store", + "value": "False", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"resourceType\": \"QuestionnaireResponse\",\n \"status\": \"completed\",\n \"authored\": \"{{$isoTimestamp}}\",\n \"source\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9730675929\"\n }\n },\n \"subject\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898202\"\n }\n },\n \"questionnaire\": \"Questionnaire/{{$randomUUID}}\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson\",\n \"text\": \"relatedPerson\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_identifier\",\n \"text\": \"NHS Number\",\n \"answer\": [\n {\n \"valueString\": \"9730675929\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name\",\n \"text\": \"relatedPerson_name\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_name_first\",\n \"text\": \"First name.\",\n \"answer\": [\n {\n \"valueString\": \"Betty\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name_family\",\n \"text\": \"Family name (often called Surname).\",\n \"answer\": [\n {\n \"valueString\": \"MORLEY\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_birthDate\",\n \"text\": \"Date of Birth\",\n \"answer\": [\n {\n \"valueDate\": \"2005-01-20\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_basisForAccess\",\n \"text\": \"Basis For Access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_relationship\",\n \"text\": \"Relationship\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient\",\n \"text\": \"patient\",\n \"item\": [\n {\n \"linkId\": \"patient_identifier\",\n \"text\": \"NHS Number\",\n \"answer\": [\n {\n \"valueString\": \"9736898202\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name\",\n \"text\": \"patient_name\",\n \"item\": [\n {\n \"linkId\": \"patient_name_first\",\n \"text\": \"First name.\",\n \"answer\": [\n {\n \"valueString\": \"URIEL\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name_family\",\n \"text\": \"Family name (often called Surname).\",\n \"answer\": [\n {\n \"valueString\": \"ROTH\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient_birthDate\",\n \"text\": \"Date of Birth\",\n \"answer\": [\n {\n \"valueDate\": \"1988-11-10\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess\",\n \"text\": \"requestedAccess\",\n \"item\": [\n {\n \"linkId\": \"requestedAccess_accessLevel\",\n \"text\": \"Requested access level\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"APPT\",\n \"display\": \"Appointment Booking\"\n }\n },\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"VACC\",\n \"display\": \"Vaccination Records\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccess\",\n \"text\": \"Reason for access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-ReasonForAccess\",\n \"code\": \"COMB\",\n \"display\": \"Communication Barriers\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccessMoreinfo\",\n \"text\": \"Reason for access - further information\",\n \"answer\": [\n {\n \"valueString\": \"No internet connection\"\n }\n ]\n }\n ]\n }\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{api_base_url}}/QuestionnaireResponse", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "QuestionnaireResponse" + ] + }, + "description": "## Example scenario\n\n**Given** no proxy role exists between two adults \n**When** a valid access request is sent with the proxy as the applicant \n**Then** a 201 response is returned" + }, + "response": [ + { + "name": "A2A proxy applicant access request created", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/fhir+json", + "type": "text" + }, + { + "key": "X-Request-ID", + "value": "5ef96245-493a-468c-9936-06fb46e387af", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "15ace5c8-dc43-435f-baf8-3437b76ffdbf", + "type": "text" + }, + { + "key": "X-Use-National-Proxy-Store", + "value": "False", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"resourceType\": \"QuestionnaireResponse\",\n \"status\": \"completed\",\n \"authored\": \"2026-01-12T15:09:45.790Z\",\n \"source\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9730675929\"\n }\n },\n \"subject\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898202\"\n }\n },\n \"questionnaire\": \"Questionnaire/2e61ba16-f2ee-4e16-8526-194873d63f24\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson\",\n \"text\": \"relatedPerson\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_identifier\",\n \"text\": \"NHS Number\",\n \"answer\": [\n {\n \"valueString\": \"9730675929\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name\",\n \"text\": \"relatedPerson_name\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_name_first\",\n \"text\": \"First name.\",\n \"answer\": [\n {\n \"valueString\": \"Betty\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name_family\",\n \"text\": \"Family name (often called Surname).\",\n \"answer\": [\n {\n \"valueString\": \"MORLEY\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_birthDate\",\n \"text\": \"Date of Birth\",\n \"answer\": [\n {\n \"valueDate\": \"2005-01-20\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_basisForAccess\",\n \"text\": \"Basis For Access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_relationship\",\n \"text\": \"Relationship\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient\",\n \"text\": \"patient\",\n \"item\": [\n {\n \"linkId\": \"patient_identifier\",\n \"text\": \"NHS Number\",\n \"answer\": [\n {\n \"valueString\": \"9736898202\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name\",\n \"text\": \"patient_name\",\n \"item\": [\n {\n \"linkId\": \"patient_name_first\",\n \"text\": \"First name.\",\n \"answer\": [\n {\n \"valueString\": \"URIEL\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name_family\",\n \"text\": \"Family name (often called Surname).\",\n \"answer\": [\n {\n \"valueString\": \"ROTH\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient_birthDate\",\n \"text\": \"Date of Birth\",\n \"answer\": [\n {\n \"valueDate\": \"1988-11-10\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess\",\n \"text\": \"requestedAccess\",\n \"item\": [\n {\n \"linkId\": \"requestedAccess_accessLevel\",\n \"text\": \"Requested access level\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"APPT\",\n \"display\": \"Appointment Booking\"\n }\n },\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"VACC\",\n \"display\": \"Vaccination Records\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccess\",\n \"text\": \"Reason for access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-ReasonForAccess\",\n \"code\": \"COMB\",\n \"display\": \"Communication Barriers\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccessMoreinfo\",\n \"text\": \"Reason for access - further information\",\n \"answer\": [\n {\n \"valueString\": \"No internet connection\"\n }\n ]\n }\n ]\n }\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{api_base_url}}/QuestionnaireResponse", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "QuestionnaireResponse" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Mon, 01 Dec 2025 16:09:01 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "186" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "720499ae-68fe-495a-8485-862105f276a9" + }, + { + "key": "x-amz-apigw-id", + "value": "U6qQkGxVrPEFeoA=" + }, + { + "key": "location", + "value": "https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/QuestionnaireResponse/e185e5e3-901e-4b6a-bfe2-f9adb0b311a4" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-692dbd9c-999e6478f9613be345a68c77" + }, + { + "key": "X-Request-ID", + "value": "687bfc1b-b7a7-4681-a7bf-01ac6e7dd97a" + }, + { + "key": "X-Correlation-ID", + "value": "6adda3bb-aacf-4e4f-a459-a2a0fe6d34be" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"OperationOutcome\",\n \"issue\": [\n {\n \"severity\": \"information\",\n \"code\": \"informational\",\n \"details\": {\n \"coding\": [\n {\n \"code\": \"19C01XB6WC\",\n \"display\": \"19C01XB6WC\"\n }\n ]\n }\n }\n ]\n}" + } + ] + }, + { + "name": "Valid request - Patient applicant - New adult to adult access request", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/fhir+json", + "type": "text" + }, + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Use-National-Proxy-Store", + "value": "False", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"resourceType\": \"QuestionnaireResponse\",\n \"status\": \"completed\",\n \"authored\": \"{{$isoTimestamp}}\",\n \"source\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9730675929\"\n }\n },\n \"subject\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9730675929\"\n }\n },\n \"questionnaire\": \"Questionnaire/{{$randomUUID}}\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson\",\n \"text\": \"relatedPerson\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_identifier\",\n \"text\": \"NHS Number\",\n \"answer\": [\n {\n \"valueString\": \"9736898164\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name\",\n \"text\": \"relatedPerson_name\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_name_first\",\n \"text\": \"First name.\",\n \"answer\": [\n {\n \"valueString\": \"Heidi\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name_family\",\n \"text\": \"Family name (often called Surname).\",\n \"answer\": [\n {\n \"valueString\": \"LAW\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_birthDate\",\n \"text\": \"Date of Birth\",\n \"answer\": [\n {\n \"valueDate\": \"1997-09-15\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_basisForAccess\",\n \"text\": \"Basis For Access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_relationship\",\n \"text\": \"Relationship\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient\",\n \"text\": \"patient\",\n \"item\": [\n {\n \"linkId\": \"patient_identifier\",\n \"text\": \"NHS Number\",\n \"answer\": [\n {\n \"valueString\": \"9730675929\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name\",\n \"text\": \"patient_name\",\n \"item\": [\n {\n \"linkId\": \"patient_name_first\",\n \"text\": \"First name.\",\n \"answer\": [\n {\n \"valueString\": \"Betty\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name_family\",\n \"text\": \"Family name (often called Surname).\",\n \"answer\": [\n {\n \"valueString\": \"MORLEY\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient_birthDate\",\n \"text\": \"Date of Birth\",\n \"answer\": [\n {\n \"valueDate\": \"2005-01-20\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess\",\n \"text\": \"requestedAccess\",\n \"item\": [\n {\n \"linkId\": \"requestedAccess_accessLevel\",\n \"text\": \"Requested access level\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"APPT\",\n \"display\": \"Appointment Booking\"\n }\n },\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"VACC\",\n \"display\": \"Vaccination Records\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccess\",\n \"text\": \"Reason for access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-ReasonForAccess\",\n \"code\": \"COMB\",\n \"display\": \"Communication Barriers\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccessMoreinfo\",\n \"text\": \"Reason for access - further information\",\n \"answer\": [\n {\n \"valueString\": \"No internet connection\"\n }\n ]\n }\n ]\n }\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{api_base_url}}/QuestionnaireResponse", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "QuestionnaireResponse" + ] + }, + "description": "## Example scenario\n\n**Given** no proxy role exists between two adults \n**When** a valid access request is sent with the patient as the applicant \n**Then** a 201 response is returned" + }, + "response": [ + { + "name": "A2A patient applicant access request created", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/fhir+json", + "type": "text" + }, + { + "key": "X-Request-ID", + "value": "8af428cd-7e1e-4ed3-b127-0b751d6ae98d", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "e5cc0a6d-ea0d-433b-9307-30c988926969", + "type": "text" + }, + { + "key": "X-Use-National-Proxy-Store", + "value": "False", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"resourceType\": \"QuestionnaireResponse\",\n \"status\": \"completed\",\n \"authored\": \"2026-01-12T15:09:46.233Z\",\n \"source\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9730675929\"\n }\n },\n \"subject\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9730675929\"\n }\n },\n \"questionnaire\": \"Questionnaire/aa952e3f-3657-4ec3-bec0-25d881ed2e20\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson\",\n \"text\": \"relatedPerson\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_identifier\",\n \"text\": \"NHS Number\",\n \"answer\": [\n {\n \"valueString\": \"9736898164\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name\",\n \"text\": \"relatedPerson_name\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_name_first\",\n \"text\": \"First name.\",\n \"answer\": [\n {\n \"valueString\": \"Heidi\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name_family\",\n \"text\": \"Family name (often called Surname).\",\n \"answer\": [\n {\n \"valueString\": \"LAW\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_birthDate\",\n \"text\": \"Date of Birth\",\n \"answer\": [\n {\n \"valueDate\": \"1997-09-15\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_basisForAccess\",\n \"text\": \"Basis For Access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_relationship\",\n \"text\": \"Relationship\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient\",\n \"text\": \"patient\",\n \"item\": [\n {\n \"linkId\": \"patient_identifier\",\n \"text\": \"NHS Number\",\n \"answer\": [\n {\n \"valueString\": \"9730675929\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name\",\n \"text\": \"patient_name\",\n \"item\": [\n {\n \"linkId\": \"patient_name_first\",\n \"text\": \"First name.\",\n \"answer\": [\n {\n \"valueString\": \"Betty\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name_family\",\n \"text\": \"Family name (often called Surname).\",\n \"answer\": [\n {\n \"valueString\": \"MORLEY\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient_birthDate\",\n \"text\": \"Date of Birth\",\n \"answer\": [\n {\n \"valueDate\": \"2005-01-20\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess\",\n \"text\": \"requestedAccess\",\n \"item\": [\n {\n \"linkId\": \"requestedAccess_accessLevel\",\n \"text\": \"Requested access level\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"APPT\",\n \"display\": \"Appointment Booking\"\n }\n },\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"VACC\",\n \"display\": \"Vaccination Records\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccess\",\n \"text\": \"Reason for access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-ReasonForAccess\",\n \"code\": \"COMB\",\n \"display\": \"Communication Barriers\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccessMoreinfo\",\n \"text\": \"Reason for access - further information\",\n \"answer\": [\n {\n \"valueString\": \"No internet connection\"\n }\n ]\n }\n ]\n }\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{api_base_url}}/QuestionnaireResponse", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "QuestionnaireResponse" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Mon, 01 Dec 2025 16:10:22 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "186" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "d15e2ba0-3698-4fcf-80fe-d73279dd89a8" + }, + { + "key": "x-amz-apigw-id", + "value": "U6qdWHFfLPEFoUA=" + }, + { + "key": "location", + "value": "https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/QuestionnaireResponse/bdbba534-6e11-4491-aa3a-1631b0009628" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-692dbdee-08b18875f6f85ab2a7353bd4" + }, + { + "key": "X-Request-ID", + "value": "82cb14a5-09d0-41d4-8f73-2936794c32de" + }, + { + "key": "X-Correlation-ID", + "value": "73873b5d-1e2e-4a42-9dc3-83f1292f944b" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"OperationOutcome\",\n \"issue\": [\n {\n \"severity\": \"information\",\n \"code\": \"informational\",\n \"details\": {\n \"coding\": [\n {\n \"code\": \"19C0177GRI\",\n \"display\": \"19C0177GRI\"\n }\n ]\n }\n }\n ]\n}" + } + ] + }, + { + "name": "Valid request - New adult to child access request", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/fhir+json", + "type": "text" + }, + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Use-National-Proxy-Store", + "value": "False", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"resourceType\": \"QuestionnaireResponse\",\n \"status\": \"completed\",\n \"authored\": \"{{$isoTimestamp}}\",\n \"source\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9730675929\"\n }\n },\n \"subject\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898245\"\n }\n },\n \"questionnaire\": \"Questionnaire/01dc6813-3421-4d14-948d-a4888241add1\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson\",\n \"text\": \"relatedPerson\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_identifier\",\n \"text\": \"NHS Number\",\n \"answer\": [\n {\n \"valueString\": \"9730675929\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name\",\n \"text\": \"relatedPerson_name\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_name_first\",\n \"text\": \"First name.\",\n \"answer\": [\n {\n \"valueString\": \"Betty\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name_family\",\n \"text\": \"Family name (often called Surname).\",\n \"answer\": [\n {\n \"valueString\": \"MORLEY\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_birthDate\",\n \"text\": \"Date of Birth\",\n \"answer\": [\n {\n \"valueDate\": \"2005-01-20\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_basisForAccess\",\n \"text\": \"Basis For Access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_relationship\",\n \"text\": \"Relationship\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails\",\n \"text\": \"parentalApplicationSupplementaryDetails\",\n \"item\": [\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_evidenceOfResponsibility\",\n \"text\": \"Evidence of parental responsibility\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-EvidenceOfResponsibility\",\n \"code\": \"BRTH\",\n \"display\": \"Birth certificate\"\n }\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_evidenceOfResponsibilityMoreinfo\",\n \"text\": \"Evidence of responsibility - Further Information\",\n \"answer\": [\n {\n \"valueString\": \"Birth Certificate is original\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_isCurrentAddressConfirmed\",\n \"text\": \"Is current address confirmed?\",\n \"answer\": [\n {\n \"valueString\": \"Yes\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_newAddress\",\n \"text\": \"parentalApplicationSupplementaryDetails_newAddress\",\n \"item\": [\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_line1\",\n \"text\": \"Address Line 1\",\n \"answer\": [\n {\n \"valueString\": \"101 MESSINGHAM ROAD\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_line2\",\n \"text\": \"Address Line 2\",\n \"answer\": [\n {\n \"valueString\": \"\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_line3\",\n \"text\": \"Address Line 3\",\n \"answer\": [\n {\n \"valueString\": \"\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_city\",\n \"text\": \"Town / City\",\n \"answer\": [\n {\n \"valueString\": \"SCUNTHORPE\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_district\",\n \"text\": \"County\",\n \"answer\": [\n {\n \"valueString\": \"S HUMBERSIDE\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_postalCode\",\n \"text\": \"Postcode\",\n \"answer\": [\n {\n \"valueString\": \"DN17 2LN\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_liveAtSameAddress\",\n \"text\": \"Do the adult and child live at the same address?\",\n \"answer\": [\n {\n \"valueString\": \"Yes\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_canChildConsent\",\n \"text\": \"Can the child consent?\",\n \"answer\": [\n {\n \"valueString\": \"No\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_reasonNoChildConsent\",\n \"text\": \"Reason the child cannot consent\",\n \"answer\": [\n {\n \"valueString\": \"Child is too young\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient\",\n \"text\": \"patient\",\n \"item\": [\n {\n \"linkId\": \"patient_identifier\",\n \"text\": \"NHS Number\",\n \"answer\": [\n {\n \"valueString\": \"9736898245\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name\",\n \"text\": \"patient_name\",\n \"item\": [\n {\n \"linkId\": \"patient_name_first\",\n \"text\": \"First name.\",\n \"answer\": [\n {\n \"valueString\": \"Amber\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name_family\",\n \"text\": \"Family name (often called Surname).\",\n \"answer\": [\n {\n \"valueString\": \"TUCKER\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient_birthDate\",\n \"text\": \"Date of Birth\",\n \"answer\": [\n {\n \"valueDate\": \"2017-06-09\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess\",\n \"text\": \"requestedAccess\",\n \"item\": [\n {\n \"linkId\": \"requestedAccess_accessLevel\",\n \"text\": \"Requested access level\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"APPT\",\n \"display\": \"Appointment Booking\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccess\",\n \"text\": \"Reason for access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-ReasonForAccess\",\n \"code\": \"COMB\",\n \"display\": \"Communication Barriers\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccessMoreinfo\",\n \"text\": \"Reason for access - further information\",\n \"answer\": [\n {\n \"valueString\": \"No internet connection\"\n }\n ]\n }\n ]\n }\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{api_base_url}}/QuestionnaireResponse", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "QuestionnaireResponse" + ] + }, + "description": "## Example scenario\n\n**Given** no proxy role exists between an adult and child \n**When** a valid access request is sent with the proxy as the applicant \n**Then** a 201 response is returned" + }, + "response": [ + { + "name": "A2C access request created", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/fhir+json", + "type": "text" + }, + { + "key": "X-Request-ID", + "value": "d6f3b8fe-0041-4c34-aeb4-eac71020170d", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "46efa85e-d5c4-403b-a38a-1945f33bac2c", + "type": "text" + }, + { + "key": "X-Use-National-Proxy-Store", + "value": "False", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"resourceType\": \"QuestionnaireResponse\",\n \"status\": \"completed\",\n \"authored\": \"2026-01-12T15:09:46.453Z\",\n \"source\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9730675929\"\n }\n },\n \"subject\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898245\"\n }\n },\n \"questionnaire\": \"Questionnaire/01dc6813-3421-4d14-948d-a4888241add1\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson\",\n \"text\": \"relatedPerson\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_identifier\",\n \"text\": \"NHS Number\",\n \"answer\": [\n {\n \"valueString\": \"9730675929\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name\",\n \"text\": \"relatedPerson_name\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_name_first\",\n \"text\": \"First name.\",\n \"answer\": [\n {\n \"valueString\": \"Betty\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name_family\",\n \"text\": \"Family name (often called Surname).\",\n \"answer\": [\n {\n \"valueString\": \"MORLEY\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_birthDate\",\n \"text\": \"Date of Birth\",\n \"answer\": [\n {\n \"valueDate\": \"2005-01-20\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_basisForAccess\",\n \"text\": \"Basis For Access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_relationship\",\n \"text\": \"Relationship\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails\",\n \"text\": \"parentalApplicationSupplementaryDetails\",\n \"item\": [\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_evidenceOfResponsibility\",\n \"text\": \"Evidence of parental responsibility\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-EvidenceOfResponsibility\",\n \"code\": \"BRTH\",\n \"display\": \"Birth certificate\"\n }\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_evidenceOfResponsibilityMoreinfo\",\n \"text\": \"Evidence of responsibility - Further Information\",\n \"answer\": [\n {\n \"valueString\": \"Birth Certificate is original\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_isCurrentAddressConfirmed\",\n \"text\": \"Is current address confirmed?\",\n \"answer\": [\n {\n \"valueString\": \"Yes\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_newAddress\",\n \"text\": \"parentalApplicationSupplementaryDetails_newAddress\",\n \"item\": [\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_line1\",\n \"text\": \"Address Line 1\",\n \"answer\": [\n {\n \"valueString\": \"101 MESSINGHAM ROAD\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_line2\",\n \"text\": \"Address Line 2\",\n \"answer\": [\n {\n \"valueString\": \"\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_line3\",\n \"text\": \"Address Line 3\",\n \"answer\": [\n {\n \"valueString\": \"\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_city\",\n \"text\": \"Town / City\",\n \"answer\": [\n {\n \"valueString\": \"SCUNTHORPE\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_district\",\n \"text\": \"County\",\n \"answer\": [\n {\n \"valueString\": \"S HUMBERSIDE\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_postalCode\",\n \"text\": \"Postcode\",\n \"answer\": [\n {\n \"valueString\": \"DN17 2LN\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_liveAtSameAddress\",\n \"text\": \"Do the adult and child live at the same address?\",\n \"answer\": [\n {\n \"valueString\": \"Yes\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_canChildConsent\",\n \"text\": \"Can the child consent?\",\n \"answer\": [\n {\n \"valueString\": \"No\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_reasonNoChildConsent\",\n \"text\": \"Reason the child cannot consent\",\n \"answer\": [\n {\n \"valueString\": \"Child is too young\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient\",\n \"text\": \"patient\",\n \"item\": [\n {\n \"linkId\": \"patient_identifier\",\n \"text\": \"NHS Number\",\n \"answer\": [\n {\n \"valueString\": \"9736898245\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name\",\n \"text\": \"patient_name\",\n \"item\": [\n {\n \"linkId\": \"patient_name_first\",\n \"text\": \"First name.\",\n \"answer\": [\n {\n \"valueString\": \"Amber\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name_family\",\n \"text\": \"Family name (often called Surname).\",\n \"answer\": [\n {\n \"valueString\": \"TUCKER\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient_birthDate\",\n \"text\": \"Date of Birth\",\n \"answer\": [\n {\n \"valueDate\": \"2017-06-09\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess\",\n \"text\": \"requestedAccess\",\n \"item\": [\n {\n \"linkId\": \"requestedAccess_accessLevel\",\n \"text\": \"Requested access level\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"APPT\",\n \"display\": \"Appointment Booking\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccess\",\n \"text\": \"Reason for access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-ReasonForAccess\",\n \"code\": \"COMB\",\n \"display\": \"Communication Barriers\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccessMoreinfo\",\n \"text\": \"Reason for access - further information\",\n \"answer\": [\n {\n \"valueString\": \"No internet connection\"\n }\n ]\n }\n ]\n }\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{api_base_url}}/QuestionnaireResponse", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "QuestionnaireResponse" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Mon, 01 Dec 2025 16:11:33 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "186" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "4eba2237-3c13-4bab-afb1-1261b5ac6a19" + }, + { + "key": "x-amz-apigw-id", + "value": "U6qoVF-JLPEFXqQ=" + }, + { + "key": "location", + "value": "https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/QuestionnaireResponse/29a7f71a-2554-4e53-87de-07553d40d5ec" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-692dbe34-f306ba0e1a55aba127add964" + }, + { + "key": "X-Request-ID", + "value": "848e592d-a42e-4fee-b529-8ac484fd459c" + }, + { + "key": "X-Correlation-ID", + "value": "73de9aa5-5951-4d30-8f2d-e64482fb1990" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"OperationOutcome\",\n \"issue\": [\n {\n \"severity\": \"information\",\n \"code\": \"informational\",\n \"details\": {\n \"coding\": [\n {\n \"code\": \"19C01N8Q37\",\n \"display\": \"19C01N8Q37\"\n }\n ]\n }\n }\n ]\n}" + }, + { + "name": "A2C access request created - Verified relationship", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/fhir+json", + "type": "text" + }, + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Use-National-Proxy-Store", + "value": "False", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"resourceType\": \"QuestionnaireResponse\",\n \"status\": \"completed\",\n \"authored\": \"{{$isoTimestamp}}\",\n \"source\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9730675929\"\n }\n },\n \"subject\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9730675422\"\n }\n },\n \"questionnaire\": \"Questionnaire/01dc6813-3421-4d14-948d-a4888241add1\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson\",\n \"text\": \"relatedPerson\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_identifier\",\n \"text\": \"NHS Number\",\n \"answer\": [\n {\n \"valueString\": \"9730675929\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name\",\n \"text\": \"relatedPerson_name\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_name_first\",\n \"text\": \"First name.\",\n \"answer\": [\n {\n \"valueString\": \"Betty\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name_family\",\n \"text\": \"Family name (often called Surname).\",\n \"answer\": [\n {\n \"valueString\": \"MORLEY\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_birthDate\",\n \"text\": \"Date of Birth\",\n \"answer\": [\n {\n \"valueDate\": \"2005-01-20\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_basisForAccess\",\n \"text\": \"Basis For Access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_relationship\",\n \"text\": \"Relationship\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails\",\n \"text\": \"parentalApplicationSupplementaryDetails\",\n \"item\": [\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_evidenceOfResponsibility\",\n \"text\": \"Evidence of parental responsibility\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-EvidenceOfResponsibility\",\n \"code\": \"BRTH\",\n \"display\": \"Birth certificate\"\n }\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_evidenceOfResponsibilityMoreinfo\",\n \"text\": \"Evidence of responsibility - Further Information\",\n \"answer\": [\n {\n \"valueString\": \"Birth Certificate is original\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_isCurrentAddressConfirmed\",\n \"text\": \"Is current address confirmed?\",\n \"answer\": [\n {\n \"valueString\": \"Yes\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_newAddress\",\n \"text\": \"parentalApplicationSupplementaryDetails_newAddress\",\n \"item\": [\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_line1\",\n \"text\": \"Address Line 1\",\n \"answer\": [\n {\n \"valueString\": \"101 MESSINGHAM ROAD\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_line2\",\n \"text\": \"Address Line 2\",\n \"answer\": [\n {\n \"valueString\": \"\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_line3\",\n \"text\": \"Address Line 3\",\n \"answer\": [\n {\n \"valueString\": \"\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_city\",\n \"text\": \"Town / City\",\n \"answer\": [\n {\n \"valueString\": \"SCUNTHORPE\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_district\",\n \"text\": \"County\",\n \"answer\": [\n {\n \"valueString\": \"S HUMBERSIDE\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_postalCode\",\n \"text\": \"Postcode\",\n \"answer\": [\n {\n \"valueString\": \"DN17 2LN\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_liveAtSameAddress\",\n \"text\": \"Do the adult and child live at the same address?\",\n \"answer\": [\n {\n \"valueString\": \"Yes\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_canChildConsent\",\n \"text\": \"Can the child consent?\",\n \"answer\": [\n {\n \"valueString\": \"No\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_reasonNoChildConsent\",\n \"text\": \"Reason the child cannot consent\",\n \"answer\": [\n {\n \"valueString\": \"Child is too young\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient\",\n \"text\": \"patient\",\n \"item\": [\n {\n \"linkId\": \"patient_identifier\",\n \"text\": \"NHS Number\",\n \"answer\": [\n {\n \"valueString\": \"9730675422\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name\",\n \"text\": \"patient_name\",\n \"item\": [\n {\n \"linkId\": \"patient_name_first\",\n \"text\": \"First name.\",\n \"answer\": [\n {\n \"valueString\": \"Rowena\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name_family\",\n \"text\": \"Family name (often called Surname).\",\n \"answer\": [\n {\n \"valueString\": \"HIRST\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient_birthDate\",\n \"text\": \"Date of Birth\",\n \"answer\": [\n {\n \"valueDate\": \"2015-08-09\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess\",\n \"text\": \"requestedAccess\",\n \"item\": [\n {\n \"linkId\": \"requestedAccess_accessLevel\",\n \"text\": \"Requested access level\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"APPT\",\n \"display\": \"Appointment Booking\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccess\",\n \"text\": \"Reason for access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-ReasonForAccess\",\n \"code\": \"COMB\",\n \"display\": \"Communication Barriers\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccessMoreinfo\",\n \"text\": \"Reason for access - further information\",\n \"answer\": [\n {\n \"valueString\": \"No internet connection\"\n }\n ]\n }\n ]\n }\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{api_base_url}}/QuestionnaireResponse", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "QuestionnaireResponse" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Mon, 01 Dec 2025 16:11:33 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "186" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "4eba2237-3c13-4bab-afb1-1261b5ac6a19" + }, + { + "key": "x-amz-apigw-id", + "value": "U6qoVF-JLPEFXqQ=" + }, + { + "key": "location", + "value": "https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/QuestionnaireResponse/29a7f71a-2554-4e53-87de-07553d40d5ec" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-692dbe34-f306ba0e1a55aba127add964" + }, + { + "key": "X-Request-ID", + "value": "848e592d-a42e-4fee-b529-8ac484fd459c" + }, + { + "key": "X-Correlation-ID", + "value": "73de9aa5-5951-4d30-8f2d-e64482fb1990" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"OperationOutcome\",\n \"issue\": [\n {\n \"severity\": \"information\",\n \"code\": \"informational\",\n \"details\": {\n \"coding\": [\n {\n \"code\": \"19C01N8Q37\",\n \"display\": \"19C01N8Q37\"\n }\n ]\n }\n }\n ]\n}" + } + ] + }, + { + "name": "Invalid request body - New adult to adult access request", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/fhir+json", + "type": "text" + }, + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Use-National-Proxy-Store", + "value": "False", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{api_base_url}}/QuestionnaireResponse", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "QuestionnaireResponse" + ] + }, + "description": "## Example scenario\n\n**Given** no proxy role exists between two adults \n**When** a access request is sent with invalid body \n**Then** a 400 error response is returned with code 'INVALID_VALUE'" + }, + "response": [ + { + "name": "Invalid request body error response", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/fhir+json", + "type": "text" + }, + { + "key": "X-Request-ID", + "value": "94d7227f-f801-465f-b04c-8dd7494faf5f", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "7f829c8e-bec6-4cbe-8ed0-d71bf981095b", + "type": "text" + }, + { + "key": "X-Use-National-Proxy-Store", + "value": "False", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{api_base_url}}/QuestionnaireResponse", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "QuestionnaireResponse" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Mon, 01 Dec 2025 16:13:37 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "377" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "28073546-4513-47c5-9d2e-17caeb920a78" + }, + { + "key": "x-amz-apigw-id", + "value": "U6q7zHXFLPEF3Bg=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-692dbeb1-7dd1e1125d0b5422386cffe9" + }, + { + "key": "X-Request-ID", + "value": "d82f5db5-1c08-4251-a94b-50684ea1a06b" + }, + { + "key": "X-Correlation-ID", + "value": "7eeca365-bf2b-4859-9e2c-b5c7731bbe1b" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"issue\": [\n {\n \"code\": \"invalid\",\n \"details\": {\n \"coding\": [\n {\n \"code\": \"BAD_REQUEST\",\n \"display\": \"The request could not be processed.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"The supplied input is not a valid FHIR QuestionnaireResponse.\",\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" + } + ] + } + ], + "description": "## Allowed auth methods\n\n- NHS Login token - Auth with test user `9730675929`\n \n\nSee collection level documentation for info about how to get authorization tokens.", + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{login_token}}", + "type": "string" + } + ] + }, + "event": [ + { + "listen": "prerequest", + "script": { + "type": "text/javascript", + "packages": {}, + "requests": {}, + "exec": [ + "" + ] + } + }, + { + "listen": "test", + "script": { + "type": "text/javascript", + "packages": {}, + "requests": {}, + "exec": [ + "" + ] + } + } + ] + }, + { + "name": "Get access request (GET /QuestionnaireResponse/{id})", + "item": [ + { + "name": "Valid request - Get access request", + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/QuestionnaireResponse/:access_request_id", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "QuestionnaireResponse", + ":access_request_id" + ], + "variable": [ + { + "key": "access_request_id", + "value": "32a5cc78-eb64-4367-abea-cfdb6e9fa2e4" + } + ] + }, + "description": "## Example scenario\n\n**Given** a valid access request has been sent to VRS \n**When** a GET /QuestionnaireResponse/{id} request is sent with the access request UUID \n**Then** the access request is returned" + }, + "response": [] + }, + { + "name": "No access request found - Get access request", + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/QuestionnaireResponse/:access_request_id", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "QuestionnaireResponse", + ":access_request_id" + ], + "variable": [ + { + "key": "access_request_id", + "value": "32a5cc78-eb64-4367-abea-cfdb6e9fa2e4" + } + ] + }, + "description": "## Example scenario\n\n**Given** a valid access request has been sent to VRS \n**When** a GET /QuestionnaireResponse/{id} request is sent with a random UUID \n**Then** a 404 error is returned with message 'QUESTIONNAIRE_RESPONSE_NOT_FOUND'" + }, + "response": [ + { + "name": "No access request found error returned", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "074b07d8-104e-4574-abd7-bdc5181280da", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "f47a9a68-34a5-4a11-881b-8b45695f2e76", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/QuestionnaireResponse/:access_request_id", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "QuestionnaireResponse", + ":access_request_id" + ], + "variable": [ + { + "key": "access_request_id", + "value": "32a5cc78-eb64-4367-abea-cfdb6e9fa2e4" + } + ] + } + }, + "status": "Not Found", + "code": 404, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Mon, 01 Dec 2025 14:37:04 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "400" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "64959769-f136-4d27-9369-b4e01224c066" + }, + { + "key": "x-amz-apigw-id", + "value": "U6cyYE4brPEFXvw=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-692da80e-520fcf28565fe1ea77ceb7fc" + }, + { + "key": "X-Request-ID", + "value": "f6fe610a-d80b-4436-b727-67960c9687a1" + }, + { + "key": "X-Correlation-ID", + "value": "076421a4-1c56-43e4-95a9-6139434516a7" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"OperationOutcome\",\n \"issue\": [\n {\n \"severity\": \"error\",\n \"code\": \"not-found\",\n \"details\": {\n \"coding\": [\n {\n \"code\": \"QUESTIONNAIRE_RESPONSE_NOT_FOUND\",\n \"display\": \"Questionnaire response not found\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\"\n }\n ]\n },\n \"diagnostics\": \"The Questionnaire response could not be found using the provided access request ID.\"\n }\n ]\n}" + } + ] + }, + { + "name": "No access request UUID - Get access request", + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/QuestionnaireResponse/", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "QuestionnaireResponse", + "" + ] + }, + "description": "## Example scenario\n\n**Given** a valid access request has been sent to VRS \n**When** a GET /QuestionnaireResponse/{id} request is sent without a UUID \n**Then** a 400 error is returned with message 'METHOD_NOT_ALLOWED'" + }, + "response": [ + { + "name": "No access request UUID invalid response", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "6e763c1c-b24b-4ffe-8598-e2983ae5e3cf", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "87ed4d25-05d6-4ab6-985e-a254cdd26339", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/QuestionnaireResponse/", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "QuestionnaireResponse", + "" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Mon, 01 Dec 2025 15:15:37 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "370" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "42e98c18-f152-4e8f-8cd2-fc0ba2bcc590" + }, + { + "key": "x-amz-apigw-id", + "value": "U6ibrGjDrPEFgRQ=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-692db117-2a87f1ac0c50e6702fcbc5ce" + }, + { + "key": "X-Request-ID", + "value": "4270ae5f-3cc9-418e-a6f8-aab43372486a" + }, + { + "key": "X-Correlation-ID", + "value": "a23d9c20-bcf2-4e03-ba6b-092a703947f3" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"issue\": [\n {\n \"code\": \"not-supported\",\n \"details\": {\n \"coding\": [\n {\n \"code\": \"METHOD_NOT_ALLOWED\",\n \"display\": \"The method is not allowed.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"The method is not allowed for the requested resource.\",\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" + } + ] + }, + { + "name": "Invalid access request UUID - Get access request", + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/QuestionnaireResponse/invalid", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "QuestionnaireResponse", + "invalid" + ] + }, + "description": "## Example scenario\n\n**Given** a valid access request has been sent to VRS \n**When** a GET /QuestionnaireResponse/{id} request is sent with an invalid UUID \n**Then** a 400 error is returned with message 'INVALID_IDENTIFIER_VALUE'" + }, + "response": [ + { + "name": "Invalid access request UUID invalid response", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "30e863b4-b90b-439e-a757-06eadf3cae48", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "79bc7284-1f65-407a-bc5e-1e5bd8d0496b", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/QuestionnaireResponse/invalid", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "QuestionnaireResponse", + "invalid" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Mon, 01 Dec 2025 15:15:37 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "370" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "42e98c18-f152-4e8f-8cd2-fc0ba2bcc590" + }, + { + "key": "x-amz-apigw-id", + "value": "U6ibrGjDrPEFgRQ=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-692db117-2a87f1ac0c50e6702fcbc5ce" + }, + { + "key": "X-Request-ID", + "value": "4270ae5f-3cc9-418e-a6f8-aab43372486a" + }, + { + "key": "X-Correlation-ID", + "value": "a23d9c20-bcf2-4e03-ba6b-092a703947f3" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"OperationOutcome\",\n \"issue\": [\n {\n \"severity\": \"error\",\n \"code\": \"invalid\",\n \"details\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/STU3/CodeSystem/Spine-ErrorOrWarningCode-1\",\n \"code\": \"INVALID_IDENTIFIER_VALUE\",\n \"display\": \"Invalid identifier value\"\n }\n ]\n },\n \"diagnostics\": \"The specified access request ID is invalid. Access request IDs must be a valid UUID.\"\n }\n ]\n}" + } + ] + } + ], + "description": "## Allowed auth methods\n\n- CIS2 token - Auth with test user `656005750108`\n \n- NHS Login token - Auth with test user `9730675929`\n \n\nSee collection level documentation for info about how to get authorization tokens.", + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{cis2_token}}", + "type": "string" + } + ] + }, + "event": [ + { + "listen": "prerequest", + "script": { + "type": "text/javascript", + "packages": {}, + "requests": {}, + "exec": [ + "" + ] + } + }, + { + "listen": "test", + "script": { + "type": "text/javascript", + "packages": {}, + "requests": {}, + "exec": [ + "" + ] + } + } + ] + }, + { + "name": "Create a new proxy role (POST /Consent)", + "item": [ + { + "name": "Valid request - New proxy role", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{cis2_token}}", + "type": "string" + } + ] + }, + "method": "POST", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "Content-Type", + "value": "application/fhir+json", + "type": "text" + } + ], + "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 \t\"system\":\"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",\n \t\"code\":\"parental-responsibility\",\n \t\"display\":\"Parental responsibility\"\n }\n ]\n },\n \t\"reference\":{\"type\":\"RelatedPerson\",\"identifier\":{\"system\":\"https://fhir.nhs.uk/Id/nhs-number\",\"value\":\"9736898148\"}}\n }\n ]\n },\n \t\"extension\":[{\n\t\t\"url\":\"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n\t\t\"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" + } + } + }, + "url": { + "raw": "{{api_base_url}}/Consent", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ] + }, + "description": "## Important - duplicates\n\nWe cannot currently accept duplicate proxy role requests for testing purposes.\n\nThis may lead to you experiencing 409 errors on the 'valid request' scenarios if the same request has already been sent.\n\n## 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 \n**Then** a 201 success response is returned" + }, + "response": [ + { + "name": "Adult to child - New proxy role created", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "X-Request-ID", + "value": "df29a1cb-3861-4d7f-918d-3bcf6f5ef362", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "0b7ed233-3055-48ac-93ef-c71922ccc577", + "type": "text" + }, + { + "key": "Content-Type", + "value": "application/fhir+json", + "type": "text" + } + ], + "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", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{api_base_url}}/Consent", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Fri, 28 Nov 2025 15:14:39 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "101" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "bf6bc3d8-1829-4a81-9433-c0b1c21376d6" + }, + { + "key": "x-amz-apigw-id", + "value": "Uwpe7FCjrPEF5aQ=" + }, + { + "key": "location", + "value": "https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/4f15f399-d381-4949-a744-25f9cbfecfb3" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-6929bc5f-f6012c539553033b0859994a" + }, + { + "key": "X-Request-ID", + "value": "46baf4c8-5bb5-4a6e-9bd4-264452817dab" + }, + { + "key": "X-Correlation-ID", + "value": "65bdf903-1cb2-4722-a291-d5056c44e712" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"OperationOutcome\",\n \"issue\": [\n {\n \"severity\": \"information\",\n \"code\": \"informational\"\n }\n ]\n}" + }, + { + "name": "Adult to adult - New proxy role created", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "Content-Type", + "value": "application/fhir+json", + "type": "text" + } + ], + "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 \"performer\": [\n {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898164\"\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\": \"9736898164\"\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" + } + } + }, + "url": { + "raw": "{{api_base_url}}/Consent", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Fri, 28 Nov 2025 15:14:39 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "101" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "bf6bc3d8-1829-4a81-9433-c0b1c21376d6" + }, + { + "key": "x-amz-apigw-id", + "value": "Uwpe7FCjrPEF5aQ=" + }, + { + "key": "location", + "value": "https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/4f15f399-d381-4949-a744-25f9cbfecfb3" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-6929bc5f-f6012c539553033b0859994a" + }, + { + "key": "X-Request-ID", + "value": "46baf4c8-5bb5-4a6e-9bd4-264452817dab" + }, + { + "key": "X-Correlation-ID", + "value": "65bdf903-1cb2-4722-a291-d5056c44e712" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"OperationOutcome\",\n \"issue\": [\n {\n \"severity\": \"information\",\n \"code\": \"informational\"\n }\n ]\n}" + } + ] + }, + { + "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": {}, + "requests": {} + } + } + ], + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{cis2_token}}", + "type": "string" + } + ] + }, + "method": "POST", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "Content-Type", + "value": "application/fhir+json", + "type": "text" + } + ], + "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 \"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.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" + } + } + }, + "url": { + "raw": "{{api_base_url}}/Consent", + "host": [ + "{{api_base_url}}" + ], + "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 identifier value error returned", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "X-Request-ID", + "value": "fa822d40-196d-4112-8c87-b46631ba7463", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "13f1ba14-20e9-48c8-b1ef-7f2c34d9bab3", + "type": "text" + }, + { + "key": "Content-Type", + "value": "application/fhir+json", + "type": "text" + } + ], + "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}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{api_base_url}}/Consent", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ] + } + }, + "status": "Unprocessable Entity (WebDAV) (RFC 4918)", + "code": 422, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Fri, 28 Nov 2025 12:46:09 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "402" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "369c4598-e093-44d1-8d27-015c1e1f8a40" + }, + { + "key": "x-amz-apigw-id", + "value": "UwTu1FORLPEFh3Q=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-69299991-27f38de5fa687e1e7d4659b3" + }, + { + "key": "X-Request-ID", + "value": "70591ef1-fbe0-442b-bd9a-545fb5713859" + }, + { + "key": "X-Correlation-ID", + "value": "037cf36b-1014-4177-bcc6-c1cd647aae42" + }, + { + "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_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}" + } + ] + }, + { + "name": "Duplicate role - New proxy role", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{cis2_token}}", + "type": "string" + } + ] + }, + "method": "POST", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "Content-Type", + "value": "application/fhir+json", + "type": "text" + } + ], + "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", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{api_base_url}}/Consent", + "host": [ + "{{api_base_url}}" + ], + "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", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "X-Request-ID", + "value": "8616edc0-f04b-4d56-ac54-4c5dd8930d87", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "42cf4c55-e180-4b8f-abe3-60acd1780311", + "type": "text" + }, + { + "key": "Content-Type", + "value": "application/fhir+json", + "type": "text" + } + ], + "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", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{api_base_url}}/Consent", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ] + } + }, + "status": "Conflict", + "code": 409, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Fri, 28 Nov 2025 12:41:31 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "352" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "de65a534-5cee-45c1-845e-023e9ffab375" + }, + { + "key": "x-amz-apigw-id", + "value": "UwTC8H42LPEFggg=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-69299878-54ea0e3b7bd5d7e836eaea8f" + }, + { + "key": "X-Request-ID", + "value": "dd90c863-82e3-4ef8-9568-3e68a64de1e0" + }, + { + "key": "X-Correlation-ID", + "value": "b08cd6b6-96fc-410c-84a9-e52732fcbc09" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "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}" + } + ] + }, + { + "name": "Missing scope - New proxy role", + "request": { + "method": "POST", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "Content-Type", + "value": "application/fhir+json", + "type": "text" + } + ], + "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}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{api_base_url}}/Consent", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ] + } + }, + "response": [ + { + "name": "Missing scope error returned", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "X-Request-ID", + "value": "2aa3293e-ad0e-4389-a466-d3209ebbfa4e", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "425ca0da-e10c-4010-86b4-93ca9bf737eb", + "type": "text" + }, + { + "key": "Content-Type", + "value": "application/fhir+json", + "type": "text" + } + ], + "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}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{api_base_url}}/Consent", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Fri, 28 Nov 2025 15:18:49 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "353" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "75bfd563-8f97-4b8a-8d50-a08643917d89" + }, + { + "key": "x-amz-apigw-id", + "value": "UwqGBE7MLPEFySQ=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-6929bd59-918cef993de61bcebe339d3e" + }, + { + "key": "X-Request-ID", + "value": "2ca06d13-2568-4f70-b06c-077af0f57137" + }, + { + "key": "X-Correlation-ID", + "value": "8c8ffb79-cc4c-4cb0-a62e-31dc1310a387" + }, + { + "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_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": "Invalid status - New proxy role", + "request": { + "method": "POST", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "Content-Type", + "value": "application/fhir+json", + "type": "text" + } + ], + "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}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{api_base_url}}/Consent", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ] + } + }, + "response": [ + { + "name": "Invalid status - New proxy role", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "X-Request-ID", + "value": "1e0a0136-6025-4190-8450-5676ada97c3c", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "bc404ec3-52fa-465c-9401-2b70484989bc", + "type": "text" + }, + { + "key": "Content-Type", + "value": "application/fhir+json", + "type": "text" + } + ], + "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}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{api_base_url}}/Consent", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ] + } + }, + "status": "Unprocessable Entity (WebDAV) (RFC 4918)", + "code": 422, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Fri, 28 Nov 2025 15:27:32 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "339" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "47dd1183-4b49-44f1-a524-79fe459589a9" + }, + { + "key": "x-amz-apigw-id", + "value": "UwrXkFOZrPEF1ZA=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-6929bf63-31132bda7b3f654ea3534f15" + }, + { + "key": "X-Request-ID", + "value": "e23fbdd1-027c-4281-b37d-094691df9fc7" + }, + { + "key": "X-Correlation-ID", + "value": "226277b1-9d7c-411a-b3fd-3a4a70a4d90e" + }, + { + "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_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": "Missing free text for Other", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "" + ], + "type": "text/javascript", + "packages": {}, + "requests": {} + } + } + ], + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{cis2_token}}", + "type": "string" + } + ] + }, + "method": "POST", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "Content-Type", + "value": "application/fhir+json", + "type": "text" + } + ], + "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", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{api_base_url}}/Consent", + "host": [ + "{{api_base_url}}" + ], + "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": "Missing free text code error returned", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "Content-Type", + "value": "application/fhir+json", + "type": "text" + } + ], + "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", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{api_base_url}}/Consent", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ] + } + }, + "status": "Unprocessable Entity (WebDAV) (RFC 4918)", + "code": 422, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Fri, 28 Nov 2025 12:46:09 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "402" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "369c4598-e093-44d1-8d27-015c1e1f8a40" + }, + { + "key": "x-amz-apigw-id", + "value": "UwTu1FORLPEFh3Q=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-69299991-27f38de5fa687e1e7d4659b3" + }, + { + "key": "X-Request-ID", + "value": "70591ef1-fbe0-442b-bd9a-545fb5713859" + }, + { + "key": "X-Correlation-ID", + "value": "037cf36b-1014-4177-bcc6-c1cd647aae42" + }, + { + "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_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": "Invalid identifer system - New proxy role", + "request": { + "method": "POST", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "Content-Type", + "value": "application/fhir+json", + "type": "text" + } + ], + "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 \"performer\": [\n {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number/invalid\",\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" + } + } + }, + "url": { + "raw": "{{api_base_url}}/Consent", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ] + } + }, + "response": [ + { + "name": "Invalid status error returned", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "X-Request-ID", + "value": "004491e4-b270-4882-99c8-af4e387a505f", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "5f51e084-afd4-442b-b229-5470a750de52", + "type": "text" + }, + { + "key": "Content-Type", + "value": "application/fhir+json", + "type": "text" + } + ], + "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 \"performer\": [\n {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number/invalid\",\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" + } + } + }, + "url": { + "raw": "{{api_base_url}}/Consent", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ] + } + }, + "status": "Unprocessable Entity (WebDAV) (RFC 4918)", + "code": 422, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Fri, 28 Nov 2025 15:29:32 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "399" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "9ca19fe7-0a06-4da0-9b72-9e6135da40f1" + }, + { + "key": "x-amz-apigw-id", + "value": "UwrqcGPaLPEFWkg=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-6929bfdc-4e9f2ada8f5faf65f1630c1c" + }, + { + "key": "X-Request-ID", + "value": "21cc43ac-e531-477d-bc97-3e77e9657b52" + }, + { + "key": "X-Correlation-ID", + "value": "aeeaa71d-0a78-4e83-8c81-3b2884371ae9" + }, + { + "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_IDENTIFIER_SYSTEM\",\n \"display\": \"Invalid identifier system.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"Patient identifier system is invalid\",\n \"expression\": [\n \"patient.identifier.system\"\n ],\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" + } + ] + } + ], + "description": "## Allowed auth methods\n\n- CIS2 token - Auth with test user `656005750108`\n \n\nSee collection level documentation for info about how to get authorization tokens.", + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{cis2_token}}", + "type": "string" + } + ] + }, + "event": [ + { + "listen": "prerequest", + "script": { + "type": "text/javascript", + "packages": {}, + "requests": {}, + "exec": [ + "" + ] + } + }, + { + "listen": "test", + "script": { + "type": "text/javascript", + "packages": {}, + "requests": {}, + "exec": [ + "" + ] + } + } + ] + }, + { + "name": "Update proxy role (PATCH /Consent/{id})", + "item": [ + { + "name": "Valid request - Single update - Update proxy role", + "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 {\"op\": \"replace\", \"path\": \"/status\", \"value\": \"inactive\"},\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]\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": "Proxy role updated to 'inactive' status", + "originalRequest": { + "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 {\"op\": \"replace\", \"path\": \"/status\", \"value\": \"inactive\"},\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" + } + } + }, + "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" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Fri, 28 Nov 2025 16:23:31 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "101" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "5b03d759-c55a-462d-ba3c-e2dbf92d031a" + }, + { + "key": "x-amz-apigw-id", + "value": "UwzkUE0urPEFqHg=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-6929cc81-0d146fcdbc79baf5a5279c3d" + }, + { + "key": "X-Request-ID", + "value": "4555113e-aa4d-409d-bac0-41b0ed91cfc2" + }, + { + "key": "X-Correlation-ID", + "value": "b8c69a60-667d-4b0f-89c7-9de6d4e289a4" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"OperationOutcome\",\n \"issue\": [\n {\n \"severity\": \"information\",\n \"code\": \"informational\"\n }\n ]\n}" + }, + { + "name": "Proxy role end date updated", + "originalRequest": { + "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\": \"/provision/period/end\",\n \"value\": \"2026-12-31\"\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" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Date", + "value": "Thu, 04 Dec 2025 15:48:46 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "101" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "eb0a2130-76e5-41a0-9916-e7c8aa25a4ea" + }, + { + "key": "x-amz-apigw-id", + "value": "VEgG2Hh6LPEFXRQ=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-6931ad5e-d4506ade6d4f3410b20618b9" + }, + { + "key": "X-Request-ID", + "value": "90a9a964-db4c-4ec7-9498-76087f979bb5" + }, + { + "key": "X-Correlation-ID", + "value": "2aa6936b-c5ba-437d-898e-c58794601a01" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"OperationOutcome\",\n \"issue\": [\n {\n \"severity\": \"information\",\n \"code\": \"informational\"\n }\n ]\n}" + }, + { + "name": "Proxy role legal basis updated", + "originalRequest": { + "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\": \"/provision/actor\",\n \"value\": [\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]", + "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" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Date", + "value": "Thu, 04 Dec 2025 15:54:54 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "101" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "63072889-896c-43b1-aff1-0e4eceb2b4d4" + }, + { + "key": "x-amz-apigw-id", + "value": "VEg_9FQxLPEF1mA=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-6931aecc-d571f76cb8f3900088a01c45" + }, + { + "key": "X-Request-ID", + "value": "e436ebda-5011-431a-9de3-1d0749c6f45e" + }, + { + "key": "X-Correlation-ID", + "value": "930a58a1-7ca9-4a89-ac33-a24f5277b1d9" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"OperationOutcome\",\n \"issue\": [\n {\n \"severity\": \"information\",\n \"code\": \"informational\"\n }\n ]\n}" + } + ] + }, + { + "name": "Valid request - Multiple updates - Update proxy role", + "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 {\"op\": \"replace\", \"path\": \"/status\", \"value\": \"inactive\"},\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 {\n \"op\": \"replace\",\n \"path\": \"/provision/period/end\",\n \"value\": \"2026-12-31\"\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 with multiple updates for the proxy role \n**Then** a 200 response is returned and the role is updated" + }, + "response": [ + { + "name": "Proxy role status updated with end date", + "originalRequest": { + "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 {\"op\": \"replace\", \"path\": \"/status\", \"value\": \"inactive\"},\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 {\n \"op\": \"replace\",\n \"path\": \"/provision/period/end\",\n \"value\": \"2026-12-31\"\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" + } + ] + } + }, + "status": "Not Found", + "code": 404, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Date", + "value": "Thu, 04 Dec 2025 15:56:16 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "348" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "fbb23fc6-d143-4ad4-ab95-fef1276bf7d0" + }, + { + "key": "x-amz-apigw-id", + "value": "VEhNJE2VrPEFXkA=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-6931af20-0cc7e03b708f8949fc05bdfa" + }, + { + "key": "X-Request-ID", + "value": "0aa389b6-9542-428f-9e1c-b5411ff0a531" + }, + { + "key": "X-Correlation-ID", + "value": "e3845975-3d6b-4185-81cb-22a80f7ed0da" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"OperationOutcome\",\n \"issue\": [\n {\n \"severity\": \"information\",\n \"code\": \"informational\"\n }\n ]\n}" + } + ] + }, + { + "name": "Resource not found - Update proxy role", + "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 {\"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", + "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": "{{$randomUUID}}" + } + ] + }, + "description": "## Example scenario\n\n**Given** a proxy role exists in the National Proxy Store for a given UUID \n**When** a PATCH /Consent request is sent using the UUID \n**Then** a 404 error is returned with code 'RESOURCE_NOT_FOUND'" + }, + "response": [ + { + "name": "Resource not found error response", + "originalRequest": { + "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 {\"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", + "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": "{{$randomUUID}}" + } + ] + } + }, + "status": "Not Found", + "code": 404, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Fri, 28 Nov 2025 16:51:31 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "348" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "5940dd45-0b04-4e71-8fce-6a69665b256e" + }, + { + "key": "x-amz-apigw-id", + "value": "Uw3q4HTZrPEFxLQ=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-6929d312-f383a46c595faa9361bb8326" + }, + { + "key": "X-Request-ID", + "value": "4cfc1e62-1d97-47b2-825e-2f72eed5e29e" + }, + { + "key": "X-Correlation-ID", + "value": "db86232d-68a5-492d-96e3-02613a3cf6bf" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"issue\": [\n {\n \"code\": \"invalid\",\n \"diagnostics\": \"Proxy role not found.\",\n \"details\": {\n \"coding\": [\n {\n \"code\": \"RESOURCE_NOT_FOUND\",\n \"display\": \"Request must be for a existing proxy role.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" + } + ] + }, + { + "name": "Invalid status code - Update proxy role", + "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 {\"op\": \"replace\", \"path\": \"/status\", \"value\": \"invalid_status\"},\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", + "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 for a given UUID \n**When** a PATCH /Consent request is sent using the UUID \n**Then** a 404 error is returned with code 'RESOURCE_NOT_FOUND'" + }, + "response": [ + { + "name": "Invalid status code error returned", + "originalRequest": { + "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 {\"op\": \"replace\", \"path\": \"/status\", \"value\": \"invalid_status\"},\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", + "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": "aa58f9b7-2a02-45a2-9cb4-0d6fefe07a02" + } + ] + } + }, + "status": "Unprocessable Entity (WebDAV) (RFC 4918)", + "code": 422, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Fri, 28 Nov 2025 16:56:26 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "329" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "557c0652-9a38-434c-99c1-f979920055bf" + }, + { + "key": "x-amz-apigw-id", + "value": "Uw4ZOEOOLPEFggg=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-6929d43a-6c636f683c11b4ac83776aa6" + }, + { + "key": "X-Request-ID", + "value": "1a4ee8bf-0d2b-4398-950f-b3fd9332e7d3" + }, + { + "key": "X-Correlation-ID", + "value": "986fe591-c2f0-422d-9e1e-c99628e9a1df" + }, + { + "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_STATUS_CODE\",\n \"display\": \"Status code is invalid.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"Invalid status code.\",\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" + } + ] + }, + { + "name": "Invalid state transition - Update proxy role", + "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 {\"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]", + "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 for a given UUID \n**When** a PATCH /Consent request is sent using the UUID \n**Then** a 404 error is returned with code 'RESOURCE_NOT_FOUND'" + }, + "response": [ + { + "name": "Invalid status code error returned", + "originalRequest": { + "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\": \"someinvalidcode\"\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": "aa58f9b7-2a02-45a2-9cb4-0d6fefe07a02" + } + ] + } + }, + "status": "Unprocessable Entity (WebDAV) (RFC 4918)", + "code": 422, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Fri, 28 Nov 2025 16:56:26 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "329" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "557c0652-9a38-434c-99c1-f979920055bf" + }, + { + "key": "x-amz-apigw-id", + "value": "Uw4ZOEOOLPEFggg=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-6929d43a-6c636f683c11b4ac83776aa6" + }, + { + "key": "X-Request-ID", + "value": "1a4ee8bf-0d2b-4398-950f-b3fd9332e7d3" + }, + { + "key": "X-Correlation-ID", + "value": "986fe591-c2f0-422d-9e1e-c99628e9a1df" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"issue\": [\n {\n \"code\": \"invalid\",\n \"diagnostics\": \"Patch attempting invalid status change.\",\n \"details\": {\n \"coding\": [\n {\n \"code\": \"INVALID_STATE_TRANSITION\",\n \"display\": \"Status change is invalid.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" + } + ] + }, + { + "name": "Invalid path - Update proxy role", + "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\": \"/someotherpath\",\n \"value\": \"active\"\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 for a given UUID \n**When** a PATCH /Consent request with an invalid path is sent using the UUID \n**Then** a 400 error is returned with code 'INVALID_PATCH_PATH'" + }, + "response": [ + { + "name": "Invalid path error returned", + "originalRequest": { + "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\": \"/someotherpath\",\n \"value\": \"active\"\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": "aa58f9b7-2a02-45a2-9cb4-0d6fefe07a02" + } + ] + } + }, + "status": "Unprocessable Entity (WebDAV) (RFC 4918)", + "code": 422, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Fri, 28 Nov 2025 16:58:39 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "346" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "9c37f3a0-d1af-4a9d-8664-20edf45bd111" + }, + { + "key": "x-amz-apigw-id", + "value": "Uw4t7HzBrPEFTsw=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-6929d4bf-e038f4c128983e6e945b14ad" + }, + { + "key": "X-Request-ID", + "value": "3e5e943f-2647-4a09-b216-7d3551a637e7" + }, + { + "key": "X-Correlation-ID", + "value": "65dc6940-bcb3-466d-b25d-0a10ab98d7e6" + }, + { + "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_PATCH_PATH\",\n \"display\": \"Patch target is invalid.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"Patch targeting non-existent element.\",\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" + } + ] + }, + { + "name": "Missing free text for Other", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "" + ], + "type": "text/javascript", + "packages": {}, + "requests": {} + } + } + ], + "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 {\"op\": \"replace\", \"path\": \"/status\", \"value\": \"inactive\"},\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\": \"OTHER\",\n \"display\": \"Other reason\"\n }\n ]\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 for a given UUID \n**When** a PATCH /Consent request with a missing free text and status reason of 'Other' is sent using the UUID \n**Then** a 400 error is returned with code 'MISSING_FREE_TEXT_FOR_OTHER'" + }, + "response": [ + { + "name": "Missing free text error", + "originalRequest": { + "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 {\"op\": \"replace\", \"path\": \"/status\", \"value\": \"inactive\"},\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\": \"OTHER\",\n \"display\": \"Other reason\"\n }\n ]\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" + } + ] + } + }, + "status": "Unprocessable Entity (WebDAV) (RFC 4918)", + "code": 422, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Fri, 28 Nov 2025 16:58:39 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "346" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "9c37f3a0-d1af-4a9d-8664-20edf45bd111" + }, + { + "key": "x-amz-apigw-id", + "value": "Uw4t7HzBrPEFTsw=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-6929d4bf-e038f4c128983e6e945b14ad" + }, + { + "key": "X-Request-ID", + "value": "3e5e943f-2647-4a09-b216-7d3551a637e7" + }, + { + "key": "X-Correlation-ID", + "value": "65dc6940-bcb3-466d-b25d-0a10ab98d7e6" + }, + { + "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_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}" + } + ] + } + ], + "description": "## Allowed auth methods\n\n- CIS2 token - Auth with test user `656005750108`\n \n- NHS Login token - Auth with test user `9730675929`\n \n\nSee collection level documentation for info about how to get authorization tokens." + }, + { + "name": "Get verified candidate relationships (GET /RelatedPerson)", + "item": [ + { + "name": "Valid request - Get verified candidate relationships", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "" + ], + "type": "text/javascript", + "packages": {}, + "requests": {} + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/RelatedPerson?identifier=9736898121", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "RelatedPerson" + ], + "query": [ + { + "key": "identifier", + "value": "9736898121", + "description": "NHS number of the user to retrieve verified relationships for" + } + ] + }, + "description": "## Example scenario\n\n**Given** an NHS user has multiple related person relationships in PDS \n**When** a GET /RelatedPerson request is sent for the user \n**Then** the relationships are returned" + }, + "response": [ + { + "name": "Candidate relationship returned", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/RelatedPerson?identifier=9736898148", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "RelatedPerson" + ], + "query": [ + { + "key": "identifier", + "value": "9736898148", + "description": "NHS number of the user to retrieve verified relationships for" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Fri, 28 Nov 2025 17:10:29 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "927" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "3c77c3f5-2f94-4718-b4df-a994b49a9c8d" + }, + { + "key": "x-amz-apigw-id", + "value": "Uw6coGWKLPEFyvQ=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-6929d783-8368a433a0eae3395c7136cb" + }, + { + "key": "X-Request-ID", + "value": "e464b1c8-ad9b-41a2-9de3-2dd0e34d0fce" + }, + { + "key": "X-Correlation-ID", + "value": "056c8f1f-9d95-44b2-a4f7-582554f53387" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/IyKYB\",\n \"resource\": {\n \"id\": \"IyKYB\",\n \"birthDate\": \"2015-09-26\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n ],\n \"name\": [\n {\n \"family\": \"SHEPP\",\n \"given\": [\n \"Ashley\",\n \"Ellen\"\n ],\n \"period\": {\n \"start\": \"2025-08-06\"\n },\n \"prefix\": [\n \"MS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"MTH\",\n \"display\": \"mother\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n }\n ],\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson?identifier=9736898148\"\n }\n ],\n \"timestamp\": \"2025-11-28T17:10:29.231159+00:00\",\n \"total\": 1,\n \"type\": \"searchset\",\n \"resourceType\": \"Bundle\"\n}" + }, + { + "name": "Candidate relationship returned with patient details", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/RelatedPerson?identifier=9736898148&_include=RelatedPerson:patient", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "RelatedPerson" + ], + "query": [ + { + "key": "identifier", + "value": "9736898148", + "description": "NHS number of the user to retrieve verified relationships for" + }, + { + "key": "_include", + "value": "RelatedPerson:patient" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Date", + "value": "Fri, 28 Nov 2025 17:13:27 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "1395" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "a34914f5-c757-4a7c-b8e6-2061793de970" + }, + { + "key": "x-amz-apigw-id", + "value": "Uw63LFuCLPEFtfA=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-6929d82d-7210a91047b09608692e6ff6" + }, + { + "key": "X-Request-ID", + "value": "c46487fa-a7a9-4adb-82ec-dc7702fa66d4" + }, + { + "key": "X-Correlation-ID", + "value": "755116de-f4ef-406b-8088-1af14dd85c8d" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898644\",\n \"resource\": {\n \"id\": \"9736898644\",\n \"birthDate\": \"2015-09-26\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n ],\n \"name\": [\n {\n \"family\": \"SHEPP\",\n \"given\": [\n \"Ashley\",\n \"Ellen\"\n ],\n \"period\": {\n \"start\": \"2025-08-06\"\n },\n \"prefix\": [\n \"MS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/IyKYB\",\n \"resource\": {\n \"id\": \"IyKYB\",\n \"birthDate\": \"2015-09-26\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n ],\n \"name\": [\n {\n \"family\": \"SHEPP\",\n \"given\": [\n \"Ashley\",\n \"Ellen\"\n ],\n \"period\": {\n \"start\": \"2025-08-06\"\n },\n \"prefix\": [\n \"MS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"MTH\",\n \"display\": \"mother\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n }\n ],\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson?identifier=9736898148&_include=RelatedPerson%3Apatient\"\n }\n ],\n \"timestamp\": \"2025-11-28T17:13:27.630813+00:00\",\n \"total\": 1,\n \"type\": \"searchset\",\n \"resourceType\": \"Bundle\"\n}" + } + ] + }, + { + "name": "Valid request - No relationships returned - Get verified candidate relationships", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "" + ], + "type": "text/javascript", + "packages": {}, + "requests": {} + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/RelatedPerson?identifier=9736898199", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "RelatedPerson" + ], + "query": [ + { + "key": "identifier", + "value": "9736898199", + "description": "NHS number of the user to retrieve verified relationships for" + } + ] + }, + "description": "## Example scenario\n\n**Given** an NHS user has no related person relationships in PDS \n**When** a GET /RelatedPerson request is sent for the user \n**Then** no relationships are returned" + }, + "response": [ + { + "name": "No relationships returned", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/RelatedPerson?identifier=9736898199", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "RelatedPerson" + ], + "query": [ + { + "key": "identifier", + "value": "9736898199", + "description": "NHS number of the user to retrieve verified relationships for" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Fri, 28 Nov 2025 17:15:06 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "249" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "9305e61b-2b8b-4a0c-84dd-0be9c4e1ce72" + }, + { + "key": "x-amz-apigw-id", + "value": "Uw7IDHSxrPEF7gg=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-6929d899-c345d4868005c5dc5999d598" + }, + { + "key": "X-Request-ID", + "value": "189b9dd8-722e-4e1b-b76b-75d2dd05fd00" + }, + { + "key": "X-Correlation-ID", + "value": "38045e59-8b2a-4f52-a1a5-834c91c25a9f" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson?identifier=9736898199\"\n }\n ],\n \"timestamp\": \"2025-11-28T17:15:05.994606+00:00\",\n \"total\": 0,\n \"type\": \"searchset\",\n \"resourceType\": \"Bundle\"\n}" + } + ] + }, + { + "name": "Valid request - Verify relationship - Get verified candidate relationships", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "" + ], + "type": "text/javascript", + "packages": {}, + "requests": {} + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/RelatedPerson?identifier=9736898148&patient:identifier=9736898644", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "RelatedPerson" + ], + "query": [ + { + "key": "identifier", + "value": "9736898148", + "description": "NHS number of the user to retrieve verified relationships for" + }, + { + "key": "patient:identifier", + "value": "9736898644" + } + ] + }, + "description": "## Example scenario\n\n**Given** a proxy has a related person relationship in PDS \n**When** a GET /RelatedPerson request is sent for the proxy and the patient \n**Then** the relationship is returned" + }, + "response": [ + { + "name": "Verified relationship returned", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/RelatedPerson?identifier=9736898148&patient:identifier=9736898644", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "RelatedPerson" + ], + "query": [ + { + "key": "identifier", + "value": "9736898148", + "description": "NHS number of the user to retrieve verified relationships for" + }, + { + "key": "patient:identifier", + "value": "9736898644" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Fri, 28 Nov 2025 17:19:37 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "959" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "2ac409be-e9ce-4d73-a4b4-3c8a791aa51e" + }, + { + "key": "x-amz-apigw-id", + "value": "Uw7x4HIMrPEF-Fg=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-6929d9a5-d9df4059c3c602feabe873fc" + }, + { + "key": "X-Request-ID", + "value": "88367407-4953-4b64-9da0-6308c007b120" + }, + { + "key": "X-Correlation-ID", + "value": "8b55ca15-93fb-4ce9-be1b-eb0eb5e728fa" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/IyKYB\",\n \"resource\": {\n \"id\": \"IyKYB\",\n \"birthDate\": \"2015-09-26\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n ],\n \"name\": [\n {\n \"family\": \"SHEPP\",\n \"given\": [\n \"Ashley\",\n \"Ellen\"\n ],\n \"period\": {\n \"start\": \"2025-08-06\"\n },\n \"prefix\": [\n \"MS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"MTH\",\n \"display\": \"mother\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n }\n ],\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson?identifier=9736898148&patient%3Aidentifier=9736898644\"\n }\n ],\n \"timestamp\": \"2025-11-28T17:19:37.300736+00:00\",\n \"total\": 1,\n \"type\": \"searchset\",\n \"resourceType\": \"Bundle\"\n}" + }, + { + "name": "Verified relationship returned with patient details", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/RelatedPerson?identifier=9736898148&patient:identifier=9736898644&_include=RelatedPerson:patient", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "RelatedPerson" + ], + "query": [ + { + "key": "identifier", + "value": "9736898148", + "description": "NHS number of the user to retrieve verified relationships for" + }, + { + "key": "patient:identifier", + "value": "9736898644" + }, + { + "key": "_include", + "value": "RelatedPerson:patient" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Fri, 28 Nov 2025 17:19:37 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "959" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "2ac409be-e9ce-4d73-a4b4-3c8a791aa51e" + }, + { + "key": "x-amz-apigw-id", + "value": "Uw7x4HIMrPEF-Fg=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-6929d9a5-d9df4059c3c602feabe873fc" + }, + { + "key": "X-Request-ID", + "value": "88367407-4953-4b64-9da0-6308c007b120" + }, + { + "key": "X-Correlation-ID", + "value": "8b55ca15-93fb-4ce9-be1b-eb0eb5e728fa" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/IyKYB\",\n \"resource\": {\n \"id\": \"IyKYB\",\n \"birthDate\": \"2015-09-26\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n ],\n \"name\": [\n {\n \"family\": \"SHEPP\",\n \"given\": [\n \"Ashley\",\n \"Ellen\"\n ],\n \"period\": {\n \"start\": \"2025-08-06\"\n },\n \"prefix\": [\n \"MS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"MTH\",\n \"display\": \"mother\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n }\n ],\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson?identifier=9736898148&patient%3Aidentifier=9736898644\"\n }\n ],\n \"timestamp\": \"2025-11-28T17:19:37.300736+00:00\",\n \"total\": 1,\n \"type\": \"searchset\",\n \"resourceType\": \"Bundle\"\n}" + } + ] + }, + { + "name": "Missing identifier value - Get verified candidate relationships", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "" + ], + "type": "text/javascript", + "packages": {}, + "requests": {} + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/RelatedPerson", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "RelatedPerson" + ] + }, + "description": "## Example scenario\n\n**Given** a proxy has a related person relationship in PDS \n**When** a GET /RelatedPerson request is sent with no identifier \n**Then** a 400 error is returned with code 'MISSING_IDENTIFIER_VALUE'" + }, + "response": [ + { + "name": "Missing identifier value error returned", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/RelatedPerson", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "RelatedPerson" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Fri, 28 Nov 2025 17:45:09 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "362" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "f524a29e-b0e9-45b0-af70-ad23fd87158c" + }, + { + "key": "x-amz-apigw-id", + "value": "Uw_h7GQFrPEF8xw=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-6929dfa5-ca879ed8f2a8b5c139182a8b" + }, + { + "key": "X-Request-ID", + "value": "28dbd904-517c-4e42-a3f6-37772b2da578" + }, + { + "key": "X-Correlation-ID", + "value": "e1229f7b-b14f-4858-b4fd-dcb3c9151a99" + }, + { + "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_IDENTIFIER_VALUE\",\n \"display\": \"Missing RelatedPerson NHS number.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"The 'identifier' parameter is required\",\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" + } + ] + }, + { + "name": "Invalid identifier value - Get verified candidate relationships", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "" + ], + "type": "text/javascript", + "packages": {}, + "requests": {} + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/RelatedPerson?identifier=invalid", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "RelatedPerson" + ], + "query": [ + { + "key": "identifier", + "value": "invalid" + } + ] + }, + "description": "## Example scenario\n\n**Given** a proxy has a related person relationship in PDS \n**When** a GET /RelatedPerson request is sent with an invalid identifier \n**Then** a 400 error is returned with code 'INVALID_IDENTIFIER_VALUE'" + }, + "response": [ + { + "name": "Invalid identifier value error returned", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/RelatedPerson?identifier=invalid", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "RelatedPerson" + ], + "query": [ + { + "key": "identifier", + "value": "invalid" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Fri, 28 Nov 2025 17:47:15 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "422" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "7a627dc1-8fe7-4a07-9a17-5e8a7c77963b" + }, + { + "key": "x-amz-apigw-id", + "value": "Uw_1hFJWLPEFbKQ=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-6929e022-4dc5c06769a0b866a6456227" + }, + { + "key": "X-Request-ID", + "value": "c695d77b-b94e-4e04-9e2b-f7e34ef2e414" + }, + { + "key": "X-Correlation-ID", + "value": "46db2d38-e52b-4fcc-a8cf-2617fec4557a" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"issue\": [\n {\n \"code\": \"invalid\",\n \"diagnostics\": \"Not a valid NHS Number provided for the 'identifier' parameter\",\n \"expression\": [\n \"RelatedPerson.identifier\"\n ],\n \"details\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\",\n \"code\": \"INVALID_IDENTIFIER_VALUE\",\n \"display\": \"Provided value is invalid\"\n }\n ]\n },\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" + } + ] + }, + { + "name": "Invalid identifier system - Get verified candidate relationships", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "" + ], + "type": "text/javascript", + "packages": {}, + "requests": {} + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/RelatedPerson?identifier=https://fhir.nhs.uk/Id/nhs-number/invalid|730675929", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "RelatedPerson" + ], + "query": [ + { + "key": "identifier", + "value": "https://fhir.nhs.uk/Id/nhs-number/invalid|730675929" + } + ] + }, + "description": "## Example scenario\n\n**Given** a proxy has a related person relationship in PDS \n**When** a GET /RelatedPerson request is sent with an invalid identifier \n**Then** a 400 error is returned with code 'INVALID_IDENTIFIER_VALUE'" + }, + "response": [ + { + "name": "Invalid identifier value error returned", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/RelatedPerson?identifier=https://fhir.nhs.uk/Id/nhs-number/invalid|730675929", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "RelatedPerson" + ], + "query": [ + { + "key": "identifier", + "value": "https://fhir.nhs.uk/Id/nhs-number/invalid|730675929" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Fri, 28 Nov 2025 17:48:42 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "352" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "66e70023-f78b-48aa-a29f-3df08e3e895c" + }, + { + "key": "x-amz-apigw-id", + "value": "UxADKEqiLPEFbWw=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-6929e07a-ade89162a2d0b573830554ca" + }, + { + "key": "X-Request-ID", + "value": "a6c275c6-3964-4d18-8860-fcf25e510f14" + }, + { + "key": "X-Correlation-ID", + "value": "1d7ecfb8-29fb-461a-9904-e28216b510f8" + }, + { + "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_IDENTIFIER_SYSTEM\",\n \"display\": \"Invalid identifier system\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"The identifier system is not valid.\",\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" + } + ] + } + ], + "description": "## Allowed auth methods\n\n- NHS Login token - Auth with test user `9730675929`\n \n- CIS2 token - Auth with test user `656005750108`\n \n\nSee collection level documentation for info about how to get authorization tokens.", + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{cis2_token}}", + "type": "string" + } + ] + }, + "event": [ + { + "listen": "prerequest", + "script": { + "type": "text/javascript", + "packages": {}, + "requests": {}, + "exec": [ + "" + ] + } + }, + { + "listen": "test", + "script": { + "type": "text/javascript", + "packages": {}, + "requests": {}, + "exec": [ + "" + ] + } + } + ] + } + ], + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{authorization_header_value}}", + "type": "string" + } + ] + }, + "event": [ + { + "listen": "prerequest", + "script": { + "type": "text/javascript", + "packages": {}, + "requests": {}, + "exec": [ + "" + ] + } + }, + { + "listen": "test", + "script": { + "type": "text/javascript", + "packages": {}, + "requests": {}, + "exec": [ + "" + ] + } + } + ], + "variable": [ + { + "key": "nps_enabled", + "value": "" + }, + { + "key": "nam_cache_enabled", + "value": "" + }, + { + "key": "nam_enabled", + "value": "" + }, + { + "key": "use_nam_mock", + "value": "" + } + ] } \ No newline at end of file diff --git a/postman/validated_relationship_service.sandbox.postman_collection.json b/postman/validated_relationship_service.sandbox.postman_collection.json index a0224c2e..85fa9f33 100644 --- a/postman/validated_relationship_service.sandbox.postman_collection.json +++ b/postman/validated_relationship_service.sandbox.postman_collection.json @@ -1,5 +1,4 @@ { -<<<<<<< HEAD "info": { "_postman_id": "76b8235d-7f30-43d3-a767-38e1c39061cf", "name": "Validated Relationship Service Sandbox 21/01/26", @@ -11163,11253 +11162,4 @@ "value": "https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4" } ] -======= - "info": { - "_postman_id": "c1ed4947-1510-40ca-999f-083313d60603", - "name": "Validated Relationship Service Sandbox 21/01/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": "50770159" - }, - "item": [ - { - "name": "Get a proxy access request (Questionnaire Response)", - "item": [ - { - "name": "Adult to adult with capacity", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"QuestionnaireResponse\",", - " \"status\": \"completed\",", - " \"authored\": \"2024-07-15T09:43:03.280Z\",", - " \"id\": \"156e1560-e532-4e2a-85ad-5aeff03dc43e\",", - " \"identifier\": {", - " \"value\": \"19318ZGLAB\"", - " },", - " \"source\": {", - " \"type\": \"RelatedPerson\",", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000005\"", - " }", - " },", - " \"subject\": {", - " \"type\": \"Patient\",", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000006\"", - " }", - " },", - " \"questionnaire\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Questionnaire/01dc6813-3421-4d14-948d-a4888241add1\",", - " \"item\": [", - " {", - " \"linkId\": \"relatedPerson\",", - " \"text\": \"Proxy details\",", - " \"item\": [", - " {", - " \"linkId\": \"relatedPerson_identifier\",", - " \"text\": \"NHS number\",", - " \"answer\": [", - " {", - " \"valueString\": \"9000000005\"", - " }", - " ]", - " },", - " {", - " \"linkId\": \"relatedPerson_name\",", - " \"text\": \"Name\",", - " \"item\": [", - " {", - " \"linkId\": \"relatedPerson_name_first\",", - " \"text\": \"First name\",", - " \"answer\": [", - " {", - " \"valueString\": \"Jack\"", - " }", - " ]", - " },", - " {", - " \"linkId\": \"relatedPerson_name_family\",", - " \"text\": \"Last name\",", - " \"answer\": [", - " {", - " \"valueString\": \"Jones\"", - " }", - " ]", - " }", - " ]", - " },", - " {", - " \"linkId\": \"relatedPerson_birthDate\",", - " \"text\": \"Date of birth\",", - " \"answer\": [", - " {", - " \"valueDate\": \"1970-02-15\"", - " }", - " ]", - " },", - " {", - " \"linkId\": \"relatedPerson_basisForAccess\",", - " \"text\": \"Basis for Access\",", - " \"answer\": [", - " {", - " \"valueCoding\": {", - " \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\",", - " \"code\": \"PRN\",", - " \"display\": \"Parent\"", - " }", - " }", - " ]", - " },", - " {", - " \"linkId\": \"relatedPerson_relationship\",", - " \"text\": \"Relationship\",", - " \"answer\": [", - " {", - " \"valueCoding\": {", - " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", - " \"code\": \"PRN\",", - " \"display\": \"Parent\"", - " }", - " }", - " ]", - " }", - " ]", - " },", - " {", - " \"linkId\": \"patient\",", - " \"text\": \"Patient details\",", - " \"item\": [", - " {", - " \"linkId\": \"patient_identifier\",", - " \"text\": \"NHS number\",", - " \"answer\": [", - " {", - " \"valueString\": \"9000000006\"", - " }", - " ]", - " },", - " {", - " \"linkId\": \"patient_name\",", - " \"text\": \"Name\",", - " \"item\": [", - " {", - " \"linkId\": \"patient_name_first\",", - " \"text\": \"First name\",", - " \"answer\": [", - " {", - " \"valueString\": \"Jill\"", - " }", - " ]", - " },", - " {", - " \"linkId\": \"patient_name_family\",", - " \"text\": \"Last name\",", - " \"answer\": [", - " {", - " \"valueString\": \"Jones\"", - " }", - " ]", - " }", - " ]", - " },", - " {", - " \"linkId\": \"patient_birthDate\",", - " \"text\": \"Date of birth\",", - " \"answer\": [", - " {", - " \"valueDate\": \"1965-01-01\"", - " }", - " ]", - " }", - " ]", - " },", - " {", - " \"linkId\": \"requestedAccess\",", - " \"text\": \"Requested access\",", - " \"item\": [", - " {", - " \"linkId\": \"requestedAccess_accessLevel\",", - " \"text\": \"Requested access level\",", - " \"answer\": [", - " {", - " \"valueCoding\": {", - " \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",", - " \"code\": \"APPT\",", - " \"display\": \"Appointment Booking\"", - " }", - " },", - " {", - " \"valueCoding\": {", - " \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",", - " \"code\": \"VACC\",", - " \"display\": \"Vaccination Records\"", - " }", - " }", - " ]", - " },", - " {", - " \"linkId\": \"requestedAccess_reasonsForAccess\",", - " \"text\": \"Reason for access\",", - " \"answer\": [", - " {", - " \"valueCoding\": {", - " \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-ReasonForAccess\",", - " \"code\": \"PRAC\",", - " \"display\": \"Practical Reasons\"", - " }", - " }", - " ]", - " }", - " ]", - " }", - " ]", - "};", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "d967f4c9-8e83-4930-97ab-ae4e122d8ca5", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "8717c840-c222-4f84-a880-45bc129f8382", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/QuestionnaireResponse/156e1560-e532-4e2a-85ad-5aeff03dc43e", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "QuestionnaireResponse", - "156e1560-e532-4e2a-85ad-5aeff03dc43e" - ] - }, - "description": "Example of Questionnaire Response that will be returned" - }, - "response": [] - }, - { - "name": "Missing Access Request UUID", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"issue\": [", - " {", - " \"code\": \"not-supported\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"code\": \"METHOD_NOT_ALLOWED\",", - " \"display\": \"The method is not allowed.\",", - " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", - " \"version\": \"1\"", - " }", - " ]", - " },", - " \"diagnostics\": \"The method is not allowed for the requested resource.\",", - " \"severity\": \"error\"", - " }", - " ],", - " \"resourceType\": \"OperationOutcome\"", - "};", - "", - "pm.test(\"Status code is 405\", function () {", - " pm.response.to.have.status(405);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "d967f4c9-8e83-4930-97ab-ae4e122d8ca5", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "8717c840-c222-4f84-a880-45bc129f8382", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/QuestionnaireResponse/", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "QuestionnaireResponse", - "" - ] - }, - "description": "Example of an error response when reference code is missing from request" - }, - "response": [] - }, - { - "name": "Invalid Access Request UUID", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"OperationOutcome\",", - " \"issue\": [", - " {", - " \"severity\": \"error\",", - " \"code\": \"invalid\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/STU3/CodeSystem/Spine-ErrorOrWarningCode-1\",", - " \"code\": \"INVALID_IDENTIFIER_VALUE\",", - " \"display\": \"Invalid identifier value\",", - " }", - " ]", - " },", - " \"diagnostics\": \"The specified access request ID is invalid. Access request IDs must be a valid UUID.\",", - " }", - " ],", - " };", - "", - "pm.test(\"Status code is 400\", function () {", - " pm.response.to.have.status(400);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "d967f4c9-8e83-4930-97ab-ae4e122d8ca5", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "8717c840-c222-4f84-a880-45bc129f8382", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/QuestionnaireResponse/INVALID", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "QuestionnaireResponse", - "INVALID" - ] - }, - "description": "Example of an error response when reference code is invalid" - }, - "response": [] - }, - { - "name": "Access Request UUID Not Found", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"OperationOutcome\",", - " \"issue\": [", - " {", - " \"severity\": \"error\",", - " \"code\": \"not-found\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/STU3/CodeSystem/Spine-ErrorOrWarningCode-1\",", - " \"code\": \"QUESTIONNAIRE_RESPONSE_NOT_FOUND\",", - " \"display\": \"Questionnaire response not found\"", - " }", - " ]", - " },", - " \"diagnostics\": \"The Questionnaire response could not be found using the provided access request ID.\"", - " }", - " ]", - "};", - "", - "pm.test(\"Status code is 404\", function () {", - " pm.response.to.have.status(404);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "d967f4c9-8e83-4930-97ab-ae4e122d8ca5", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "8717c840-c222-4f84-a880-45bc129f8382", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/QuestionnaireResponse/60d09b82-f4bb-41f9-b41e-767999b4ac9b", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "QuestionnaireResponse", - "60d09b82-f4bb-41f9-b41e-767999b4ac9b" - ] - }, - "description": "Example of an error response when reference code is not found in database" - }, - "response": [] - } - ], - "description": "The GET Questionnaire Response endpoint is used to retrieve a Questionnaire Response using its unique reference code. This endpoint returns the full Questionnaire Response document that was previously submitted.\n\nThis folder contains requests covering different scenarios of valid and invalid requests.\n\nFor more details, please refer to the [GET Questionnaire Response OAS page for the Validated Relationship Service on the NHS England website.](https://digital.nhs.uk/developer/api-catalogue/validated-relationship-service#get-/QuestionnaireResponse)" - }, - { - "name": "New access request (Questionnaire Response)", - "item": [ - { - "name": "Adult to child access request", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"OperationOutcome\",", - " \"issue\": [", - " {", - " \"severity\": \"information\",", - " \"code\": \"informational\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"code\": \"19318ZGLAB\",", - " \"display\": \"19318ZGLAB\"", - " }", - " ]", - " }", - " }", - " ]", - "};", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Response has the correct body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});", - "", - "pm.test(\"Location header is returned\", () => {", - " pm.response.to.have.header(\"Location\", \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/QuestionnaireResponse?ID=156e1560-e532-4e2a-85ad-5aeff03dc43e\")", - "})" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/fhir+json", - "type": "text" - }, - { - "key": "X-Request-ID", - "value": "d967f4c9-8e83-4930-97ab-ae4e122d8ca5", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "8717c840-c222-4f84-a880-45bc129f8382", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"resourceType\": \"QuestionnaireResponse\",\n \"status\": \"completed\",\n \"authored\": \"2024-07-15T09:43:03.280Z\",\n \"source\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000009\"\n }\n },\n \"subject\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000017\"\n }\n },\n \"questionnaire\": \"Questionnaire/01dc6813-3421-4d14-948d-a4888241add1\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson\",\n \"text\": \"relatedPerson\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_identifier\",\n \"text\": \"NHS Number\",\n \"answer\": [\n {\n \"valueString\": \"9000000009\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name\",\n \"text\": \"relatedPerson_name\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_name_first\",\n \"text\": \"First name.\",\n \"answer\": [\n {\n \"valueString\": \"Sharon\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name_family\",\n \"text\": \"Family name (often called Surname).\",\n \"answer\": [\n {\n \"valueString\": \"Smith\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_birthDate\",\n \"text\": \"Date of Birth\",\n \"answer\": [\n {\n \"valueDate\": \"1994-03-21\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_basisForAccess\",\n \"text\": \"Basis For Access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_relationship\",\n \"text\": \"Relationship\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails\",\n \"text\": \"parentalApplicationSupplementaryDetails\",\n \"item\": [\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_evidenceOfResponsibility\",\n \"text\": \"Evidence of parental responsibility\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-EvidenceOfResponsibility\",\n \"code\": \"BRTH\",\n \"display\": \"Birth certificate\"\n }\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_evidenceOfResponsibilityMoreinfo\",\n \"text\": \"Evidence of responsibility - Further Information\",\n \"answer\": [\n {\n \"valueString\": \"Birth Certificate is original\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_isCurrentAddressConfirmed\",\n \"text\": \"Is current address confirmed?\",\n \"answer\": [\n {\n \"valueString\": \"Yes\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_newAddress\",\n \"text\": \"parentalApplicationSupplementaryDetails_newAddress\",\n \"item\": [\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_line1\",\n \"text\": \"Address Line 1\",\n \"answer\": [\n {\n \"valueString\": \"24 Hoves Edge\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_line2\",\n \"text\": \"Address Line 2\",\n \"answer\": [\n {\n \"valueString\": \"Remington\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_line3\",\n \"text\": \"Address Line 3\",\n \"answer\": [\n {\n \"valueString\": \"Boroughbridge\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_city\",\n \"text\": \"Town / City\",\n \"answer\": [\n {\n \"valueString\": \"Leeds\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_district\",\n \"text\": \"County\",\n \"answer\": [\n {\n \"valueString\": \"West Yorkshire\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_postalCode\",\n \"text\": \"Postcode\",\n \"answer\": [\n {\n \"valueString\": \"LS1 1DW\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_liveAtSameAddress\",\n \"text\": \"Do the adult and child live at the same address?\",\n \"answer\": [\n {\n \"valueString\": \"Yes\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_canChildConsent\",\n \"text\": \"Can the child consent?\",\n \"answer\": [\n {\n \"valueString\": \"No\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_reasonNoChildConsent\",\n \"text\": \"Reason the child cannot consent\",\n \"answer\": [\n {\n \"valueString\": \"Child is too young\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient\",\n \"text\": \"patient\",\n \"item\": [\n {\n \"linkId\": \"patient_identifier\",\n \"text\": \"NHS Number\",\n \"answer\": [\n {\n \"valueString\": \"9000000017\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name\",\n \"text\": \"patient_name\",\n \"item\": [\n {\n \"linkId\": \"patient_name_first\",\n \"text\": \"First name.\",\n \"answer\": [\n {\n \"valueString\": \"Jane\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name_family\",\n \"text\": \"Family name (often called Surname).\",\n \"answer\": [\n {\n \"valueString\": \"Smith\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient_birthDate\",\n \"text\": \"Date of Birth\",\n \"answer\": [\n {\n \"valueDate\": \"2020-10-22\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess\",\n \"text\": \"requestedAccess\",\n \"item\": [\n {\n \"linkId\": \"requestedAccess_accessLevel\",\n \"text\": \"Requested access level\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"APPT\",\n \"display\": \"Appointment Booking\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccess\",\n \"text\": \"Reason for access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-ReasonForAccess\",\n \"code\": \"COMB\",\n \"display\": \"Communication Barriers\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccessMoreinfo\",\n \"text\": \"Reason for access - further information\",\n \"answer\": [\n {\n \"valueString\": \"No internet connection\"\n }\n ]\n }\n ]\n }\n ]\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/QuestionnaireResponse", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "QuestionnaireResponse" - ] - }, - "description": "Example of an adult to child access request with the reference code returned" - }, - "response": [] - }, - { - "name": "Adult to adult with ability to consent access request", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"OperationOutcome\",", - " \"issue\": [", - " {", - " \"severity\": \"information\",", - " \"code\": \"informational\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"code\": \"19318ZGLAB\",", - " \"display\": \"19318ZGLAB\"", - " }", - " ]", - " }", - " }", - " ]", - "};", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Response has the correct body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});", - "", - "pm.test(\"Location header is returned\", () => {", - " pm.response.to.have.header(\"Location\", \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/QuestionnaireResponse?ID=156e1560-e532-4e2a-85ad-5aeff03dc43e\")", - "})" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "X-Request-ID", - "value": "d967f4c9-8e83-4930-97ab-ae4e122d8ca5", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "8717c840-c222-4f84-a880-45bc129f8382", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"resourceType\": \"QuestionnaireResponse\",\n \"status\": \"completed\",\n \"authored\": \"2024-07-15T09:43:03.280Z\",\n \"source\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000009\"\n }\n },\n \"subject\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000017\"\n }\n },\n \"questionnaire\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Questionnaire/01dc6813-3421-4d14-948d-a4888241add1\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson\",\n \"text\": \"Proxy details\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_identifier\",\n \"text\": \"NHS number\",\n \"answer\": [\n {\n \"valueString\": \"9000000005\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_basisForAccess\",\n \"text\": \"Basis for Access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\",\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\"\n }\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_relationship\",\n \"text\": \"Relationship\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"SPS\",\n \"display\": \"Spouse\"\n }\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient\",\n \"text\": \"Patient details\",\n \"item\": [\n {\n \"linkId\": \"patient_identifier\",\n \"text\": \"NHS number\",\n \"answer\": [\n {\n \"valueString\": \"9000000017\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name\",\n \"text\": \"Name\",\n \"item\": [\n {\n \"linkId\": \"patient_name_first\",\n \"text\": \"First name\",\n \"answer\": [\n {\n \"valueString\": \"Jill\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name_family\",\n \"text\": \"Last name\",\n \"answer\": [\n {\n \"valueString\": \"Jones\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient_birthDate\",\n \"text\": \"Date of birth\",\n \"answer\": [\n {\n \"valueDate\": \"1965-01-01\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess\",\n \"text\": \"Requested access\",\n \"item\": [\n {\n \"linkId\": \"requestedAccess_accessLevel\",\n \"text\": \"Requested access level\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"APPT\",\n \"display\": \"Appointment Booking\"\n }\n },\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"VACC\",\n \"display\": \"Vaccination Records\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccess\",\n \"text\": \"Reason for access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-ReasonForAccess\",\n \"code\": \"PRAC\",\n \"display\": \"Practical Reasons\"\n }\n }\n ]\n }\n ]\n }\n ]\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/QuestionnaireResponse", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "QuestionnaireResponse" - ] - }, - "description": "Example of an adult to adult access request where the patient can consent with the reference code returned" - }, - "response": [] - }, - { - "name": "Duplicate relationship", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"issue\": [", - " {", - " \"code\": \"invalid\",", - " \"diagnostics\": \"Proxy role already exists.\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"code\": \"DUPLICATE_RELATIONSHIP\",", - " \"display\": \"Request must be for a new proxy role.\",", - " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", - " \"version\": \"1\"", - " }", - " ]", - " },", - " \"severity\": \"error\"", - " }", - " ],", - " \"resourceType\": \"OperationOutcome\"", - "}", - "", - "pm.test(\"Status code is 409\", function () {", - " pm.response.to.have.status(409);", - "});", - "", - "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\": \"QuestionnaireResponse\",\n \"status\": \"completed\",\n \"authored\": \"2024-07-15T09:43:03.280Z\",\n \"source\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000049\"\n }\n },\n \"subject\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000006\"\n }\n },\n \"questionnaire\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Questionnaire/01dc6813-3421-4d14-948d-a4888241add1\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson\",\n \"text\": \"Proxy details\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_identifier\",\n \"text\": \"NHS number\",\n \"answer\": [\n {\n \"valueString\": \"9000000049\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_basisForAccess\",\n \"text\": \"Basis for Access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\",\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\"\n }\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_relationship\",\n \"text\": \"Relationship\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"SPS\",\n \"display\": \"Spouse\"\n }\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient\",\n \"text\": \"Patient details\",\n \"item\": [\n {\n \"linkId\": \"patient_identifier\",\n \"text\": \"NHS number\",\n \"answer\": [\n {\n \"valueString\": \"9000000006\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name\",\n \"text\": \"Name\",\n \"item\": [\n {\n \"linkId\": \"patient_name_first\",\n \"text\": \"First name\",\n \"answer\": [\n {\n \"valueString\": \"Jill\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name_family\",\n \"text\": \"Last name\",\n \"answer\": [\n {\n \"valueString\": \"Jones\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient_birthDate\",\n \"text\": \"Date of birth\",\n \"answer\": [\n {\n \"valueDate\": \"1965-01-01\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess\",\n \"text\": \"Requested access\",\n \"item\": [\n {\n \"linkId\": \"requestedAccess_accessLevel\",\n \"text\": \"Requested access level\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"APPT\",\n \"display\": \"Appointment Booking\"\n }\n },\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"VACC\",\n \"display\": \"Vaccination Records\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccess\",\n \"text\": \"Reason for access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-ReasonForAccess\",\n \"code\": \"PRAC\",\n \"display\": \"Practical Reasons\"\n }\n }\n ]\n }\n ]\n }\n ]\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/QuestionnaireResponse", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "QuestionnaireResponse" - ] - } - }, - "response": [] - }, - { - "name": "Adult to adult without ability to consent access request", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"OperationOutcome\",", - " \"issue\": [", - " {", - " \"severity\": \"information\",", - " \"code\": \"informational\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"code\": \"19318ZGLAB\",", - " \"display\": \"19318ZGLAB\"", - " }", - " ]", - " }", - " }", - " ]", - "};", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Response has the correct body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});", - "", - "pm.test(\"Location header is returned\", () => {", - " pm.response.to.have.header(\"Location\", \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/QuestionnaireResponse?ID=156e1560-e532-4e2a-85ad-5aeff03dc43e\")", - "})" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "X-Request-ID", - "value": "d967f4c9-8e83-4930-97ab-ae4e122d8ca5", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "8717c840-c222-4f84-a880-45bc129f8382", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"resourceType\": \"QuestionnaireResponse\",\n \"status\": \"completed\",\n \"authored\": \"2024-07-15T09:43:03.280Z\",\n \"source\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000017\"\n }\n },\n \"subject\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000009\"\n }\n },\n \"questionnaire\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Questionnaire/01dc6813-3421-4d14-948d-a4888241add1\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson\",\n \"text\": \"Proxy details\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_identifier\",\n \"text\": \"NHS number\",\n \"answer\": [\n {\n \"valueString\": \"9000000017\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_basisForAccess\",\n \"text\": \"Basis for Access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/STU3/CodeSystem/RARecord-ProxyRole-1\",\n \"code\": \"002\",\n \"display\": \"Best interest decision made on behalf of the patient (Mental Capacity Act 2005)\"\n }\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_relationship\",\n \"text\": \"Relationship\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"CHILD\",\n \"display\": \"Child\"\n }\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient\",\n \"text\": \"Patient details\",\n \"item\": [\n {\n \"linkId\": \"patient_identifier\",\n \"text\": \"NHS number\",\n \"answer\": [\n {\n \"valueString\": \"9000000009\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name\",\n \"text\": \"Name\",\n \"item\": [\n {\n \"linkId\": \"patient_name_first\",\n \"text\": \"First name\",\n \"answer\": [\n {\n \"valueString\": \"Florence\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name_family\",\n \"text\": \"Last name\",\n \"answer\": [\n {\n \"valueString\": \"Smith\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient_birthDate\",\n \"text\": \"Date of birth\",\n \"answer\": [\n {\n \"valueDate\": \"1935-01-02\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess\",\n \"text\": \"Requested access\",\n \"item\": [\n {\n \"linkId\": \"requestedAccess_accessLevel\",\n \"text\": \"Requested access level\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"APPT\",\n \"display\": \"Appointment Booking\"\n }\n },\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"VACC\",\n \"display\": \"Vaccination Records\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccess\",\n \"text\": \"Reason for access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-ReasonForAccess\",\n \"code\": \"TECH\",\n \"display\": \"Technical Barriers\"\n }\n }\n ]\n }\n ]\n }\n ]\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/QuestionnaireResponse", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "QuestionnaireResponse" - ] - }, - "description": "Example of an adult to adult access request where the patient cannot consent with the reference code returned" - }, - "response": [] - }, - { - "name": "Adult nominates adult access request", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"OperationOutcome\",", - " \"issue\": [", - " {", - " \"severity\": \"information\",", - " \"code\": \"informational\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"code\": \"19318ZGLAB\",", - " \"display\": \"19318ZGLAB\"", - " }", - " ]", - " }", - " }", - " ]", - "};", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Response has the correct body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});", - "", - "pm.test(\"Location header is returned\", () => {", - " pm.response.to.have.header(\"Location\", \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/QuestionnaireResponse?ID=156e1560-e532-4e2a-85ad-5aeff03dc43e\")", - "})" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "X-Request-ID", - "value": "d967f4c9-8e83-4930-97ab-ae4e122d8ca5", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "8717c840-c222-4f84-a880-45bc129f8382", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"resourceType\": \"QuestionnaireResponse\",\n \"status\": \"completed\",\n \"authored\": \"2024-07-15T09:43:03.280Z\",\n \"source\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000009\"\n }\n },\n \"subject\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000009\"\n }\n },\n \"questionnaire\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Questionnaire/01dc6813-3421-4d14-948d-a4888241add1\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson\",\n \"text\": \"Proxy details\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_identifier\",\n \"text\": \"NHS number\",\n \"answer\": [\n {\n \"valueString\": \"9000000017\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name\",\n \"text\": \"Name\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_name_first\",\n \"text\": \"First name\",\n \"answer\": [\n {\n \"valueString\": \"Tom\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name_family\",\n \"text\": \"Last name\",\n \"answer\": [\n {\n \"valueString\": \"Jones\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_birthDate\",\n \"text\": \"Date of birth\",\n \"answer\": [\n {\n \"valueDate\": \"1970-07-12\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_basisForAccess\",\n \"text\": \"Basis for Access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\",\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\"\n }\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_relationship\",\n \"text\": \"Relationship\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"SPS\",\n \"display\": \"Spouse\"\n }\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient\",\n \"text\": \"Patient details\",\n \"item\": [\n {\n \"linkId\": \"patient_identifier\",\n \"text\": \"NHS number\",\n \"answer\": [\n {\n \"valueString\": \"9000000009\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess\",\n \"text\": \"Requested access\",\n \"item\": [\n {\n \"linkId\": \"requestedAccess_accessLevel\",\n \"text\": \"Requested access level\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"APPT\",\n \"display\": \"Appointment Booking\"\n }\n },\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"VACC\",\n \"display\": \"Vaccination Records\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccess\",\n \"text\": \"Reason for access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-ReasonForAccess\",\n \"code\": \"PRAC\",\n \"display\": \"Practical Reasons\"\n }\n }\n ]\n }\n ]\n }\n ]\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/QuestionnaireResponse", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "QuestionnaireResponse" - ] - }, - "description": "Example of an adult to adult access request where the patient is the applicant with the reference code returned" - }, - "response": [] - } - ], - "description": "The POST Questionnaire Response endpoint is used to submit a proxy access request for a given performer and patient.\n\nIt is indended to be used by user facing service e.g. Proxy Access Service, who will collect the necessary information from the user and submit it to VRS as a QuestionnaireResponse.\n\nThis folder contains requests covering different scenarios of valid and invalid requests.\n\nFor more details, please refer to the [POST Questionnaire Response OAS page for the Validated Relationship Service on the NHS England website.](https://digital.nhs.uk/developer/api-catalogue/validated-relationship-service#post-/QuestionnaireResponse)", - "event": [ - { - "listen": "prerequest", - "script": { - "type": "text/javascript", - "exec": [ - "" - ] - } - }, - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "" - ] - } - } - ] - }, - { - "name": "Get verified candidate relationship (Related Person)", - "item": [ - { - "name": "List relationship", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"entry\": [", - " {", - " \"fullUrl\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/BE974742\",", - " \"resource\": {", - " \"id\": \"BE974742\",", - " \"birthDate\": \"2017-09-23\",", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000017\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000009\"", - " }", - " },", - " \"name\": [", - " {", - " \"family\": \"MOGAJI\",", - " \"given\": [", - " \"GADIL\"", - " ],", - " \"period\": {", - " \"start\": \"2021-07-08\"", - " },", - " \"prefix\": [", - " \"MR\"", - " ],", - " \"use\": \"usual\"", - " }", - " ],", - " \"relationship\": [", - " {", - " \"coding\": [", - " {", - " \"code\": \"MTH\",", - " \"display\": \"mother\",", - " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\"", - " }", - " ]", - " }", - " ],", - " \"resourceType\": \"RelatedPerson\"", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/A3CC67E2\",", - " \"resource\": {", - " \"id\": \"A3CC67E2\",", - " \"birthDate\": \"2018-04-27\",", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000017\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000025\"", - " }", - " },", - " \"name\": [", - " {", - " \"family\": \"FEARON\",", - " \"given\": [", - " \"Daren\"", - " ],", - " \"period\": {", - " \"start\": \"2018-09-21\"", - " },", - " \"prefix\": [", - " \"MR\"", - " ],", - " \"use\": \"usual\"", - " }", - " ],", - " \"relationship\": [", - " {", - " \"coding\": [", - " {", - " \"code\": \"MTH\",", - " \"display\": \"mother\",", - " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\"", - " }", - " ]", - " }", - " ],", - " \"resourceType\": \"RelatedPerson\"", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " }", - " ],", - " \"link\": [", - " {", - " \"relation\": \"self\",", - " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson?identifier=9000000017\"", - " }", - " ],", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2024-01-01T00:00:00+00:00\",", - " \"total\": 2,", - " \"type\": \"searchset\"", - "};", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "d967f4c9-8e83-4930-97ab-ae4e122d8ca5", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "8717c840-c222-4f84-a880-45bc129f8382", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/RelatedPerson?identifier=9000000017", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "RelatedPerson" - ], - "query": [ - { - "key": "identifier", - "value": "9000000017" - } - ] - }, - "description": "Retrieves a list of validated relationships for a given NHS number." - }, - "response": [] - }, - { - "name": "List relationship and include patient's details", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"entry\": [", - " {", - " \"fullUrl\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9000000009\",", - " \"resource\": {", - " \"birthDate\": \"2017-09-23\",", - " \"id\": \"9000000009\",", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000009\"", - " }", - " ],", - " \"name\": [", - " {", - " \"family\": \"MOGAJI\",", - " \"given\": [", - " \"GADIL\"", - " ],", - " \"period\": {", - " \"start\": \"2021-07-08\"", - " },", - " \"prefix\": [", - " \"MR\"", - " ],", - " \"use\": \"usual\"", - " }", - " ],", - " \"resourceType\": \"Patient\"", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/BE974742\",", - " \"resource\": {", - " \"id\": \"BE974742\",", - " \"birthDate\": \"2017-09-23\",", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000017\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000009\"", - " }", - " },", - " \"name\": [", - " {", - " \"family\": \"MOGAJI\",", - " \"given\": [", - " \"GADIL\"", - " ],", - " \"period\": {", - " \"start\": \"2021-07-08\"", - " },", - " \"prefix\": [", - " \"MR\"", - " ],", - " \"use\": \"usual\"", - " }", - " ],", - " \"relationship\": [", - " {", - " \"coding\": [", - " {", - " \"code\": \"MTH\",", - " \"display\": \"mother\",", - " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\"", - " }", - " ]", - " }", - " ],", - " \"resourceType\": \"RelatedPerson\"", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9000000025\",", - " \"resource\": {", - " \"birthDate\": \"2018-04-27\",", - " \"id\": \"9000000025\",", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000025\"", - " }", - " ],", - " \"name\": [", - " {", - " \"family\": \"FEARON\",", - " \"given\": [", - " \"Daren\"", - " ],", - " \"period\": {", - " \"start\": \"2018-09-21\"", - " },", - " \"prefix\": [", - " \"MR\"", - " ],", - " \"use\": \"usual\"", - " }", - " ],", - " \"resourceType\": \"Patient\"", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/A3CC67E2\",", - " \"resource\": {", - " \"id\": \"A3CC67E2\",", - " \"birthDate\": \"2018-04-27\",", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000017\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000025\"", - " }", - " },", - " \"name\": [", - " {", - " \"family\": \"FEARON\",", - " \"given\": [", - " \"Daren\"", - " ],", - " \"period\": {", - " \"start\": \"2018-09-21\"", - " },", - " \"prefix\": [", - " \"MR\"", - " ],", - " \"use\": \"usual\"", - " }", - " ],", - " \"relationship\": [", - " {", - " \"coding\": [", - " {", - " \"code\": \"MTH\",", - " \"display\": \"mother\",", - " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\"", - " }", - " ]", - " }", - " ],", - " \"resourceType\": \"RelatedPerson\"", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " }", - " ],", - " \"link\": [", - " {", - " \"relation\": \"self\",", - " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson?identifier=9000000017&_include=RelatedPerson:patient\"", - " }", - " ],", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2024-01-01T00:00:00+00:00\",", - " \"total\": 2,", - " \"type\": \"searchset\"", - "};", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "d967f4c9-8e83-4930-97ab-ae4e122d8ca5", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "8717c840-c222-4f84-a880-45bc129f8382", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/RelatedPerson?identifier=9000000017&_include=RelatedPerson:patient", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "RelatedPerson" - ], - "query": [ - { - "key": "identifier", - "value": "9000000017" - }, - { - "key": "_include", - "value": "RelatedPerson:patient" - } - ] - }, - "description": "Retrieves a list of validated relationships for a given NHS number with additional patient information." - }, - "response": [] - }, - { - "name": "List Relationship and no relationships returned", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"link\": [", - " {", - " \"relation\": \"self\",", - " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships-service-api/FHIR/R4/RelatedPerson?identifier=9000000033\"", - " }", - " ],", - " \"timestamp\": \"2024-01-01T00:00:00+00:00\",", - " \"total\": 0,", - " \"type\": \"searchset\",", - " \"resourceType\": \"Bundle\"", - "};", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "d967f4c9-8e83-4930-97ab-ae4e122d8ca5", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "8717c840-c222-4f84-a880-45bc129f8382", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/RelatedPerson?identifier=9000000033", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "RelatedPerson" - ], - "query": [ - { - "key": "identifier", - "value": "9000000033" - } - ] - }, - "description": "Example of a response where the given NHS numbers do not have a relationship." - }, - "response": [] - }, - { - "name": "Verify relationship between proxy and patient", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2024-01-01T00:00:00+00:00\",", - " \"total\": 1,", - " \"type\": \"searchset\",", - " \"entry\": [", - " {", - " \"fullUrl\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/BE974742\",", - " \"resource\": {", - " \"id\": \"BE974742\",", - " \"birthDate\": \"2017-09-23\",", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000009\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000017\"", - " }", - " },", - " \"name\": [", - " {", - " \"family\": \"MOGAJI\",", - " \"given\": [", - " \"GADIL\"", - " ],", - " \"period\": {", - " \"start\": \"2021-07-08\"", - " },", - " \"prefix\": [", - " \"MR\"", - " ],", - " \"use\": \"usual\"", - " }", - " ],", - " \"relationship\": [", - " {", - " \"coding\": [", - " {", - " \"code\": \"MTH\",", - " \"display\": \"mother\",", - " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\"", - " }", - " ]", - " }", - " ],", - " \"resourceType\": \"RelatedPerson\"", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " }", - " ],", - " \"link\": [", - " {", - " \"relation\": \"self\",", - " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson?patient:identifier=9000000009&identifier=9000000017\"", - " }", - " ]", - "};", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "d967f4c9-8e83-4930-97ab-ae4e122d8ca5", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "8717c840-c222-4f84-a880-45bc129f8382", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/RelatedPerson?identifier=9000000017&patient:identifier=9000000009", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "RelatedPerson" - ], - "query": [ - { - "key": "identifier", - "value": "9000000017" - }, - { - "key": "patient:identifier", - "value": "9000000009" - } - ] - }, - "description": "Retrieves information about the relationship between the given NHS numbers" - }, - "response": [] - }, - { - "name": "Verify relationship between proxy and patient and include patient's details", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2024-01-01T00:00:00+00:00\",", - " \"total\": 1,", - " \"type\": \"searchset\",", - " \"link\": [", - " {", - " \"relation\": \"self\",", - " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson?patient:identifier=9000000009&identifier=9000000017&_include=RelatedPerson:patient\"", - " }", - " ],", - " \"entry\": [", - " {", - " \"fullUrl\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9000000009\",", - " \"resource\": {", - " \"birthDate\": \"2017-09-23\",", - " \"id\": \"9000000009\",", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000009\"", - " }", - " ],", - " \"name\": [", - " {", - " \"family\": \"MOGAJI\",", - " \"given\": [", - " \"GADIL\"", - " ],", - " \"period\": {", - " \"start\": \"2021-07-08\"", - " },", - " \"prefix\": [", - " \"MR\"", - " ],", - " \"use\": \"usual\"", - " }", - " ],", - " \"resourceType\": \"Patient\"", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/BE974742\",", - " \"resource\": {", - " \"id\": \"BE974742\",", - " \"birthDate\": \"2017-09-23\",", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000009\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000017\"", - " }", - " },", - " \"name\": [", - " {", - " \"family\": \"MOGAJI\",", - " \"given\": [", - " \"GADIL\"", - " ],", - " \"period\": {", - " \"start\": \"2021-07-08\"", - " },", - " \"prefix\": [", - " \"MR\"", - " ],", - " \"use\": \"usual\"", - " }", - " ],", - " \"relationship\": [", - " {", - " \"coding\": [", - " {", - " \"code\": \"MTH\",", - " \"display\": \"mother\",", - " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\"", - " }", - " ]", - " }", - " ],", - " \"resourceType\": \"RelatedPerson\"", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " }", - " ]", - "};", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "d967f4c9-8e83-4930-97ab-ae4e122d8ca5", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "8717c840-c222-4f84-a880-45bc129f8382", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/RelatedPerson?identifier=9000000017&patient:identifier=9000000009&_include=RelatedPerson:patient", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "RelatedPerson" - ], - "query": [ - { - "key": "identifier", - "value": "9000000017" - }, - { - "key": "patient:identifier", - "value": "9000000009" - }, - { - "key": "_include", - "value": "RelatedPerson:patient" - } - ] - }, - "description": "Retrieves information about the relationship between the given NHS numbers including the patient details" - }, - "response": [] - }, - { - "name": "Missing identifier", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"issue\": [", - " {", - " \"code\": \"invalid\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"code\": \"MISSING_IDENTIFIER_VALUE\",", - " \"display\": \"Missing RelatedPerson NHS number.\",", - " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", - " \"version\": \"1\"", - " }", - " ]", - " },", - " \"diagnostics\": \"The 'identifier' parameter is required\",", - " \"severity\": \"error\"", - " }", - " ],", - " \"resourceType\": \"OperationOutcome\"", - "};", - "", - "const responseJson = pm.response.json();", - "", - "pm.test(\"Status code is 400\", function () {", - " pm.response.to.have.status(400);", - "});", - "", - "pm.test(\"Should have correct error response\", () => {", - " pm.expect(responseJson.issue[0].details.coding[0].code).to.eql(\"MISSING_IDENTIFIER_VALUE\");", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "d967f4c9-8e83-4930-97ab-ae4e122d8ca5", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "8717c840-c222-4f84-a880-45bc129f8382", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/RelatedPerson", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "RelatedPerson" - ] - }, - "description": "Example of an error response when the NHS number is missing" - }, - "response": [] - }, - { - "name": "Invalid identifier", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "var expectedResponseBody = {", - " \"issue\": [", - " {", - " \"code\": \"invalid\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"code\": \"INVALID_IDENTIFIER_VALUE\",", - " \"display\": \"Provided value is invalid\",", - " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", - " \"version\": \"1\"", - " }", - " ]", - " },", - " \"diagnostics\": \"Not a valid NHS Number provided for the 'identifier' parameter\",", - " \"expression\": [", - " \"RelatedPerson.identifier\"", - " ],", - " \"severity\": \"error\"", - " }", - " ],", - " \"resourceType\": \"OperationOutcome\"", - "}", - "", - "const responseJson = pm.response.json();", - "", - "pm.test(\"Status code is 400\", function () {", - " pm.response.to.have.status(400);", - "});", - "", - "pm.test(\"Should have correct error response\", () => {", - " pm.expect(responseJson.issue[0].details.coding[0].code).to.eql(\"INVALID_IDENTIFIER_VALUE\");", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "d967f4c9-8e83-4930-97ab-ae4e122d8ca5", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "8717c840-c222-4f84-a880-45bc129f8382", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/RelatedPerson?identifier=900000000", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "RelatedPerson" - ], - "query": [ - { - "key": "identifier", - "value": "900000000" - } - ] - }, - "description": "Example of an error raised when the specified NHS number is not valid." - }, - "response": [] - }, - { - "name": "Invalid identifier system", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "var expectedResponseBody = {", - " \"issue\": [", - " {", - " \"code\": \"invalid\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"code\": \"INVALID_IDENTIFIER_SYSTEM\",", - " \"display\": \"Invalid identifier system.\",", - " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", - " \"version\": \"1\"", - " }", - " ]", - " },", - " \"diagnostics\": \"The identifier system is not valid.\",", - " \"severity\": \"error\"", - " }", - " ],", - " \"resourceType\": \"OperationOutcome\"", - "}", - "", - "const responseJson = pm.response.json();", - "", - "pm.test(\"Status code is 400\", function () {", - " pm.response.to.have.status(400);", - "});", - "", - "pm.test(\"Should have correct error response\", () => {", - " pm.expect(responseJson.issue[0].details.coding[0].code).to.eql(\"INVALID_IDENTIFIER_SYSTEM\");", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "d967f4c9-8e83-4930-97ab-ae4e122d8ca5", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "8717c840-c222-4f84-a880-45bc129f8382", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/RelatedPerson?identifier=https://fhir.nhs.uk/Id/nhs-number|A730675929", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "RelatedPerson" - ], - "query": [ - { - "key": "identifier", - "value": "https://fhir.nhs.uk/Id/nhs-number|A730675929" - } - ] - }, - "description": "Example of an error response when the given NHS number uses a different identifier system" - }, - "response": [] - }, - { - "name": "Identifier not supported", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"issue\": [", - " {", - " \"code\": \"processing\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"code\": \"INVALIDATED_RESOURCE\",", - " \"display\": \"Resource that has been marked as invalid was requested - invalid resources cannot be retrieved\",", - " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", - " \"version\": \"1\"", - " }", - " ]", - " },", - " \"diagnostics\": \"Resource that has been marked as invalid was requested - invalid resources cannot be retrieved\",", - " \"severity\": \"error\"", - " }", - " ],", - " \"resourceType\": \"OperationOutcome\"", - "};", - "", - "const responseJson = pm.response.json();", - "", - "pm.test(\"Status code is 404\", function () {", - " pm.response.to.have.status(404);", - "});", - "", - "pm.test(\"Should have correct error response\", () => {", - " pm.expect(responseJson.issue[0].details.coding[0].code).to.eql(\"INVALIDATED_RESOURCE\");", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "d967f4c9-8e83-4930-97ab-ae4e122d8ca5", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "8717c840-c222-4f84-a880-45bc129f8382", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/RelatedPerson?identifier=1000000001", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "RelatedPerson" - ], - "query": [ - { - "key": "identifier", - "value": "1000000001" - } - ] - }, - "description": "Example of an error response when the given NHS number is not supported by the sandbox" - }, - "response": [] - }, - { - "name": "No matching record", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"issue\": [", - " {", - " \"code\": \"processing\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"code\": \"INVALIDATED_RESOURCE\",", - " \"display\": \"Resource that has been marked as invalid was requested - invalid resources cannot be retrieved\",", - " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", - " \"version\": \"1\"", - " }", - " ]", - " },", - " \"diagnostics\": \"Resource that has been marked as invalid was requested - invalid resources cannot be retrieved\",", - " \"severity\": \"error\"", - " }", - " ],", - " \"resourceType\": \"OperationOutcome\"", - "};", - "", - "const responseJson = pm.response.json();", - "", - "pm.test(\"Status code is 404\", function () {", - " pm.response.to.have.status(404);", - "});", - "", - "pm.test(\"Should have correct error response\", () => {", - " pm.expect(responseJson.issue[0].details.coding[0].code).to.eql(\"INVALIDATED_RESOURCE\");", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "d967f4c9-8e83-4930-97ab-ae4e122d8ca5", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "8717c840-c222-4f84-a880-45bc129f8382", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/RelatedPerson?identifier=9000000041", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "RelatedPerson" - ], - "query": [ - { - "key": "identifier", - "value": "9000000041" - } - ] - }, - "description": "Example of a response where the given NHS number does not have any validated relationships." - }, - "response": [] - } - ], - "description": "The GET Related Person endpoint retrieves candidate proxy relationships for a user with a given NHS Number.\n\nThis endpoint should NOT be used to retrieve proxy relationships; these should be queried from the `/Consent` endpoint.\n\nThis folder contains requests covering different scenarios of valid and invalid requests.\n\nFor more details, please refer to the [GET Related Person OAS page for the Validated Relationship Service on the NHS England website.](https://digital.nhs.uk/developer/api-catalogue/validated-relationship-service#get-/RelatedPerson)" - }, - { - "name": "Get proxy roles (Consent)", - "item": [ - { - "name": "Filtered proxy relationships by 'active' status include details", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", - " \"total\": 2,", - " \"type\": \"searchset\",", - " \"link\": [", - " {", - " \"relation\": \"self\",", - " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000017&status=active&_include=Consent:performer&_include=Consent:patient\"", - " }", - " ],", - " \"entry\": [", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/BE974742\",", - " \"resource\": {", - " \"resourceType\": \"RelatedPerson\",", - " \"id\": \"BE974742\",", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000017\"", - " },", - " {", - " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", - " \"value\": \"ABC0000003\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000017\"", - " }", - " },", - " \"relationship\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", - " \"code\": \"PRN\",", - " \"display\": \"parent\"", - " }", - " ]", - " },", - " {", - " \"coding\": [", - " {", - " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", - " \"code\": \"MTH\",", - " \"display\": \"mother\"", - " }", - " ]", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/A3CC67E2\",", - " \"resource\": {", - " \"resourceType\": \"Patient\",", - " \"id\": \"A3CC67E2\",", - " \"meta\": {", - " \"security\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\",", - " \"code\": \"P9\",", - " \"display\": \"High level verification (P9)\"", - " }", - " ]", - " },", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000009\"", - " },", - " {", - " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", - " \"value\": \"ABC1234567\"", - " }", - " ],", - " \"name\": [", - " {", - " \"use\": \"usual\",", - " \"period\": {", - " \"start\": \"2020-01-01\",", - " \"end\": \"2021-12-31\"", - " },", - " \"given\": [", - " \"Jane Marie Anne\"", - " ],", - " \"family\": \"Smith\",", - " \"prefix\": [", - " \"Mrs\"", - " ],", - " \"suffix\": [", - " \"MBE\",", - " \"PhD\"", - " ]", - " }", - " ],", - " \"birthDate\": \"2022-10-22\",", - " \"generalPractitioner\": [", - " {", - " \"identifier\": {", - " \"value\": \"ODS12345\",", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBCC67E9\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"BBCC67E9\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"Information Access\"", - " }", - " ],", - " \"text\": \"Information Access Consent\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000009\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"actor\": [", - " {", - " \"reference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000017\"", - " }", - " },", - " \"role\": {", - " \"coding\": [", - " {", - " \"code\": \"parental-responsibility\",", - " \"display\": \"Parental responsibility\",", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"", - " }", - " ]", - " }", - " }", - " ],", - " \"period\": {", - " \"end\": \"2026-02-11\",", - " \"start\": \"2025-02-11\"", - " }", - " },", - " \"extension\": [", - " {", - " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",", - " \"code\": \"ROLE_CREATED\",", - " \"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\": \"9000000017\"", - " }", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/RP974720\",", - " \"resource\": {", - " \"resourceType\": \"RelatedPerson\",", - " \"id\": \"RP974720\",", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000017\"", - " },", - " {", - " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", - " \"value\": \"ABC0000003\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000005\"", - " }", - " },", - " \"relationship\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\",", - " \"code\": \"Personal\",", - " \"display\": \"Personal relationship with the patient\"", - " }", - " ]", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/DFCC67F5\",", - " \"resource\": {", - " \"resourceType\": \"Patient\",", - " \"id\": \"DFCC67F5\",", - " \"meta\": {", - " \"security\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\",", - " \"code\": \"P9\",", - " \"display\": \"High level verification (P9)\"", - " }", - " ]", - " },", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000005\"", - " },", - " {", - " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", - " \"value\": \"ABC9999999\"", - " }", - " ],", - " \"name\": [", - " {", - " \"use\": \"usual\",", - " \"period\": {", - " \"start\": \"2020-01-01\",", - " \"end\": \"2021-12-31\"", - " },", - " \"given\": [", - " \"Sally\"", - " ],", - " \"family\": \"Evans\",", - " \"prefix\": [", - " \"Mrs\"", - " ]", - " }", - " ],", - " \"birthDate\": \"1995-10-22\",", - " \"generalPractitioner\": [", - " {", - " \"identifier\": {", - " \"value\": \"ODS12345\",", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/WWCC67T1\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"WWCC67T1\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"Information Access\"", - " }", - " ],", - " \"text\": \"Information Access Consent\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000005\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"actor\": [", - " {", - " \"reference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000017\"", - " }", - " },", - " \"role\": {", - " \"coding\": [", - " {", - " \"code\": \"parental-responsibility\",", - " \"display\": \"Parental responsibility\",", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"", - " }", - " ]", - " }", - " }", - " ],", - " \"period\": {", - " \"end\": \"2026-02-11\",", - " \"start\": \"2025-02-11\"", - " }", - " },", - " \"extension\": [", - " {", - " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",", - " \"code\": \"ROLE_CREATED\",", - " \"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\": \"9000000017\"", - " }", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " }", - " ]", - "}", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - }, - { - "listen": "prerequest", - "script": { - "exec": [ - "" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "protocolProfileBehavior": { - "disableBodyPruning": true - }, - "request": { - "method": "GET", - "header": [], - "body": { - "mode": "raw", - "raw": "", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9000000017&status=active&_include=Consent:performer&_include=Consent:patient", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9000000017" - }, - { - "key": "status", - "value": "active" - }, - { - "key": "_include", - "value": "Consent:performer" - }, - { - "key": "_include", - "value": "Consent:patient" - } - ] - } - }, - "response": [] - }, - { - "name": "Filtered proxy relationships by 'inactive' status", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", - " \"total\": 2,", - " \"type\": \"searchset\",", - " \"link\": [", - " {", - " \"relation\": \"self\",", - " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000017&status=inactive\"", - " }", - " ],", - " \"entry\": [", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/AATD11A1\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"AATD11A1\",", - " \"status\": \"inactive\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"Information Access\"", - " }", - " ],", - " \"text\": \"Information Access Consent\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000006\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"actor\": [", - " {", - " \"reference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000017\"", - " }", - " },", - " \"role\": {", - " \"coding\": [", - " {", - " \"code\": \"parental-responsibility\",", - " \"display\": \"Parental responsibility\",", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"", - " }", - " ]", - " }", - " }", - " ],", - " \"period\": {", - " \"end\": \"2026-02-11\",", - " \"start\": \"2025-02-11\"", - " }", - " },", - " \"extension\": [", - " {", - " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",", - " \"code\": \"ROLE_DEACTIVATED_END_DATE_REACHED\",", - " \"display\": \"End-date reached\"", - " }", - " ]", - " }", - " },", - " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", - " \"valueReference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000017\"", - " }", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/ABCD12B3\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"ABCD12B3\",", - " \"status\": \"inactive\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"Information Access\"", - " }", - " ],", - " \"text\": \"Information Access Consent\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000007\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"actor\": [", - " {", - " \"reference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000017\"", - " }", - " },", - " \"role\": {", - " \"coding\": [", - " {", - " \"code\": \"parental-responsibility\",", - " \"display\": \"Parental responsibility\",", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"", - " }", - " ]", - " }", - " }", - " ],", - " \"period\": {", - " \"end\": \"2026-02-11\",", - " \"start\": \"2025-02-11\"", - " }", - " },", - " \"extension\": [", - " {", - " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"http://terminology.hl7.org/CodeSystem/consent-reason\",", - " \"code\": \"OTHER\",", - " \"display\": \"Other\"", - " }", - " ],", - " \"text\": \"Patient would not respond to phone calls\"", - " }", - " },", - " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", - " \"valueReference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000017\"", - " }", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " }", - " ]", - "}", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - }, - { - "listen": "prerequest", - "script": { - "exec": [ - "" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9000000017&status=inactive", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9000000017" - }, - { - "key": "status", - "value": "inactive" - } - ] - } - }, - "response": [] - }, - { - "name": "Filtered proxy relationships by 'proposed' and 'active' status", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", - " \"total\": 4,", - " \"type\": \"searchset\",", - " \"link\": [", - " {", - " \"relation\": \"self\",", - " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000017&status=proposed&status=active&_include=Consent:patient\"", - " }", - " ],", - " \"entry\": [", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBCC67E9\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"BBCC67E9\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"Information Access\"", - " }", - " ],", - " \"text\": \"Information Access Consent\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000009\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"actor\": [", - " {", - " \"reference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000017\"", - " }", - " },", - " \"role\": {", - " \"coding\": [", - " {", - " \"code\": \"parental-responsibility\",", - " \"display\": \"Parental responsibility\",", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"", - " }", - " ]", - " }", - " }", - " ],", - " \"period\": {", - " \"end\": \"2026-02-11\",", - " \"start\": \"2025-02-11\"", - " }", - " },", - " \"extension\": [", - " {", - " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",", - " \"code\": \"ROLE_CREATED\",", - " \"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\": \"9000000017\"", - " }", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/WWCC67T1\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"WWCC67T1\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"Information Access\"", - " }", - " ],", - " \"text\": \"Information Access Consent\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000005\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"actor\": [", - " {", - " \"reference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000017\"", - " }", - " },", - " \"role\": {", - " \"coding\": [", - " {", - " \"code\": \"parental-responsibility\",", - " \"display\": \"Parental responsibility\",", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"", - " }", - " ]", - " }", - " }", - " ],", - " \"period\": {", - " \"end\": \"2026-02-11\",", - " \"start\": \"2025-02-11\"", - " }", - " },", - " \"extension\": [", - " {", - " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",", - " \"code\": \"ROLE_CREATED\",", - " \"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\": \"9000000017\"", - " }", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBGY55L2\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"BBGY55L2\",", - " \"status\": \"proposed\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"Information Access\"", - " }", - " ],", - " \"text\": \"Information Access Consent\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000020\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"actor\": [", - " {", - " \"reference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000017\"", - " }", - " },", - " \"role\": {", - " \"coding\": [", - " {", - " \"code\": \"parental-responsibility\",", - " \"display\": \"Parental responsibility\",", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"", - " }", - " ]", - " }", - " }", - " ],", - " \"period\": {", - " \"end\": \"2026-02-11\",", - " \"start\": \"2025-02-11\"", - " }", - " },", - " \"extension\": [", - " {", - " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",", - " \"code\": \"APPLICATION_SUBMITTED\",", - " \"display\": \"Application submitted online\"", - " }", - " ]", - " }", - " },", - " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", - " \"valueReference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000017\"", - " }", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/EFGH12C5\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"EFGH12C5\",", - " \"status\": \"proposed\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"Information Access\"", - " }", - " ],", - " \"text\": \"Information Access Consent\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000021\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"actor\": [", - " {", - " \"reference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000017\"", - " }", - " },", - " \"role\": {", - " \"coding\": [", - " {", - " \"code\": \"parental-responsibility\",", - " \"display\": \"Parental responsibility\",", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"", - " }", - " ]", - " }", - " }", - " ],", - " \"period\": {", - " \"end\": \"2026-02-11\",", - " \"start\": \"2025-02-11\"", - " }", - " },", - " \"extension\": [", - " {", - " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",", - " \"code\": \"APPLICATION_SUBMITTED\",", - " \"display\": \"Application submitted online\"", - " }", - " ]", - " }", - " },", - " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", - " \"valueReference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000017\"", - " }", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " }", - " ]", - "}", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9000000017&status=proposed&status=active&_include=Consent:patient", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9000000017" - }, - { - "key": "status", - "value": "proposed" - }, - { - "key": "status", - "value": "active" - }, - { - "key": "_include", - "value": "Consent:patient" - } - ] - } - }, - "response": [] - }, - { - "name": "Multiple proxy relationships", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", - " \"total\": 3,", - " \"type\": \"searchset\",", - " \"link\": [", - " {", - " \"relation\": \"self\",", - " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000022\"", - " }", - " ],", - " \"entry\": [", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBCC67E9\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"BBCC67E9\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"Information Access\"", - " }", - " ],", - " \"text\": \"Information Access Consent\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000009\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"actor\": [", - " {", - " \"reference\": {", - " \"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\"", - " }", - " },", - " \"extension\": [", - " {", - " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",", - " \"code\": \"ROLE_CREATED\",", - " \"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\": \"9000000022\"", - " }", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/WWCC67T1\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"WWCC67T1\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"Information Access\"", - " }", - " ],", - " \"text\": \"Information Access Consent\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000005\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"actor\": [", - " {", - " \"reference\": {", - " \"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\"", - " }", - " },", - " \"extension\": [", - " {", - " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",", - " \"code\": \"ROLE_CREATED\",", - " \"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\": \"9000000022\"", - " }", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/AATD11A1\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"AATD11A1\",", - " \"status\": \"inactive\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"Information Access\"", - " }", - " ],", - " \"text\": \"Information Access Consent\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000006\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"actor\": [", - " {", - " \"reference\": {", - " \"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\"", - " }", - " },", - " \"extension\": [", - " {", - " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",", - " \"code\": \"ROLE_DEACTIVATED_END_DATE_REACHED\",", - " \"display\": \"End-date reached\"", - " }", - " ]", - " }", - " },", - " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", - " \"valueReference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000022\"", - " }", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " }", - " ]", - "}", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9000000022", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9000000022" - } - ] - } - }, - "response": [] - }, - { - "name": "Multiple proxy relationships include patient", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", - " \"total\": 3,", - " \"type\": \"searchset\",", - " \"link\": [", - " {", - " \"relation\": \"self\",", - " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000022&_include=Consent:patient\"", - " }", - " ],", - " \"entry\": [", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/A3CC67E2\",", - " \"resource\": {", - " \"resourceType\": \"Patient\",", - " \"id\": \"A3CC67E2\",", - " \"meta\": {", - " \"security\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\",", - " \"code\": \"P9\",", - " \"display\": \"High level verification (P9)\"", - " }", - " ]", - " },", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000009\"", - " },", - " {", - " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", - " \"value\": \"ABC1234567\"", - " }", - " ],", - " \"name\": [", - " {", - " \"use\": \"usual\",", - " \"period\": {", - " \"start\": \"2020-01-01\",", - " \"end\": \"2021-12-31\"", - " },", - " \"given\": [", - " \"Jane Marie Anne\"", - " ],", - " \"family\": \"Smith\",", - " \"prefix\": [", - " \"Mrs\"", - " ],", - " \"suffix\": [", - " \"MBE\",", - " \"PhD\"", - " ]", - " }", - " ],", - " \"birthDate\": \"2022-10-22\",", - " \"generalPractitioner\": [", - " {", - " \"identifier\": {", - " \"value\": \"ODS12345\",", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBCC67E9\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"BBCC67E9\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"Information Access\"", - " }", - " ],", - " \"text\": \"Information Access Consent\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000009\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"actor\": [", - " {", - " \"reference\": {", - " \"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\"", - " }", - " },", - " \"extension\": [", - " {", - " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",", - " \"code\": \"ROLE_CREATED\",", - " \"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\": \"9000000022\"", - " }", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/DFCC67F5\",", - " \"resource\": {", - " \"resourceType\": \"Patient\",", - " \"id\": \"DFCC67F5\",", - " \"meta\": {", - " \"security\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\",", - " \"code\": \"P9\",", - " \"display\": \"High level verification (P9)\"", - " }", - " ]", - " },", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000005\"", - " },", - " {", - " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", - " \"value\": \"ABC9999999\"", - " }", - " ],", - " \"name\": [", - " {", - " \"use\": \"usual\",", - " \"period\": {", - " \"start\": \"2020-01-01\",", - " \"end\": \"2021-12-31\"", - " },", - " \"given\": [", - " \"Sally\"", - " ],", - " \"family\": \"Evans\",", - " \"prefix\": [", - " \"Mrs\"", - " ]", - " }", - " ],", - " \"birthDate\": \"1995-10-22\",", - " \"generalPractitioner\": [", - " {", - " \"identifier\": {", - " \"value\": \"ODS12345\",", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/WWCC67T1\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"WWCC67T1\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"Information Access\"", - " }", - " ],", - " \"text\": \"Information Access Consent\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000005\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"actor\": [", - " {", - " \"reference\": {", - " \"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\"", - " }", - " },", - " \"extension\": [", - " {", - " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",", - " \"code\": \"ROLE_CREATED\",", - " \"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\": \"9000000022\"", - " }", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/ZPTT32T3\",", - " \"resource\": {", - " \"resourceType\": \"Patient\",", - " \"id\": \"ZPTT32T3\",", - " \"meta\": {", - " \"security\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\",", - " \"code\": \"P9\",", - " \"display\": \"High level verification (P9)\"", - " }", - " ]", - " },", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000006\"", - " },", - " {", - " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", - " \"value\": \"ABC9999999\"", - " }", - " ],", - " \"name\": [", - " {", - " \"use\": \"usual\",", - " \"period\": {", - " \"start\": \"2020-01-01\",", - " \"end\": \"2021-12-31\"", - " },", - " \"given\": [", - " \"Michael\"", - " ],", - " \"family\": \"Percy\",", - " \"prefix\": [", - " \"Mr\"", - " ]", - " }", - " ],", - " \"birthDate\": \"1991-1-13\",", - " \"generalPractitioner\": [", - " {", - " \"identifier\": {", - " \"value\": \"ODS12345\",", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/AATD11A1\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"AATD11A1\",", - " \"status\": \"inactive\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"Information Access\"", - " }", - " ],", - " \"text\": \"Information Access Consent\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000006\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T1T32:28Z\",", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"actor\": [", - " {", - " \"reference\": {", - " \"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\"", - " }", - " },", - " \"extension\": [", - " {", - " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",", - " \"code\": \"ROLE_DEACTIVATED_END_DATE_REACHED\",", - " \"display\": \"End-date reached\"", - " }", - " ]", - " }", - " },", - " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", - " \"valueReference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000022\"", - " }", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " }", - " ]", - "}", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9000000022&_include=Consent:patient", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9000000022" - }, - { - "key": "_include", - "value": "Consent:patient" - } - ] - } - }, - "response": [] - }, - { - "name": "Multiple proxy relationships include performer", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", - " \"total\": 3,", - " \"type\": \"searchset\",", - " \"link\": [", - " {", - " \"relation\": \"self\",", - " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000022&_include=Consent:performer\"", - " }", - " ],", - " \"entry\": [", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/BE974742\",", - " \"resource\": {", - " \"resourceType\": \"RelatedPerson\",", - " \"id\": \"BE974742\",", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000022\"", - " },", - " {", - " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", - " \"value\": \"ABC0000003\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000009\"", - " }", - " },", - " \"relationship\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", - " \"code\": \"PRN\",", - " \"display\": \"parent\"", - " }", - " ]", - " },", - " {", - " \"coding\": [", - " {", - " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", - " \"code\": \"MTH\",", - " \"display\": \"mother\"", - " }", - " ]", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBCC67E9\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"BBCC67E9\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"Information Access\"", - " }", - " ],", - " \"text\": \"Information Access Consent\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000009\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"actor\": [", - " {", - " \"reference\": {", - " \"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\"", - " }", - " },", - " \"extension\": [", - " {", - " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",", - " \"code\": \"ROLE_CREATED\",", - " \"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\": \"9000000022\"", - " }", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/RP974720\",", - " \"resource\": {", - " \"resourceType\": \"RelatedPerson\",", - " \"id\": \"RP974720\",", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000022\"", - " },", - " {", - " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", - " \"value\": \"ABC00000234\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000005\"", - " }", - " },", - " \"relationship\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\",", - " \"code\": \"Personal\",", - " \"display\": \"Personal relationship with the patient\"", - " }", - " ]", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/WWCC67T1\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"WWCC67T1\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"Information Access\"", - " }", - " ],", - " \"text\": \"Information Access Consent\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000005\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"actor\": [", - " {", - " \"reference\": {", - " \"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\"", - " }", - " },", - " \"extension\": [", - " {", - " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",", - " \"code\": \"ROLE_CREATED\",", - " \"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\": \"9000000022\"", - " }", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/AATD11A1\",", - " \"resource\": {", - " \"resourceType\": \"RelatedPerson\",", - " \"id\": \"AATD11A1\",", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000022\"", - " },", - " {", - " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", - " \"value\": \"ABC0000001\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000006\"", - " }", - " },", - " \"relationship\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\",", - " \"code\": \"Personal\",", - " \"display\": \"Personal relationship with the patient\"", - " }", - " ]", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/AATD11A1\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"AATD11A1\",", - " \"status\": \"inactive\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"Information Access\"", - " }", - " ],", - " \"text\": \"Information Access Consent\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000006\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"actor\": [", - " {", - " \"reference\": {", - " \"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\"", - " }", - " },", - " \"extension\": [", - " {", - " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",", - " \"code\": \"ROLE_DEACTIVATED_END_DATE_REACHED\",", - " \"display\": \"End-date reached\"", - " }", - " ]", - " }", - " },", - " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", - " \"valueReference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000022\"", - " }", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " }", - " ]", - "}", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9000000022&_include=Consent:performer", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9000000022" - }, - { - "key": "_include", - "value": "Consent:performer" - } - ] - } - }, - "response": [] - }, - { - "name": "Multiple proxy relationships include performer and patient", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", - " \"total\": 3,", - " \"type\": \"searchset\",", - " \"link\": [", - " {", - " \"relation\": \"self\",", - " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000022&_include=Consent:performer&_include=Consent:patient\"", - " }", - " ],", - " \"entry\": [", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/BE974742\",", - " \"resource\": {", - " \"resourceType\": \"RelatedPerson\",", - " \"id\": \"BE974742\",", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000022\"", - " },", - " {", - " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", - " \"value\": \"ABC0000003\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000009\"", - " }", - " },", - " \"relationship\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", - " \"code\": \"PRN\",", - " \"display\": \"parent\"", - " }", - " ]", - " },", - " {", - " \"coding\": [", - " {", - " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", - " \"code\": \"MTH\",", - " \"display\": \"mother\"", - " }", - " ]", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/A3CC67E2\",", - " \"resource\": {", - " \"resourceType\": \"Patient\",", - " \"id\": \"A3CC67E2\",", - " \"meta\": {", - " \"security\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\",", - " \"code\": \"P9\",", - " \"display\": \"High level verification (P9)\"", - " }", - " ]", - " },", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000009\"", - " },", - " {", - " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", - " \"value\": \"ABC1234567\"", - " }", - " ],", - " \"name\": [", - " {", - " \"use\": \"usual\",", - " \"period\": {", - " \"start\": \"2020-01-01\",", - " \"end\": \"2021-12-31\"", - " },", - " \"given\": [", - " \"Jane Marie Anne\"", - " ],", - " \"family\": \"Smith\",", - " \"prefix\": [", - " \"Mrs\"", - " ],", - " \"suffix\": [", - " \"MBE\",", - " \"PhD\"", - " ]", - " }", - " ],", - " \"birthDate\": \"2022-10-22\",", - " \"generalPractitioner\": [", - " {", - " \"identifier\": {", - " \"value\": \"ODS12345\",", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBCC67E9\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"BBCC67E9\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"Information Access\"", - " }", - " ],", - " \"text\": \"Information Access Consent\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000009\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"actor\": [", - " {", - " \"reference\": {", - " \"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\"", - " }", - " },", - " \"extension\": [", - " {", - " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",", - " \"code\": \"ROLE_CREATED\",", - " \"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\": \"9000000022\"", - " }", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/RP974720\",", - " \"resource\": {", - " \"resourceType\": \"RelatedPerson\",", - " \"id\": \"RP974720\",", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000022\"", - " },", - " {", - " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", - " \"value\": \"ABC00000234\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000005\"", - " }", - " },", - " \"relationship\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\",", - " \"code\": \"Personal\",", - " \"display\": \"Personal relationship with the patient\"", - " }", - " ]", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/DFCC67F5\",", - " \"resource\": {", - " \"resourceType\": \"Patient\",", - " \"id\": \"DFCC67F5\",", - " \"meta\": {", - " \"security\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\",", - " \"code\": \"P9\",", - " \"display\": \"High level verification (P9)\"", - " }", - " ]", - " },", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000005\"", - " },", - " {", - " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", - " \"value\": \"ABC9999999\"", - " }", - " ],", - " \"name\": [", - " {", - " \"use\": \"usual\",", - " \"period\": {", - " \"start\": \"2020-01-01\",", - " \"end\": \"2021-12-31\"", - " },", - " \"given\": [", - " \"Sally\"", - " ],", - " \"family\": \"Evans\",", - " \"prefix\": [", - " \"Mrs\"", - " ]", - " }", - " ],", - " \"birthDate\": \"1995-10-22\",", - " \"generalPractitioner\": [", - " {", - " \"identifier\": {", - " \"value\": \"ODS12345\",", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/WWCC67T1\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"WWCC67T1\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"Information Access\"", - " }", - " ],", - " \"text\": \"Information Access Consent\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000005\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"actor\": [", - " {", - " \"reference\": {", - " \"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\"", - " }", - " },", - " \"extension\": [", - " {", - " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",", - " \"code\": \"ROLE_CREATED\",", - " \"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\": \"9000000022\"", - " }", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/AATD11A1\",", - " \"resource\": {", - " \"resourceType\": \"RelatedPerson\",", - " \"id\": \"AATD11A1\",", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000022\"", - " },", - " {", - " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", - " \"value\": \"ABC0000001\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000006\"", - " }", - " },", - " \"relationship\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\",", - " \"code\": \"Personal\",", - " \"display\": \"Personal relationship with the patient\"", - " }", - " ]", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/ZPTT32T3\",", - " \"resource\": {", - " \"resourceType\": \"Patient\",", - " \"id\": \"ZPTT32T3\",", - " \"meta\": {", - " \"security\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\",", - " \"code\": \"P9\",", - " \"display\": \"High level verification (P9)\"", - " }", - " ]", - " },", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000006\"", - " },", - " {", - " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", - " \"value\": \"ABC9999999\"", - " }", - " ],", - " \"name\": [", - " {", - " \"use\": \"usual\",", - " \"period\": {", - " \"start\": \"2020-01-01\",", - " \"end\": \"2021-12-31\"", - " },", - " \"given\": [", - " \"Michael\"", - " ],", - " \"family\": \"Percy\",", - " \"prefix\": [", - " \"Mr\"", - " ]", - " }", - " ],", - " \"birthDate\": \"1991-1-13\",", - " \"generalPractitioner\": [", - " {", - " \"identifier\": {", - " \"value\": \"ODS12345\",", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/AATD11A1\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"AATD11A1\",", - " \"status\": \"inactive\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"Information Access\"", - " }", - " ],", - " \"text\": \"Information Access Consent\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000006\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"actor\": [", - " {", - " \"reference\": {", - " \"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\"", - " }", - " },", - " \"extension\": [", - " {", - " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",", - " \"code\": \"ROLE_DEACTIVATED_END_DATE_REACHED\",", - " \"display\": \"End-date reached\"", - " }", - " ]", - " }", - " },", - " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", - " \"valueReference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000022\"", - " }", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " }", - " ]", - "}", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9000000022&_include=Consent:performer&_include=Consent:patient", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9000000022" - }, - { - "key": "_include", - "value": "Consent:performer" - }, - { - "key": "_include", - "value": "Consent:patient" - } - ] - } - }, - "response": [] - }, - { - "name": "Multiple proxy relationships single patient", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", - " \"total\": 3,", - " \"type\": \"searchset\",", - " \"link\": [", - " {", - " \"relation\": \"self\",", - " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?patient:identifier=9000000100\"", - " }", - " ],", - " \"entry\": [", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBCC67E9\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"BBCC67E9\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"Information Access\"", - " }", - " ],", - " \"text\": \"Information Access Consent\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000100\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"actor\": [", - " {", - " \"reference\": {", - " \"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\"", - " }", - " },", - " \"extension\": [", - " {", - " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",", - " \"code\": \"ROLE_CREATED\",", - " \"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\": \"9000000020\"", - " }", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/WWCC67T1\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"WWCC67T1\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"Information Access\"", - " }", - " ],", - " \"text\": \"Information Access Consent\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000100\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"actor\": [", - " {", - " \"reference\": {", - " \"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\"", - " }", - " },", - " \"extension\": [", - " {", - " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",", - " \"code\": \"ROLE_CREATED\",", - " \"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\": \"9000000021\"", - " }", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/AATD11A1\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"AATD11A1\",", - " \"status\": \"inactive\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"Information Access\"", - " }", - " ],", - " \"text\": \"Information Access Consent\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000100\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"actor\": [", - " {", - " \"reference\": {", - " \"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\"", - " }", - " },", - " \"extension\": [", - " {", - " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",", - " \"code\": \"ROLE_DEACTIVATED_END_DATE_REACHED\",", - " \"display\": \"End-date reached\"", - " }", - " ]", - " }", - " },", - " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", - " \"valueReference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000022\"", - " }", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " }", - " ]", - "}", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent?patient:identifier=9000000100", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "patient:identifier", - "value": "9000000100" - } - ] - } - }, - "response": [] - }, - { - "name": "Multiple proxy relationships single patient include performer and patient", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", - " \"total\": 3,", - " \"type\": \"searchset\",", - " \"link\": [", - " {", - " \"relation\": \"self\",", - " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?patient:identifier=9000000100&_include=Consent:performer&_include=Consent:patient\"", - " }", - " ],", - " \"entry\": [", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/A3CC67E2\",", - " \"resource\": {", - " \"resourceType\": \"Patient\",", - " \"id\": \"A3CC67E2\",", - " \"meta\": {", - " \"security\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\",", - " \"code\": \"P9\",", - " \"display\": \"High level verification (P9)\"", - " }", - " ]", - " },", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000100\"", - " },", - " {", - " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", - " \"value\": \"ABC1234567\"", - " }", - " ],", - " \"name\": [", - " {", - " \"use\": \"usual\",", - " \"period\": {", - " \"start\": \"2020-01-01\",", - " \"end\": \"2021-12-31\"", - " },", - " \"given\": [", - " \"Samantha\"", - " ],", - " \"family\": \"Adams\",", - " \"prefix\": [", - " \"Miss\"", - " ]", - " }", - " ],", - " \"birthDate\": \"1963-11-02\",", - " \"generalPractitioner\": [", - " {", - " \"identifier\": {", - " \"value\": \"ODS12345\",", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/BE974742\",", - " \"resource\": {", - " \"resourceType\": \"RelatedPerson\",", - " \"id\": \"BE974742\",", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000020\"", - " },", - " {", - " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", - " \"value\": \"ABC0000003\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000100\"", - " }", - " },", - " \"relationship\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", - " \"code\": \"PRN\",", - " \"display\": \"parent\"", - " }", - " ]", - " },", - " {", - " \"coding\": [", - " {", - " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", - " \"code\": \"MTH\",", - " \"display\": \"mother\"", - " }", - " ]", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBCC67E9\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"BBCC67E9\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"Information Access\"", - " }", - " ],", - " \"text\": \"Information Access Consent\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000100\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"actor\": [", - " {", - " \"reference\": {", - " \"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\"", - " }", - " },", - " \"extension\": [", - " {", - " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",", - " \"code\": \"ROLE_CREATED\",", - " \"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\": \"9000000020\"", - " }", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/BE974742\",", - " \"resource\": {", - " \"resourceType\": \"RelatedPerson\",", - " \"id\": \"BE974742\",", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000021\"", - " },", - " {", - " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", - " \"value\": \"ABC0000003\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000100\"", - " }", - " },", - " \"relationship\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", - " \"code\": \"Personal\",", - " \"display\": \"Personal relationship with the patient\"", - " }", - " ]", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/WWCC67T1\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"WWCC67T1\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"Information Access\"", - " }", - " ],", - " \"text\": \"Information Access Consent\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000100\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"actor\": [", - " {", - " \"reference\": {", - " \"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\"", - " }", - " },", - " \"extension\": [", - " {", - " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",", - " \"code\": \"ROLE_CREATED\",", - " \"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\": \"9000000021\"", - " }", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/BE974742\",", - " \"resource\": {", - " \"resourceType\": \"RelatedPerson\",", - " \"id\": \"BE974742\",", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000022\"", - " },", - " {", - " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", - " \"value\": \"ABC0000003\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000100\"", - " }", - " },", - " \"relationship\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", - " \"code\": \"Personal\",", - " \"display\": \"Personal relationship with the patient\"", - " }", - " ]", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/AATD11A1\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"AATD11A1\",", - " \"status\": \"inactive\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"Information Access\"", - " }", - " ],", - " \"text\": \"Information Access Consent\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000100\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"actor\": [", - " {", - " \"reference\": {", - " \"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\"", - " }", - " },", - " \"extension\": [", - " {", - " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",", - " \"code\": \"ROLE_DEACTIVATED_END_DATE_REACHED\",", - " \"display\": \"End-date reached\"", - " }", - " ]", - " }", - " },", - " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", - " \"valueReference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000022\"", - " }", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " }", - " ]", - "}", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent?patient:identifier=9000000100&_include=Consent:performer&_include=Consent:patient", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "patient:identifier", - "value": "9000000100" - }, - { - "key": "_include", - "value": "Consent:performer" - }, - { - "key": "_include", - "value": "Consent:patient" - } - ] - } - }, - "response": [] - }, - { - "name": "Multiple proxy relationships single patient include performer", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", - " \"total\": 3,", - " \"type\": \"searchset\",", - " \"link\": [", - " {", - " \"relation\": \"self\",", - " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?patient:identifier=9000000100&_include=Consent:performer\"", - " }", - " ],", - " \"entry\": [", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/BE974742\",", - " \"resource\": {", - " \"resourceType\": \"RelatedPerson\",", - " \"id\": \"BE974742\",", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000020\"", - " },", - " {", - " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", - " \"value\": \"ABC0000003\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000100\"", - " }", - " },", - " \"relationship\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", - " \"code\": \"PRN\",", - " \"display\": \"parent\"", - " }", - " ]", - " },", - " {", - " \"coding\": [", - " {", - " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", - " \"code\": \"MTH\",", - " \"display\": \"mother\"", - " }", - " ]", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBCC67E9\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"BBCC67E9\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"Information Access\"", - " }", - " ],", - " \"text\": \"Information Access Consent\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000100\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"actor\": [", - " {", - " \"reference\": {", - " \"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\"", - " }", - " },", - " \"extension\": [", - " {", - " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",", - " \"code\": \"ROLE_CREATED\",", - " \"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\": \"9000000020\"", - " }", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/BE974742\",", - " \"resource\": {", - " \"resourceType\": \"RelatedPerson\",", - " \"id\": \"BE974742\",", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000021\"", - " },", - " {", - " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", - " \"value\": \"ABC0000003\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000100\"", - " }", - " },", - " \"relationship\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", - " \"code\": \"Personal\",", - " \"display\": \"Personal relationship with the patient\"", - " }", - " ]", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/WWCC67T1\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"WWCC67T1\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"Information Access\"", - " }", - " ],", - " \"text\": \"Information Access Consent\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000100\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"actor\": [", - " {", - " \"reference\": {", - " \"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\"", - " }", - " },", - " \"extension\": [", - " {", - " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",", - " \"code\": \"ROLE_CREATED\",", - " \"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\": \"9000000021\"", - " }", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/BE974742\",", - " \"resource\": {", - " \"resourceType\": \"RelatedPerson\",", - " \"id\": \"BE974742\",", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000022\"", - " },", - " {", - " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", - " \"value\": \"ABC0000003\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000100\"", - " }", - " },", - " \"relationship\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", - " \"code\": \"Personal\",", - " \"display\": \"Personal relationship with the patient\"", - " }", - " ]", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/AATD11A1\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"AATD11A1\",", - " \"status\": \"inactive\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"Information Access\"", - " }", - " ],", - " \"text\": \"Information Access Consent\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000100\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"actor\": [", - " {", - " \"reference\": {", - " \"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\"", - " }", - " },", - " \"extension\": [", - " {", - " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",", - " \"code\": \"ROLE_DEACTIVATED_END_DATE_REACHED\",", - " \"display\": \"End-date reached\"", - " }", - " ]", - " }", - " },", - " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", - " \"valueReference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000022\"", - " }", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " }", - " ]", - "}", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent?patient:identifier=9000000100&_include=Consent:performer", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "patient:identifier", - "value": "9000000100" - }, - { - "key": "_include", - "value": "Consent:performer" - } - ] - } - }, - "response": [] - }, - { - "name": "Multiple proxy relationships single patient include patient", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", - " \"total\": 3,", - " \"type\": \"searchset\",", - " \"link\": [", - " {", - " \"relation\": \"self\",", - " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?patient:identifier=9000000100&_include=Consent:patient\"", - " }", - " ],", - " \"entry\": [", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/A3CC67E2\",", - " \"resource\": {", - " \"resourceType\": \"Patient\",", - " \"id\": \"A3CC67E2\",", - " \"meta\": {", - " \"security\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\",", - " \"code\": \"P9\",", - " \"display\": \"High level verification (P9)\"", - " }", - " ]", - " },", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000100\"", - " },", - " {", - " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", - " \"value\": \"ABC1234567\"", - " }", - " ],", - " \"name\": [", - " {", - " \"use\": \"usual\",", - " \"period\": {", - " \"start\": \"2020-01-01\",", - " \"end\": \"2021-12-31\"", - " },", - " \"given\": [", - " \"Samantha\"", - " ],", - " \"family\": \"Adams\",", - " \"prefix\": [", - " \"Miss\"", - " ]", - " }", - " ],", - " \"birthDate\": \"1963-11-02\",", - " \"generalPractitioner\": [", - " {", - " \"identifier\": {", - " \"value\": \"ODS12345\",", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBCC67E9\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"BBCC67E9\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"Information Access\"", - " }", - " ],", - " \"text\": \"Information Access Consent\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000100\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"actor\": [", - " {", - " \"reference\": {", - " \"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\"", - " }", - " },", - " \"extension\": [", - " {", - " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",", - " \"code\": \"ROLE_CREATED\",", - " \"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\": \"9000000020\"", - " }", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/WWCC67T1\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"WWCC67T1\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"Information Access\"", - " }", - " ],", - " \"text\": \"Information Access Consent\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000100\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"actor\": [", - " {", - " \"reference\": {", - " \"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\"", - " }", - " },", - " \"extension\": [", - " {", - " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",", - " \"code\": \"ROLE_CREATED\",", - " \"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\": \"9000000021\"", - " }", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/AATD11A1\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"AATD11A1\",", - " \"status\": \"inactive\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"Information Access\"", - " }", - " ],", - " \"text\": \"Information Access Consent\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000100\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"actor\": [", - " {", - " \"reference\": {", - " \"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\"", - " }", - " },", - " \"extension\": [", - " {", - " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",", - " \"code\": \"ROLE_DEACTIVATED_END_DATE_REACHED\",", - " \"display\": \"End-date reached\"", - " }", - " ]", - " }", - " },", - " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", - " \"valueReference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000022\"", - " }", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " }", - " ]", - "}", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent?patient:identifier=9000000100&_include=Consent:patient", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "patient:identifier", - "value": "9000000100" - }, - { - "key": "_include", - "value": "Consent:patient" - } - ] - } - }, - "response": [] - }, - { - "name": "No relationships", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", - " \"total\": 0,", - " \"type\": \"searchset\",", - " \"link\": [", - " {", - " \"relation\": \"self\",", - " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000025&_include=Consent:performer&_include=Consent:patient\"", - " }", - " ],", - " \"entry\": []", - "}", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9000000025", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9000000025" - } - ] - } - }, - "response": [] - }, - { - "name": "Single consenting adult proxy relationship", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", - " \"total\": 1,", - " \"type\": \"searchset\",", - " \"link\": [", - " {", - " \"relation\": \"self\",", - " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000010\"", - " }", - " ],", - " \"entry\": [", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/WWCC67T1\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"WWCC67T1\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"Information Access\"", - " }", - " ],", - " \"text\": \"Information Access Consent\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000005\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"actor\": [", - " {", - " \"reference\": {", - " \"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\"", - " }", - " },", - " \"extension\": [", - " {", - " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",", - " \"code\": \"ROLE_CREATED\",", - " \"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\": \"9000000010\"", - " }", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " }", - " ]", - "}", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9000000010", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9000000010" - } - ] - } - }, - "response": [] - }, - { - "name": "Single consenting adult proxy relationship include performer and patient", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", - " \"total\": 1,", - " \"type\": \"searchset\",", - " \"link\": [", - " {", - " \"relation\": \"self\",", - " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000010&_include=Consent:performer&_include=Consent:patient\"", - " }", - " ],", - " \"entry\": [", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/RP974720\",", - " \"resource\": {", - " \"resourceType\": \"RelatedPerson\",", - " \"id\": \"RP974720\",", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000010\"", - " },", - " {", - " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", - " \"value\": \"ABC0000008\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000005\"", - " }", - " },", - " \"relationship\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\",", - " \"code\": \"Personal\",", - " \"display\": \"Personal relationship with the patient\"", - " }", - " ]", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/DFCC67F5\",", - " \"resource\": {", - " \"resourceType\": \"Patient\",", - " \"id\": \"DFCC67F5\",", - " \"meta\": {", - " \"security\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\",", - " \"code\": \"P9\",", - " \"display\": \"High level verification (P9)\"", - " }", - " ]", - " },", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000005\"", - " },", - " {", - " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", - " \"value\": \"ABC1234567\"", - " }", - " ],", - " \"name\": [", - " {", - " \"use\": \"usual\",", - " \"period\": {", - " \"start\": \"2020-01-01\",", - " \"end\": \"2021-12-31\"", - " },", - " \"given\": [", - " \"Sally\"", - " ],", - " \"family\": \"Evans\",", - " \"prefix\": [", - " \"Mrs\"", - " ]", - " }", - " ],", - " \"birthDate\": \"1995-10-22\",", - " \"generalPractitioner\": [", - " {", - " \"identifier\": {", - " \"value\": \"ODS12345\",", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/WWCC67T1\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"WWCC67T1\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"Information Access\"", - " }", - " ],", - " \"text\": \"Information Access Consent\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000005\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"actor\": [", - " {", - " \"reference\": {", - " \"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\": \"2026-02-11\",", - " \"start\": \"2025-02-11\"", - " }", - " },", - " \"extension\": [", - " {", - " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",", - " \"code\": \"ROLE_CREATED\",", - " \"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\": \"9000000010\"", - " }", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " }", - " ]", - "}", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9000000010&_include=Consent:performer&_include=Consent:patient", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9000000010" - }, - { - "key": "_include", - "value": "Consent:performer" - }, - { - "key": "_include", - "value": "Consent:patient" - } - ] - } - }, - "response": [] - }, - { - "name": "Single mother-child relationship", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", - " \"total\": 1,", - " \"type\": \"searchset\",", - " \"link\": [", - " {", - " \"relation\": \"self\",", - " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000019\"", - " }", - " ],", - " \"entry\": [", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBCC67E9\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"BBCC67E9\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"Information Access\"", - " }", - " ],", - " \"text\": \"Information Access Consent\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000009\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"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\"", - " }", - " ]", - " }", - " }", - " ],", - " \"period\": {", - " \"end\": \"2026-02-11\",", - " \"start\": \"2025-02-11\"", - " }", - " },", - " \"extension\": [", - " {", - " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",", - " \"code\": \"ROLE_CREATED\",", - " \"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\": \"9000000019\"", - " }", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " }", - " ]", - "}", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9000000019", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9000000019" - } - ] - } - }, - "response": [] - }, - { - "name": "Single mother-child relationship include performer and patient", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", - " \"total\": 1,", - " \"type\": \"searchset\",", - " \"link\": [", - " {", - " \"relation\": \"self\",", - " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000019&_include=Consent:performer&_include=Consent:patient\"", - " }", - " ],", - " \"entry\": [", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/BE974742\",", - " \"resource\": {", - " \"resourceType\": \"RelatedPerson\",", - " \"id\": \"BE974742\",", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000019\"", - " },", - " {", - " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", - " \"value\": \"ABC0000001\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000009\"", - " }", - " },", - " \"relationship\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", - " \"code\": \"PRN\",", - " \"display\": \"parent\"", - " }", - " ]", - " },", - " {", - " \"coding\": [", - " {", - " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", - " \"code\": \"MTH\",", - " \"display\": \"mother\"", - " }", - " ]", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/A3CC67E2\",", - " \"resource\": {", - " \"resourceType\": \"Patient\",", - " \"id\": \"A3CC67E2\",", - " \"meta\": {", - " \"security\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\",", - " \"code\": \"P9\",", - " \"display\": \"High level verification (P9)\"", - " }", - " ]", - " },", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000009\"", - " },", - " {", - " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", - " \"value\": \"ABC1234556\"", - " }", - " ],", - " \"name\": [", - " {", - " \"use\": \"usual\",", - " \"period\": {", - " \"start\": \"2020-01-01\",", - " \"end\": \"2021-12-31\"", - " },", - " \"given\": [", - " \"Jane Marie Anne\"", - " ],", - " \"family\": \"Smith\",", - " \"prefix\": [", - " \"Mrs\"", - " ],", - " \"suffix\": [", - " \"MBE\",", - " \"PhD\"", - " ]", - " }", - " ],", - " \"birthDate\": \"2022-10-22\",", - " \"generalPractitioner\": [", - " {", - " \"identifier\": {", - " \"value\": \"ODS12345\",", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBCC67E9\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"BBCC67E9\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"Information Access\"", - " }", - " ],", - " \"text\": \"Information Access Consent\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000009\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"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\"", - " }", - " ]", - " }", - " }", - " ],", - " \"period\": {", - " \"end\": \"2026-02-11\",", - " \"start\": \"2025-02-11\"", - " }", - " },", - " \"extension\": [", - " {", - " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",", - " \"code\": \"ROLE_CREATED\",", - " \"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\": \"9000000019\"", - " }", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " }", - " ]", - "}", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9000000019&_include=Consent:performer&_include=Consent:patient", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9000000019" - }, - { - "key": "_include", - "value": "Consent:performer" - }, - { - "key": "_include", - "value": "Consent:patient" - } - ] - } - }, - "response": [] - }, - { - "name": "Invalid status parameter", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"OperationOutcome\",", - " \"issue\": [", - " {", - " \"code\": \"invalid\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", - " \"version\": \"1\",", - " \"code\": \"INVALID_PARAMETER\",", - " \"display\": \"Required parameter(s) are invalid.\"", - " }", - " ]", - " },", - " \"diagnostics\": \"Invalid request with error - status parameter is invalid.\",", - " \"severity\": \"error\"", - " }", - " ]", - "}", - "", - "const responseJson = pm.response.json();", - "", - "pm.test(\"Status code is 422\", function () {", - " pm.response.to.have.status(422);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9000000017&status=test", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9000000017" - }, - { - "key": "status", - "value": "test" - } - ] - } - }, - "response": [] - }, - { - "name": "Invalid include parameter", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"OperationOutcome\",", - " \"issue\": [", - " {", - " \"code\": \"invalid\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", - " \"version\": \"1\",", - " \"code\": \"INVALID_PARAMETER\",", - " \"display\": \"Required parameter(s) are invalid.\"", - " }", - " ]", - " },", - " \"diagnostics\": \"Invalid request with error - _include parameter is invalid.\",", - " \"severity\": \"error\"", - " }", - " ]", - "}", - "", - "const responseJson = pm.response.json();", - "", - "pm.test(\"Status code is 422\", function () {", - " pm.response.to.have.status(422);", - "});", - "", - "pm.test(\"Should have correct error response\", () => {", - " pm.expect(responseJson.issue[0].details.coding[0].code).to.eql(\"INVALID_PARAMETER\");", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9000000019&_include=test", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9000000019" - }, - { - "key": "_include", - "value": "test" - } - ] - } - }, - "response": [] - }, - { - "name": "Single mother-child relationship unknown legal basis", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", - " \"total\": 1,", - " \"type\": \"searchset\",", - " \"link\": [", - " {", - " \"relation\": \"self\",", - " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000111\"", - " }", - " ],", - " \"entry\": [", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/AF974742\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"AF974742\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"Information Access\"", - " }", - " ],", - " \"text\": \"Information Access Consent\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000119\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\",", - " \"code\": \"unknown\",", - " \"display\": \"Unknown legal basis\"", - " }", - " ],", - " \"provision\": {", - " \"actor\": [", - " {", - " \"reference\": {", - " \"identifier\": {", - " \"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\"", - " }", - " },", - " \"extension\": [", - " {", - " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",", - " \"code\": \"ROLE_CREATED\",", - " \"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\": \"9000000111\"", - " }", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " }", - " ]", - "}", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9000000111", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9000000111" - } - ] - } - }, - "response": [] - }, - { - "name": "No performer record found", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"OperationOutcome\",", - " \"issue\": [", - " { ", - " \"code\": \"processing\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", - " \"version\": \"1\",", - " \"code\": \"INVALIDATED_RESOURCE\",", - " \"display\": \"Resource that has been marked as invalid was requested - invalid resources cannot be retrieved\"", - " }", - " ]", - " },", - " \"diagnostics\": \"Resource that has been marked as invalid was requested - invalid resources cannot be retrieved\",", - " \"severity\": \"error\",", - " ", - " }", - " ]", - "}", - "", - "const responseJson = pm.response.json();", - "", - "pm.test(\"Status code is 404\", function () {", - " pm.response.to.have.status(404);", - "});", - "", - "pm.test(\"Should have correct error response\", () => {", - " pm.expect(responseJson.issue[0].details.coding[0].code).to.eql(\"INVALIDATED_RESOURCE\");", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9000000999", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9000000999" - } - ] - } - }, - "response": [] - }, - { - "name": "Invalid performer identifier", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"issue\": [", - " {", - " \"code\": \"invalid\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"code\": \"INVALID_IDENTIFIER_VALUE\",", - " \"display\": \"Required parameter(s) are invalid.\",", - " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", - " \"version\": \"1\"", - " }", - " ]", - " },", - " \"diagnostics\": \"Invalid request with error - performer:identifier or patient:identifier parameter is invalid.\",", - " \"severity\": \"error\"", - " }", - " ],", - " \"resourceType\": \"OperationOutcome\"", - "}", - "", - "const responseJson = pm.response.json();", - "", - "pm.test(\"Status code is 422\", function () {", - " pm.response.to.have.status(422);", - "});", - "", - "pm.test(\"Should have correct error response\", () => {", - " pm.expect(responseJson.issue[0].details.coding[0].code).to.eql(\"INVALID_IDENTIFIER_VALUE\");", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=90000009990", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "90000009990" - } - ] - } - }, - "response": [] - }, - { - "name": "Invalid performer identifier system", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"issue\": [", - " {", - " \"code\": \"invalid\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"code\": \"INVALID_IDENTIFIER_SYSTEM\",", - " \"display\": \"Required parameter(s) are invalid.\",", - " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", - " \"version\": \"1\"", - " }", - " ]", - " },", - " \"diagnostics\": \"Invalid request with error - performer:identifier or patient:identifier system parameter is invalid.\",", - " \"severity\": \"error\"", - " }", - " ],", - " \"resourceType\": \"OperationOutcome\"", - "}", - "", - "const responseJson = pm.response.json();", - "", - "pm.test(\"Status code is 422\", function () {", - " pm.response.to.have.status(422);", - "});", - "", - "pm.test(\"Should have correct error response\", () => {", - " pm.expect(responseJson.issue[0].details.coding[0].code).to.eql(\"INVALID_IDENTIFIER_SYSTEM\");", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=https://fhir.nhs.uk/Id/nhs-number|1234567890", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "https://fhir.nhs.uk/Id/nhs-number|1234567890" - } - ] - } - }, - "response": [] - }, - { - "name": "Missing performer identifier value", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"issue\": [", - " {", - " \"code\": \"invalid\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"code\": \"MISSING_IDENTIFIER_VALUE\",", - " \"display\": \"Required parameter(s) are missing.\",", - " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", - " \"version\": \"1\"", - " }", - " ]", - " },", - " \"diagnostics\": \"Invalid request with error - performer:identifier or patient:identifier parameter not found.\",", - " \"severity\": \"error\"", - " }", - " ],", - " \"resourceType\": \"OperationOutcome\"", - "}", - "", - "const responseJson = pm.response.json();", - "", - "pm.test(\"Status code is 400\", function () {", - " pm.response.to.have.status(400);", - "});", - "", - "pm.test(\"Should have correct error response\", () => {", - " pm.expect(responseJson.issue[0].details.coding[0].code).to.eql(\"MISSING_IDENTIFIER_VALUE\");", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ] - } - }, - "response": [] - }, - { - "name": "GP Practice not found", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"issue\": [", - " {", - " \"code\": \"processing\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", - " \"version\": \"1\",", - " \"code\": \"GP_PRACTICE_NOT_FOUND\",", - " \"display\": \"GP Practice could not be found - invalid resources cannot be retrieved\"", - " }", - " ]", - " },", - " \"diagnostics\": \"GP Practice could not be found\",", - " \"severity\": \"error\"", - " }", - " ],", - " \"resourceType\": \"OperationOutcome\"", - "}", - "", - "const responseJson = pm.response.json();", - "", - "pm.test(\"Status code is 404\", function () {", - " pm.response.to.have.status(404);", - "});", - "", - "pm.test(\"Should have correct error response\", () => {", - " pm.expect(responseJson.issue[0].details.coding[0].code).to.eql(\"GP_PRACTICE_NOT_FOUND\");", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9000000012", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9000000012" - } - ] - } - }, - "response": [] - } - ], - "description": "The GET /Consent is for retrieving confirmed proxy relationships via the Validated Relationship Service.\n\nThis folder contains requests covering different scenarios for users with different types of proxy relationship. Also includes error scenarios.\n\nFor more details, please refer to the [GET Consent OAS page for the Validated Relationship Service on the NHS England website.](https://digital.nhs.uk/developer/api-catalogue/validated-relationship-service#get-/Consent)" - }, - { - "name": "Create a proxy role (Consent)", - "item": [ - { - "name": "Parent-child proxy creation", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"OperationOutcome\",", - " \"issue\": [", - " {", - " \"severity\": \"information\",", - " \"code\": \"informational\"", - " }", - " ]", - "}", - "", - "pm.test(\"Status code is 201\", function () {", - " pm.response.to.have.status(201);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " var responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});", - "", - "pm.test(\"Location header is returned\", () => {", - " pm.response.to.have.header(\"Location\", \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/90b9863e-e33c-4895-a333-fd0ea0e23205\")", - "})" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "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 \"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\": \"9000000012\"\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\": \"9000000009\"\n }\n }\n ],\n \"provision\": [{\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\": \"9000000009\"\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" - } - } - }, - "url": { - "raw": "{{api_base_url}}/Consent", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ] - } - }, - "response": [] - }, - { - "name": "Adult-adult proxy creation", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"OperationOutcome\",", - " \"issue\": [", - " {", - " \"severity\": \"information\",", - " \"code\": \"informational\"", - " }", - " ]", - "}", - "", - "pm.test(\"Status code is 201\", function () {", - " pm.response.to.have.status(201);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " var responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});", - "", - "pm.test(\"Location header is returned\", () => {", - " pm.response.to.have.header(\"Location\", \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/90b9863e-e33c-4895-a333-fd0ea0e23205\")", - "})" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "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 \"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\": \"9000000012\"\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\": \"9000000017\"\n }\n }\n ],\n \"provision\": [{\n \"period\": {\n \"start\": \"2025-02-11\"\n },\n \"actor\": [\n {\n \"role\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"GUARD\",\n \"display\": \"Guardian\"\n }\n ]\n },\n \"reference\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000017\"\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" - } - } - }, - "url": { - "raw": "{{api_base_url}}/Consent", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ] - } - }, - "response": [] - }, - { - "name": "Invalid performer NHS number", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"issue\": [", - " {", - " \"code\": \"invalid\",", - " \"diagnostics\": \"Not a valid NHS Number provided for the Performer identifier parameter\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", - " \"version\": \"1\",", - " \"code\": \"INVALID_IDENTIFIER\",", - " \"display\": \"Provided value is invalid\"", - " }", - " ]", - " },", - " \"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": {}, - "requests": {} - } - } - ], - "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 \"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\": \"9000000012\"\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\": \"9000000000\"\n }\n }\n ],\n \"provision\": [{\n \"period\": {\n \"start\": \"2025-02-11\"\n },\n \"actor\": [\n {\n \"role\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"GUARD\",\n \"display\": \"Guardian\"\n }\n ]\n },\n \"reference\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000000\"\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" - } - } - }, - "url": { - "raw": "{{api_base_url}}/Consent", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ] - } - }, - "response": [] - }, - { - "name": "Missing free text", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"issue\": [", - " {", - " \"code\": \"invalid\",", - " \"diagnostics\": \"Free text is required when reason code is OTHER.\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"code\": \"MISSING_FREE_TEXT_FOR_OTHER\",", - " \"display\": \"Free text must be provided for OTHER reason codes.\",", - " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", - " \"version\": \"1\"", - " }", - " ]", - " },", - " \"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 \"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\": \"9000000050\"\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\": \"9000000050\"\n }\n }\n ],\n \"provision\": {\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\": \"9000000050\"\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" - } - } - }, - "url": { - "raw": "{{api_base_url}}/Consent", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ] - } - }, - "response": [] - }, - { - "name": "Duplicate relationship", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"issue\": [", - " {", - " \"code\": \"invalid\",", - " \"diagnostics\": \"Proxy role already exists.\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"code\": \"DUPLICATE_RELATIONSHIP\",", - " \"display\": \"Request must be for a new proxy role.\",", - " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", - " \"version\": \"1\"", - " }", - " ]", - " },", - " \"severity\": \"error\"", - " }", - " ],", - " \"resourceType\": \"OperationOutcome\"", - "}", - "", - "pm.test(\"Status code is 409\", function () {", - " pm.response.to.have.status(409);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " var responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});", - "" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "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 \"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\": \"9000000000\"\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\": \"9000000049\"\n }\n }\n ],\n \"provision\": [{\n \"period\": {\n \"start\": \"2025-02-11\"\n },\n \"actor\": [\n {\n \"role\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"GUARD\",\n \"display\": \"Guardian\"\n }\n ]\n },\n \"reference\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000049\"\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" - } - } - }, - "url": { - "raw": "{{api_base_url}}/Consent", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ] - } - }, - "response": [] - } - ], - "description": "The POST /Consent is for storing confirmed proxy relationships via the Validated Relationships Service.\n\nThis folder contains requests covering different scenarios for users with different types of proxy relationship. Also includes error scenarios.\n\nFor more details, please refer to the [POST Consent OAS page for the Validated Relationship Service on the NHS England website.](https://digital.nhs.uk/developer/api-catalogue/validated-relationship-service#post-/Consent)" - }, - { - "name": "Get proxy role (Consent)", - "item": [ - { - "name": "Retrieve consenting adult relationship", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", - " \"total\": 1,", - " \"type\": \"searchset\",", - " \"link\": [", - " {", - " \"relation\": \"self\",", - " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000010\"", - " }", - " ],", - " \"entry\": [", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/WWCC67T1\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"WWCC67T1\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"Information Access\"", - " }", - " ],", - " \"text\": \"Information Access Consent\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000005\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"actor\": [", - " {", - " \"reference\": {", - " \"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\"", - " }", - " },", - " \"extension\": [", - " {", - " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",", - " \"code\": \"ROLE_CREATED\",", - " \"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\": \"9000000010\"", - " }", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " }", - " ]", - "}", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent/74eed847-ca25-4e76-8cf2-f2c2d7842a7a", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - "74eed847-ca25-4e76-8cf2-f2c2d7842a7a" - ] - } - }, - "response": [] - }, - { - "name": "Retrieve consenting adult relationship with patient details", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", - " \"total\": 1,", - " \"type\": \"searchset\",", - " \"link\": [", - " {", - " \"relation\": \"self\",", - " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000010&_include=Consent:patient\"", - " }", - " ],", - " \"entry\": [", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/DFCC67F5\",", - " \"resource\": {", - " \"resourceType\": \"Patient\",", - " \"id\": \"DFCC67F5\",", - " \"meta\": {", - " \"security\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\",", - " \"code\": \"P9\",", - " \"display\": \"High level verification (P9)\"", - " }", - " ]", - " },", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000005\"", - " },", - " {", - " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", - " \"value\": \"ABC1234567\"", - " }", - " ],", - " \"name\": [", - " {", - " \"use\": \"usual\",", - " \"period\": {", - " \"start\": \"2020-01-01\",", - " \"end\": \"2021-12-31\"", - " },", - " \"given\": [", - " \"Sally\"", - " ],", - " \"family\": \"Evans\",", - " \"prefix\": [", - " \"Mrs\"", - " ]", - " }", - " ],", - " \"birthDate\": \"1995-10-22\",", - " \"generalPractitioner\": [", - " {", - " \"identifier\": {", - " \"value\": \"ODS12345\",", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/WWCC67T1\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"WWCC67T1\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"Information Access\"", - " }", - " ],", - " \"text\": \"Information Access Consent\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000005\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"actor\": [", - " {", - " \"reference\": {", - " \"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\": \"2026-02-11\",", - " \"start\": \"2025-02-11\"", - " }", - " },", - " \"extension\": [", - " {", - " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",", - " \"code\": \"ROLE_CREATED\",", - " \"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\": \"9000000010\"", - " }", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " }", - " ]", - "}", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent/74eed847-ca25-4e76-8cf2-f2c2d7842a7a?_include=Consent:patient", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - "74eed847-ca25-4e76-8cf2-f2c2d7842a7a" - ], - "query": [ - { - "key": "_include", - "value": "Consent:patient" - } - ] - } - }, - "response": [] - }, - { - "name": "Retrieve consenting adult relationship with performer details", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", - " \"total\": 1,", - " \"type\": \"searchset\",", - " \"link\": [", - " {", - " \"relation\": \"self\",", - " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000010&_include=Consent:performer\"", - " }", - " ],", - " \"entry\": [", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/RP974720\",", - " \"resource\": {", - " \"resourceType\": \"RelatedPerson\",", - " \"id\": \"RP974720\",", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000010\"", - " },", - " {", - " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", - " \"value\": \"ABC0000008\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000005\"", - " }", - " },", - " \"relationship\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\",", - " \"code\": \"Personal\",", - " \"display\": \"Personal relationship with the patient\"", - " }", - " ]", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/WWCC67T1\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"WWCC67T1\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"Information Access\"", - " }", - " ],", - " \"text\": \"Information Access Consent\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000005\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"actor\": [", - " {", - " \"reference\": {", - " \"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\": \"2026-02-11\",", - " \"start\": \"2025-02-11\"", - " }", - " },", - " \"extension\": [", - " {", - " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",", - " \"code\": \"ROLE_CREATED\",", - " \"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\": \"9000000010\"", - " }", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " }", - " ]", - "}", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent/74eed847-ca25-4e76-8cf2-f2c2d7842a7a?_include=Consent:performer", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - "74eed847-ca25-4e76-8cf2-f2c2d7842a7a" - ], - "query": [ - { - "key": "_include", - "value": "Consent:performer" - } - ] - } - }, - "response": [] - }, - { - "name": "Retrieve consenting adult relationship with performer and patient details", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", - " \"total\": 1,", - " \"type\": \"searchset\",", - " \"link\": [", - " {", - " \"relation\": \"self\",", - " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000010&_include=Consent:performer&_include=Consent:patient\"", - " }", - " ],", - " \"entry\": [", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/RP974720\",", - " \"resource\": {", - " \"resourceType\": \"RelatedPerson\",", - " \"id\": \"RP974720\",", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000010\"", - " },", - " {", - " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", - " \"value\": \"ABC0000008\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000005\"", - " }", - " },", - " \"relationship\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\",", - " \"code\": \"Personal\",", - " \"display\": \"Personal relationship with the patient\"", - " }", - " ]", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/DFCC67F5\",", - " \"resource\": {", - " \"resourceType\": \"Patient\",", - " \"id\": \"DFCC67F5\",", - " \"meta\": {", - " \"security\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\",", - " \"code\": \"P9\",", - " \"display\": \"High level verification (P9)\"", - " }", - " ]", - " },", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000005\"", - " },", - " {", - " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", - " \"value\": \"ABC1234567\"", - " }", - " ],", - " \"name\": [", - " {", - " \"use\": \"usual\",", - " \"period\": {", - " \"start\": \"2020-01-01\",", - " \"end\": \"2021-12-31\"", - " },", - " \"given\": [", - " \"Sally\"", - " ],", - " \"family\": \"Evans\",", - " \"prefix\": [", - " \"Mrs\"", - " ]", - " }", - " ],", - " \"birthDate\": \"1995-10-22\",", - " \"generalPractitioner\": [", - " {", - " \"identifier\": {", - " \"value\": \"ODS12345\",", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/WWCC67T1\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"WWCC67T1\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"Information Access\"", - " }", - " ],", - " \"text\": \"Information Access Consent\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000005\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"actor\": [", - " {", - " \"reference\": {", - " \"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\": \"2026-02-11\",", - " \"start\": \"2025-02-11\"", - " }", - " },", - " \"extension\": [", - " {", - " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",", - " \"code\": \"ROLE_CREATED\",", - " \"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\": \"9000000010\"", - " }", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " }", - " ]", - "}", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent/74eed847-ca25-4e76-8cf2-f2c2d7842a7a?_include=Consent:performer&_include=Consent:patient", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - "74eed847-ca25-4e76-8cf2-f2c2d7842a7a" - ], - "query": [ - { - "key": "_include", - "value": "Consent:performer" - }, - { - "key": "_include", - "value": "Consent:patient" - } - ] - } - }, - "response": [] - }, - { - "name": "Retrieve mother-child relationship", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", - " \"total\": 1,", - " \"type\": \"searchset\",", - " \"link\": [", - " {", - " \"relation\": \"self\",", - " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000019\"", - " }", - " ],", - " \"entry\": [", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBCC67E9\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"BBCC67E9\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"Information Access\"", - " }", - " ],", - " \"text\": \"Information Access Consent\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000009\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"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\"", - " }", - " ]", - " }", - " }", - " ],", - " \"period\": {", - " \"end\": \"2026-02-11\",", - " \"start\": \"2025-02-11\"", - " }", - " },", - " \"extension\": [", - " {", - " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",", - " \"code\": \"ROLE_CREATED\",", - " \"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\": \"9000000019\"", - " }", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " }", - " ]", - "}", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent/39df03a2-1b14-4d19-b1dc-d5d8cbf96948", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - "39df03a2-1b14-4d19-b1dc-d5d8cbf96948" - ] - } - }, - "response": [] - }, - { - "name": "Retrieve mother-child relationship with patient details", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", - " \"total\": 1,", - " \"type\": \"searchset\",", - " \"link\": [", - " {", - " \"relation\": \"self\",", - " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000019&_include=Consent:patient\"", - " }", - " ],", - " \"entry\": [", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/A3CC67E2\",", - " \"resource\": {", - " \"resourceType\": \"Patient\",", - " \"id\": \"A3CC67E2\",", - " \"meta\": {", - " \"security\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\",", - " \"code\": \"P9\",", - " \"display\": \"High level verification (P9)\"", - " }", - " ]", - " },", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000009\"", - " },", - " {", - " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", - " \"value\": \"ABC1234556\"", - " }", - " ],", - " \"name\": [", - " {", - " \"use\": \"usual\",", - " \"period\": {", - " \"start\": \"2020-01-01\",", - " \"end\": \"2021-12-31\"", - " },", - " \"given\": [", - " \"Jane Marie Anne\"", - " ],", - " \"family\": \"Smith\",", - " \"prefix\": [", - " \"Mrs\"", - " ],", - " \"suffix\": [", - " \"MBE\",", - " \"PhD\"", - " ]", - " }", - " ],", - " \"birthDate\": \"2022-10-22\",", - " \"generalPractitioner\": [", - " {", - " \"identifier\": {", - " \"value\": \"ODS12345\",", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBCC67E9\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"BBCC67E9\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"Information Access\"", - " }", - " ],", - " \"text\": \"Information Access Consent\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000009\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"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\"", - " }", - " ]", - " }", - " }", - " ]", - " },", - " \"extension\": [", - " {", - " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",", - " \"code\": \"ROLE_CREATED\",", - " \"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\": \"9000000019\"", - " }", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " }", - " ]", - "}", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent/39df03a2-1b14-4d19-b1dc-d5d8cbf96948?_include=Consent:patient", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - "39df03a2-1b14-4d19-b1dc-d5d8cbf96948" - ], - "query": [ - { - "key": "_include", - "value": "Consent:patient" - } - ] - } - }, - "response": [] - }, - { - "name": "Retrieve mother-child relationship with performer details", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", - " \"total\": 1,", - " \"type\": \"searchset\",", - " \"link\": [", - " {", - " \"relation\": \"self\",", - " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000019&_include=Consent:performer\"", - " }", - " ],", - " \"entry\": [", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/BE974742\",", - " \"resource\": {", - " \"resourceType\": \"RelatedPerson\",", - " \"id\": \"BE974742\",", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000019\"", - " },", - " {", - " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", - " \"value\": \"ABC0000001\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000009\"", - " }", - " },", - " \"relationship\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", - " \"code\": \"PRN\",", - " \"display\": \"parent\"", - " }", - " ]", - " },", - " {", - " \"coding\":[", - " {", - " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", - " \"code\": \"MTH\",", - " \"display\": \"mother\"", - " }", - " ]", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBCC67E9\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"BBCC67E9\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"Information Access\"", - " }", - " ],", - " \"text\": \"Information Access Consent\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000009\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"provision\": {", - " \"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\"", - " }", - " ]", - " }", - " }", - " ],", - " \"period\": {", - " \"end\": \"2026-02-11\",", - " \"start\": \"2025-02-11\"", - " }", - " },", - " \"extension\": [", - " {", - " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",", - " \"code\": \"ROLE_CREATED\",", - " \"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\": \"9000000019\"", - " }", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " }", - " ]", - "}", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent/39df03a2-1b14-4d19-b1dc-d5d8cbf96948?_include=Consent:performer", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - "39df03a2-1b14-4d19-b1dc-d5d8cbf96948" - ], - "query": [ - { - "key": "_include", - "value": "Consent:performer" - } - ] - } - }, - "response": [] - }, - { - "name": "Retrieve mother-child relationship with performer and patient details", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", - " \"total\": 1,", - " \"type\": \"searchset\",", - " \"link\": [", - " {", - " \"relation\": \"self\",", - " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000019&_include=Consent:performer&_include=Consent:patient\"", - " }", - " ],", - " \"entry\": [", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/BE974742\",", - " \"resource\": {", - " \"resourceType\": \"RelatedPerson\",", - " \"id\": \"BE974742\",", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000019\"", - " },", - " {", - " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", - " \"value\": \"ABC0000001\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000009\"", - " }", - " },", - " \"relationship\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", - " \"code\": \"PRN\",", - " \"display\": \"parent\"", - " }", - " ]", - " },", - " {", - " \"coding\": [", - " {", - " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", - " \"code\": \"MTH\",", - " \"display\": \"mother\"", - " }", - " ]", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/A3CC67E2\",", - " \"resource\": {", - " \"resourceType\": \"Patient\",", - " \"id\": \"A3CC67E2\",", - " \"meta\": {", - " \"security\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\",", - " \"code\": \"P9\",", - " \"display\": \"High level verification (P9)\"", - " }", - " ]", - " },", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000009\"", - " },", - " {", - " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", - " \"value\": \"ABC1234556\"", - " }", - " ],", - " \"name\": [", - " {", - " \"use\": \"usual\",", - " \"period\": {", - " \"start\": \"2020-01-01\",", - " \"end\": \"2021-12-31\"", - " },", - " \"given\": [", - " \"Jane Marie Anne\"", - " ],", - " \"family\": \"Smith\",", - " \"prefix\": [", - " \"Mrs\"", - " ],", - " \"suffix\": [", - " \"MBE\",", - " \"PhD\"", - " ]", - " }", - " ],", - " \"birthDate\": \"2022-10-22\",", - " \"generalPractitioner\": [", - " {", - " \"identifier\": {", - " \"value\": \"ODS12345\",", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBCC67E9\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"BBCC67E9\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"Information Access\"", - " }", - " ],", - " \"text\": \"Information Access Consent\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000009\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"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\"", - " }", - " ]", - " }", - " }", - " ],", - " \"period\": {", - " \"end\": \"2026-02-11\",", - " \"start\": \"2025-02-11\"", - " }", - " },", - " \"extension\": [", - " {", - " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\",", - " \"code\": \"ROLE_CREATED\",", - " \"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\": \"9000000019\"", - " }", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " }", - " ]", - "}", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent/39df03a2-1b14-4d19-b1dc-d5d8cbf96948?_include=Consent:performer&_include=Consent:patient", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - "39df03a2-1b14-4d19-b1dc-d5d8cbf96948" - ], - "query": [ - { - "key": "_include", - "value": "Consent:performer" - }, - { - "key": "_include", - "value": "Consent:patient" - } - ] - } - }, - "response": [] - }, - { - "name": "Invalid consent ID", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"issue\": [", - " {", - " \"code\": \"invalid\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"code\": \"INVALID_ID_VALUE\",", - " \"display\": \"Required parameter(s) are invalid.\",", - " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", - " \"version\": \"1\"", - " }", - " ]", - " },", - " \"diagnostics\": \"Invalid request with error - ID must be a valid UUID.\",", - " \"severity\": \"error\"", - " }", - " ],", - " \"resourceType\": \"OperationOutcome\"", - "}", - "", - "const responseJson = pm.response.json();", - "", - "pm.test(\"Status code is 400\", function () {", - " pm.response.to.have.status(400);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent/invalid-identifier", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - "invalid-identifier" - ] - } - }, - "response": [] - }, - { - "name": "Invalid include parameter", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"OperationOutcome\",", - " \"issue\": [", - " {", - " \"code\": \"invalid\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", - " \"version\": \"1\",", - " \"code\": \"INVALID_PARAMETER\",", - " \"display\": \"Required parameter(s) are invalid.\"", - " }", - " ]", - " },", - " \"diagnostics\": \"Invalid request with error - _include parameter is invalid.\",", - " \"severity\": \"error\"", - " ", - " }", - " ],", - "}", - "", - "const responseJson = pm.response.json();", - "", - "pm.test(\"Status code is 422\", function () {", - " pm.response.to.have.status(422);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent/39df03a2-1b14-4d19-b1dc-d5d8cbf96948?_include=Consent:invalid", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - "39df03a2-1b14-4d19-b1dc-d5d8cbf96948" - ], - "query": [ - { - "key": "_include", - "value": "Consent:invalid" - } - ] - } - }, - "response": [] - }, - { - "name": "Invalid parameters", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"OperationOutcome\",", - " \"issue\": [", - " {", - " \"code\": \"invalid\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", - " \"version\": \"1\",", - " \"code\": \"INVALID_PARAMETER\",", - " \"display\": \"Required parameter(s) are invalid.\"", - " }", - " ]", - " },", - " \"diagnostics\": \"Invalid request with error - _include parameter is invalid.\",", - " \"severity\": \"error\"", - " }", - " ],", - "}", - "", - "const responseJson = pm.response.json();", - "", - "pm.test(\"Status code is 422\", function () {", - " pm.response.to.have.status(422);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent/74eed847-ca25-4e76-8cf2-f2c2d7842a7a?_unknown=true", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - "74eed847-ca25-4e76-8cf2-f2c2d7842a7a" - ], - "query": [ - { - "key": "_unknown", - "value": "true" - } - ] - } - }, - "response": [] - }, - { - "name": "Proxy role not found", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"issue\": [", - " {", - " \"code\": \"processing\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", - " \"version\": \"1\",", - " \"code\": \"INVALIDATED_RESOURCE\",", - " \"display\": \"Resource that has been marked as invalid was requested - invalid resources cannot be retrieved\"", - " }", - " ]", - " },", - " \"diagnostics\": \"Resource that has been marked as invalid was requested - invalid resources cannot be retrieved\",", - " \"severity\": \"error\"", - " }", - " ],", - " \"resourceType\": \"OperationOutcome\"", - "}", - "", - "const responseJson = pm.response.json();", - "", - "pm.test(\"Status code is 404\", function () {", - " pm.response.to.have.status(404);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent/a0922245-1072-40c3-8f4e-a7490c10d365", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - "a0922245-1072-40c3-8f4e-a7490c10d365" - ] - } - }, - "response": [] - } - ], - "description": "The GET /Consent/{ID} is for retrieving the details of a single proxy relationship, including current status, based on a provided id.\n\nThis folder contains requests covering different scenarios for users with different types of proxy relationships. It also includes error scenarios.\n\nFor more details, please refer to the [GET Consent by ID OAS page for the Validated Relationship Service on the NHS England website.](https://digital.nhs.uk/developer/api-catalogue/validated-relationship-service#get-/Consent/%7Bid%7D)" - }, - { - "name": "Update a proxy role (Consent)", - "item": [ - { - "name": "Status update", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"OperationOutcome\",", - " \"issue\": [", - " {", - " \"severity\": \"information\",", - " \"code\": \"informational\"", - " }", - " ]", - "}", - "", - "pm.test(\"Status code is 201\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " var responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "PATCH", - "header": [], - "body": { - "mode": "raw", - "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.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 patients request\"\n }\n ]\n }\n }\n ]\n }\n]", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/Consent/74eed847-ca25-4e76-8cf2-f2c2d7842a7a", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - "74eed847-ca25-4e76-8cf2-f2c2d7842a7a" - ] - }, - "description": "Valid patch changing status to 'active'" - }, - "response": [] - }, - { - "name": "Missing free text for Other", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"issue\": [", - " {", - " \"code\": \"invalid\",", - " \"diagnostics\": \"Free text is required when reason code is OTHER.\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"code\": \"MISSING_FREE_TEXT_FOR_OTHER\",", - " \"display\": \"Free text must be provided for OTHER reason codes.\",", - " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", - " \"version\": \"1\"", - " }", - " ]", - " },", - " \"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\": \"inactive\"\n }\n]", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/Consent/d4e8a6f2-1c3b-4a7e-9d2f-8b5c7e9f1a3d", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - "d4e8a6f2-1c3b-4a7e-9d2f-8b5c7e9f1a3d" - ] - }, - "description": "Valid patch changing status to 'active'" - }, - "response": [] - }, - { - "name": "Access level update", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"OperationOutcome\",", - " \"issue\": [", - " {", - " \"severity\": \"information\",", - " \"code\": \"informational\"", - " }", - " ]", - "}", - "", - "pm.test(\"Status code is 201\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " var responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "PATCH", - "header": [], - "body": { - "mode": "raw", - "raw": "[\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/6b71ac92-baa3-4b76-b0f5-a601257e2722", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - "6b71ac92-baa3-4b76-b0f5-a601257e2722" - ] - }, - "description": "Valid patch modifying the role end date" - }, - "response": [] - }, - { - "name": "Multiple valid changes", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"OperationOutcome\",", - " \"issue\": [", - " {", - " \"severity\": \"information\",", - " \"code\": \"informational\"", - " }", - " ]", - "}", - "", - "pm.test(\"Status code is 201\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " var responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "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.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 {\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/43003db8-ffcd-4bd6-ab2f-b49b9656f9e5", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - "43003db8-ffcd-4bd6-ab2f-b49b9656f9e5" - ] - }, - "description": "Valid patch modifying the role end date" - }, - "response": [] - }, - { - "name": "Invalid status code", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"issue\": [", - " {", - " \"code\": \"invalid\",", - " \"diagnostics\": \"Invalid status code.\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"code\": \"INVALID_STATUS_CODE\",", - " \"display\": \"Status code is invalid.\",", - " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", - " \"version\": \"1\"", - " }", - " ]", - " },", - " \"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": {}, - "requests": {} - } - } - ], - "request": { - "method": "PATCH", - "header": [], - "body": { - "mode": "raw", - "raw": "[\n {\n \"op\": \"replace\",\n \"path\": \"/status\",\n \"value\": \"someinvalidcode\"\n },\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 patients request\"\n }\n ]\n }\n }\n ]\n }\n]", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/Consent/78c35330-fa2f-4934-a5dd-fff847f38de5", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - "78c35330-fa2f-4934-a5dd-fff847f38de5" - ] - }, - "description": "Patch with invalid status value" - }, - "response": [] - }, - { - "name": "Invalid path", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"issue\": [", - " {", - " \"code\": \"invalid\",", - " \"diagnostics\": \"Patch targeting non-existent element.\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"code\": \"INVALID_PATCH_PATH\",", - " \"display\": \"Patch target is invalid.\",", - " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", - " \"version\": \"1\"", - " }", - " ]", - " },", - " \"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": {}, - "requests": {} - } - } - ], - "request": { - "method": "PATCH", - "header": [], - "body": { - "mode": "raw", - "raw": "[\n {\n \"op\": \"replace\",\n \"path\": \"/someotherpath\",\n \"value\": \"active\"\n },\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 patients request\"\n }\n ]\n }\n }\n ]\n }\n]", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/Consent/01abb0c5-b1ac-499d-9655-9cd0b8d3588f", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - "01abb0c5-b1ac-499d-9655-9cd0b8d3588f" - ] - }, - "description": "Patch targeting non-existent element" - }, - "response": [] - }, - { - "name": "Resource not found", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"issue\": [", - " {", - " \"code\": \"invalid\",", - " \"diagnostics\": \"Proxy role not found.\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"code\": \"RESOURCE_NOT_FOUND\",", - " \"display\": \"Request must be for a existing proxy role.\",", - " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", - " \"version\": \"1\"", - " }", - " ]", - " },", - " \"severity\": \"error\"", - " }", - " ],", - " \"resourceType\": \"OperationOutcome\"", - "}", - "", - "pm.test(\"Status code is 404\", function () {", - " pm.response.to.have.status(404);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " var responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "PATCH", - "header": [], - "body": { - "mode": "raw", - "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.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 patients request\"\n }\n ]\n }\n }\n ]\n }\n]", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/Consent/0000000", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - "0000000" - ] - }, - "description": "Patch for non-existent Consent" - }, - "response": [] - }, - { - "name": "Invalid patch format", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"issue\": [", - " {", - " \"code\": \"invalid\",", - " \"diagnostics\": \"Malformed JSON patch document.\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"code\": \"INVALID_PATCH_FORMAT\",", - " \"display\": \"Request format is invalid.\",", - " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", - " \"version\": \"1\"", - " }", - " ]", - " },", - " \"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]", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/Consent/849ea584-2318-471b-a24c-cee1b5ad0137", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - "849ea584-2318-471b-a24c-cee1b5ad0137" - ] - }, - "description": "Malformed JSON patch document" - }, - "response": [] - }, - { - "name": "Invalid state transition", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"issue\": [", - " {", - " \"code\": \"invalid\",", - " \"diagnostics\": \"Patch attempting invalid status change.\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"code\": \"INVALID_STATE_TRANSITION\",", - " \"display\": \"Status change is invalid.\",", - " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", - " \"version\": \"1\"", - " }", - " ]", - " },", - " \"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": {}, - "requests": {} - } - } - ], - "request": { - "method": "PATCH", - "header": [], - "body": { - "mode": "raw", - "raw": "[\n {\n \"op\": \"replace\",\n \"path\": \"/status\",\n \"value\": \"someinvalidcode\"\n },\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 patients request\"\n }\n ]\n }\n }\n ]\n }\n]", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/Consent/7b7f47b8-96e5-43eb-b733-283bf1449f2c", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - "7b7f47b8-96e5-43eb-b733-283bf1449f2c" - ] - } - }, - "response": [] - }, - { - "name": "Invalid Status Reason", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"issue\": [", - " {", - " \"code\": \"invalid\",", - " \"diagnostics\": \"Invalid status reason.\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"code\": \"INVALID_STATUS_REASON\",", - " \"display\": \"Status reason is invalid.\",", - " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", - " \"version\": \"1\"", - " }", - " ]", - " },", - " \"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": {}, - "requests": {} - } - } - ], - "request": { - "method": "PATCH", - "header": [], - "body": { - "mode": "raw", - "raw": "[\n {\n \"op\": \"replace\",\n \"path\": \"/status\",\n \"value\": \"someinvalidcode\"\n },\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 patients request\"\n }\n ]\n }\n }\n ]\n }\n]", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/Consent/51fb4df5-815a-45cd-8427-04d6558336b7", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - "51fb4df5-815a-45cd-8427-04d6558336b7" - ] - } - }, - "response": [] - } - ], - "description": "Use this endpoint to update an existing proxy role.\n\nCommon update scenarios include:\n\n- Revocation of the role (status change from \"active\" to \"inactive\")\n- Changing the legal basis of the role (TBC)\n- Updating the end date for time-bound access\n \n\nThis folder contains requests covering different scenarios for various valid and invalid update requests.\n\nFor more details, please refer to the [PATCH Consent OAS page for the Validated Relationship Service on the NHS England website.](https://digital.nhs.uk/developer/api-catalogue/validated-relationship-service#patch-/Consent/-id-)" - } - ], - "event": [ - { - "listen": "prerequest", - "script": { - "type": "text/javascript", - "exec": [ - "" - ] - } - }, - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "pm.test(\"Response has FHIR content type\", () => {", - " pm.expect(pm.response.headers.get('Content-Type')).to.include('application/fhir+json');", - "});" - ] - } - } - ], - "variable": [ - { - "key": "api_base_url", - "value": "https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4" - } - ] ->>>>>>> 4689a2b (NPA-6165: Postman Collection Updates) } \ No newline at end of file From ebb6a46af546122c409348297a055405717ecfcc Mon Sep 17 00:00:00 2001 From: Ellie Bound <175816742+ellie-bound1-NHSD@users.noreply.github.com> Date: Tue, 27 Jan 2026 08:44:11 +0000 Subject: [PATCH 07/10] NPA-6165: Update postman collections --- ...ervice.integration.postman_collection.json | 18480 ++++++------- ...ip_service.sandbox.postman_collection.json | 22080 ++++++++-------- 2 files changed, 20157 insertions(+), 20403 deletions(-) diff --git a/postman/validated_relationship_service.integration.postman_collection.json b/postman/validated_relationship_service.integration.postman_collection.json index 4ffbe339..b33af6b7 100644 --- a/postman/validated_relationship_service.integration.postman_collection.json +++ b/postman/validated_relationship_service.integration.postman_collection.json @@ -1,9242 +1,9242 @@ { - "info": { - "_postman_id": "a359139d-5115-463f-926e-dea326d9f2a6", - "name": "Validated Relationship Service - Integration - 21/01/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 \n- App-restricted - for service-to-service authorization\n \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 \n- get_cis2_access_token_int.py - for CIS2 authorization\n \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\n \n2. Go to the Authorization tab for this Postman request\n \n3. Select 'Bearer token' from the drop-down\n \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 \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": "18067099" - }, - "item": [ - { - "name": "Get proxy roles (GET /Consent)", - "item": [ - { - "name": "Valid request - NPS - Get proxy roles for performer", - "event": [ - { - "listen": "prerequest", - "script": { - "exec": [ - "" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - }, - { - "listen": "test", - "script": { - "exec": [ - "" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "SomeToken;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9736898148", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9736898148" - } - ] - }, - "description": "This request and its examples will only retrieve proxy roles from the National Proxy Store and not directly from GPIT suppliers via NAM.\n\nSee folder-level docs for more info.\n\n## Example scenario\n\n**Given** proxy roles exist for a performer (proxy) in the National Proxy Store (NPS) \n**When** a GET /Consent request is sent with the performer identifier \n**Then** the proxy roles in NPS are returned\n\n## Authorization\n\nPlease see the folder overview for details of how to generate tokens for this endpoint." - }, - "response": [ - { - "name": "Proxy roles returned - No patient or performer details", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "1c190795-98fc-40d0-b13d-4b566650950a", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "3bedabd0-b86f-4d7b-92d9-94f020b4a834", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "some_token;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9736898148", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9736898148" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Date", - "value": "Thu, 04 Dec 2025 10:48:19 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "3486" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "cf3a99a3-7592-4968-893c-e443d6cb27c8" - }, - { - "key": "x-amz-apigw-id", - "value": "VD0FoHiurPEFXqQ=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-693166f0-1bb8c61dd3aa101687d0b754" - }, - { - "key": "X-Request-ID", - "value": "d3ec5ec8-088f-4db6-8342-1a21d2a2af16" - }, - { - "key": "X-Correlation-ID", - "value": "656bfa49-711b-48c4-9427-1ed8fa34260f" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T10:48:19Z\",\n \"total\": 2,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9736898148\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"resource\": {\n \"id\": \"7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T10:46:27Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/b22d6068-fe78-40f4-b71a-b916dac48c0b\",\n \"resource\": {\n \"id\": \"b22d6068-fe78-40f4-b71a-b916dac48c0b\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T10:47:43Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n }\n ]\n}" - }, - { - "name": "Proxy roles returned - Include patient details", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "some_token;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9736898148&_include=Consent:patient", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9736898148" - }, - { - "key": "_include", - "value": "Consent:patient" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Date", - "value": "Thu, 04 Dec 2025 10:50:25 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "6923" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "edd035fd-2cdb-4c7a-a55c-a55e6faf5743" - }, - { - "key": "x-amz-apigw-id", - "value": "VD0ZXFA2LPEFYqg=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-6931676e-74035c00139aae000a60b5d7" - }, - { - "key": "X-Request-ID", - "value": "64b0f06f-a35e-44bb-baf4-33de94895236" - }, - { - "key": "X-Correlation-ID", - "value": "6a95b411-9936-49bb-bbcb-8e6776417762" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T10:50:25Z\",\n \"total\": 2,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9736898148&_include=Consent%3Apatient\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"resource\": {\n \"id\": \"7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T10:46:27Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/b22d6068-fe78-40f4-b71a-b916dac48c0b\",\n \"resource\": {\n \"id\": \"b22d6068-fe78-40f4-b71a-b916dac48c0b\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T10:47:43Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898644\",\n \"resource\": {\n \"id\": \"9736898644\",\n \"meta\": {\n \"security\": [\n {\n \"code\": \"U\",\n \"display\": \"unrestricted\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-Confidentiality\"\n },\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ],\n \"versionId\": \"4\"\n },\n \"address\": [\n {\n \"extension\": [\n {\n \"extension\": [\n {\n \"url\": \"type\",\n \"valueCoding\": {\n \"code\": \"PAF\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType\"\n }\n },\n {\n \"url\": \"value\",\n \"valueString\": \"29706100\"\n }\n ],\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey\"\n }\n ],\n \"id\": \"gDmhc\",\n \"line\": [\n \"BRAMBLE COTTAGE\",\n \"OLD VICARAGE PARK\",\n \"SCAWBY\",\n \"BRIGG\",\n \"S HUMBERSIDE\"\n ],\n \"period\": {\n \"start\": \"2021-09-10\"\n },\n \"postalCode\": \"DN20 9RL\",\n \"use\": \"home\"\n }\n ],\n \"birthDate\": \"2015-09-26\",\n \"gender\": \"female\",\n \"generalPractitioner\": [\n {\n \"id\": \"gDHTb\",\n \"identifier\": {\n \"period\": {\n \"start\": \"2018-08-22\"\n },\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A20047\"\n }\n }\n ],\n \"identifier\": [\n {\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"01\",\n \"display\": \"Number present and verified\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\n \"version\": \"1.0.0\"\n }\n ]\n }\n }\n ],\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n ],\n \"name\": [\n {\n \"family\": \"SHEPP\",\n \"given\": [\n \"Ashley\",\n \"Ellen\"\n ],\n \"period\": {\n \"start\": \"2025-08-06\"\n },\n \"prefix\": [\n \"MS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898717\",\n \"resource\": {\n \"id\": \"9736898717\",\n \"meta\": {\n \"security\": [\n {\n \"code\": \"U\",\n \"display\": \"unrestricted\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-Confidentiality\"\n },\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ],\n \"versionId\": \"4\"\n },\n \"address\": [\n {\n \"extension\": [\n {\n \"extension\": [\n {\n \"url\": \"type\",\n \"valueCoding\": {\n \"code\": \"PAF\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType\"\n }\n },\n {\n \"url\": \"value\",\n \"valueString\": \"16654057\"\n }\n ],\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey\"\n }\n ],\n \"id\": \"YoGEf\",\n \"line\": [\n \"GLENVILLE\",\n \"FERRY ROAD\",\n \"GOXHILL\",\n \"BARROW-UPON-HUMBER\",\n \"S HUMBERSIDE\"\n ],\n \"period\": {\n \"start\": \"2016-04-09\"\n },\n \"postalCode\": \"DN19 7JY\",\n \"use\": \"home\"\n }\n ],\n \"birthDate\": \"2010-05-31\",\n \"gender\": \"male\",\n \"generalPractitioner\": [\n {\n \"id\": \"bYoHa\",\n \"identifier\": {\n \"period\": {\n \"start\": \"2016-02-12\"\n },\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A20047\"\n }\n }\n ],\n \"identifier\": [\n {\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"01\",\n \"display\": \"Number present and verified\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\n \"version\": \"1.0.0\"\n }\n ]\n }\n }\n ],\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n ],\n \"name\": [\n {\n \"family\": \"CASH\",\n \"given\": [\n \"Jacob\",\n \"Chas\"\n ],\n \"period\": {\n \"start\": \"2025-07-22\"\n },\n \"prefix\": [\n \"MR\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" - }, - { - "name": "Proxy roles returned - Include performer details", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "some_token;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9736898148&_include=Consent:performer", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9736898148" - }, - { - "key": "_include", - "value": "Consent:performer" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Date", - "value": "Thu, 04 Dec 2025 10:50:45 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "5289" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "60649be0-6363-4601-b792-d631af45a966" - }, - { - "key": "x-amz-apigw-id", - "value": "VD0cyFTYLPEF-Fg=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-69316784-cee1c757e6d4e43fb4837684" - }, - { - "key": "X-Request-ID", - "value": "8a113b57-8af9-4d34-b300-100c84059319" - }, - { - "key": "X-Correlation-ID", - "value": "a3683a8c-6172-44a7-8410-0e78a705907b" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T10:50:45Z\",\n \"total\": 2,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9736898148&_include=Consent%3Aperformer\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"resource\": {\n \"id\": \"7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T10:46:27Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/b22d6068-fe78-40f4-b71a-b916dac48c0b\",\n \"resource\": {\n \"id\": \"b22d6068-fe78-40f4-b71a-b916dac48c0b\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T10:47:43Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/ZfgKO\",\n \"resource\": {\n \"id\": \"ZfgKO\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/UwTCq\",\n \"resource\": {\n \"id\": \"UwTCq\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" - }, - { - "name": "Proxy roles returned - Include patient and performer details", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "some_token;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9736898148&_include=Consent:performer&_include=Consent:patient", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9736898148" - }, - { - "key": "_include", - "value": "Consent:performer" - }, - { - "key": "_include", - "value": "Consent:patient" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Date", - "value": "Thu, 04 Dec 2025 10:51:06 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "8726" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "2b36e22f-2649-44c9-b3ce-929ea840df0f" - }, - { - "key": "x-amz-apigw-id", - "value": "VD0gJFjQLPEF_Ew=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-6931679a-aa7dfa232b694d8fdbd9823f" - }, - { - "key": "X-Request-ID", - "value": "d5743541-7330-4347-b9c7-9067feb4b144" - }, - { - "key": "X-Correlation-ID", - "value": "af030657-aad8-45f4-9c70-85e4755a189f" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T10:51:06Z\",\n \"total\": 2,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9736898148&_include=Consent%3Aperformer&_include=Consent%3Apatient\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"resource\": {\n \"id\": \"7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T10:46:27Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/b22d6068-fe78-40f4-b71a-b916dac48c0b\",\n \"resource\": {\n \"id\": \"b22d6068-fe78-40f4-b71a-b916dac48c0b\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T10:47:43Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898644\",\n \"resource\": {\n \"id\": \"9736898644\",\n \"meta\": {\n \"security\": [\n {\n \"code\": \"U\",\n \"display\": \"unrestricted\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-Confidentiality\"\n },\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ],\n \"versionId\": \"4\"\n },\n \"address\": [\n {\n \"extension\": [\n {\n \"extension\": [\n {\n \"url\": \"type\",\n \"valueCoding\": {\n \"code\": \"PAF\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType\"\n }\n },\n {\n \"url\": \"value\",\n \"valueString\": \"29706100\"\n }\n ],\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey\"\n }\n ],\n \"id\": \"gDmhc\",\n \"line\": [\n \"BRAMBLE COTTAGE\",\n \"OLD VICARAGE PARK\",\n \"SCAWBY\",\n \"BRIGG\",\n \"S HUMBERSIDE\"\n ],\n \"period\": {\n \"start\": \"2021-09-10\"\n },\n \"postalCode\": \"DN20 9RL\",\n \"use\": \"home\"\n }\n ],\n \"birthDate\": \"2015-09-26\",\n \"gender\": \"female\",\n \"generalPractitioner\": [\n {\n \"id\": \"gDHTb\",\n \"identifier\": {\n \"period\": {\n \"start\": \"2018-08-22\"\n },\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A20047\"\n }\n }\n ],\n \"identifier\": [\n {\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"01\",\n \"display\": \"Number present and verified\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\n \"version\": \"1.0.0\"\n }\n ]\n }\n }\n ],\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n ],\n \"name\": [\n {\n \"family\": \"SHEPP\",\n \"given\": [\n \"Ashley\",\n \"Ellen\"\n ],\n \"period\": {\n \"start\": \"2025-08-06\"\n },\n \"prefix\": [\n \"MS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898717\",\n \"resource\": {\n \"id\": \"9736898717\",\n \"meta\": {\n \"security\": [\n {\n \"code\": \"U\",\n \"display\": \"unrestricted\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-Confidentiality\"\n },\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ],\n \"versionId\": \"4\"\n },\n \"address\": [\n {\n \"extension\": [\n {\n \"extension\": [\n {\n \"url\": \"type\",\n \"valueCoding\": {\n \"code\": \"PAF\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType\"\n }\n },\n {\n \"url\": \"value\",\n \"valueString\": \"16654057\"\n }\n ],\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey\"\n }\n ],\n \"id\": \"YoGEf\",\n \"line\": [\n \"GLENVILLE\",\n \"FERRY ROAD\",\n \"GOXHILL\",\n \"BARROW-UPON-HUMBER\",\n \"S HUMBERSIDE\"\n ],\n \"period\": {\n \"start\": \"2016-04-09\"\n },\n \"postalCode\": \"DN19 7JY\",\n \"use\": \"home\"\n }\n ],\n \"birthDate\": \"2010-05-31\",\n \"gender\": \"male\",\n \"generalPractitioner\": [\n {\n \"id\": \"bYoHa\",\n \"identifier\": {\n \"period\": {\n \"start\": \"2016-02-12\"\n },\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A20047\"\n }\n }\n ],\n \"identifier\": [\n {\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"01\",\n \"display\": \"Number present and verified\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\n \"version\": \"1.0.0\"\n }\n ]\n }\n }\n ],\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n ],\n \"name\": [\n {\n \"family\": \"CASH\",\n \"given\": [\n \"Jacob\",\n \"Chas\"\n ],\n \"period\": {\n \"start\": \"2025-07-22\"\n },\n \"prefix\": [\n \"MR\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/ZfgKO\",\n \"resource\": {\n \"id\": \"ZfgKO\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/UwTCq\",\n \"resource\": {\n \"id\": \"UwTCq\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" - }, - { - "name": "Proxy roles returned - Filtered by status 'inactive'", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "some_token;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9736898156&status=inactive", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9736898156" - }, - { - "key": "status", - "value": "inactive" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Date", - "value": "Thu, 04 Dec 2025 11:09:14 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "1888" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "290a4ffd-6021-435c-af76-8d6c80492b72" - }, - { - "key": "x-amz-apigw-id", - "value": "VD3JoHOkrPEFSoA=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-69316bd6-5bd69e7021cf6e4e0696d153" - }, - { - "key": "X-Request-ID", - "value": "8b8298dc-a9a4-4257-a6b9-f99d5ff65983" - }, - { - "key": "X-Correlation-ID", - "value": "5af5dfe2-b247-4624-8268-bb4e78593eb3" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:09:14Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9736898156&status=inactive\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/750cb586-eb9b-46c7-a1a5-711307a087af\",\n \"resource\": {\n \"id\": \"750cb586-eb9b-46c7-a1a5-711307a087af\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T10:55:53Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898652\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2025-12-05\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"inactive\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n }\n ]\n}" - }, - { - "name": "Proxy roles returned - Filtered by status 'active' and include patient and performer details", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "some_token;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9736898156&status=active&_include=Consent:performer&_include=Consent:patient", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9736898156" - }, - { - "key": "status", - "value": "active" - }, - { - "key": "_include", - "value": "Consent:performer" - }, - { - "key": "_include", - "value": "Consent:patient" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Date", - "value": "Thu, 04 Dec 2025 11:09:41 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "4528" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "44c6f0cf-6bdb-4b96-8889-55ebe68b8c60" - }, - { - "key": "x-amz-apigw-id", - "value": "VD3M5FGYrPEFZVg=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-69316beb-f2f5e05791f831ed34fb0afa" - }, - { - "key": "X-Request-ID", - "value": "73bded49-9645-4418-bf08-ebd13d92c2a1" - }, - { - "key": "X-Correlation-ID", - "value": "15b5d9d5-9909-458a-91c5-64ee20e93a01" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:09:40Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9736898156&status=active&_include=Consent%3Aperformer&_include=Consent%3Apatient\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40\",\n \"resource\": {\n \"id\": \"4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:08:46Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898660\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-12-05\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898660\",\n \"resource\": {\n \"id\": \"9736898660\",\n \"meta\": {\n \"security\": [\n {\n \"code\": \"U\",\n \"display\": \"unrestricted\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-Confidentiality\"\n },\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ],\n \"versionId\": \"4\"\n },\n \"address\": [\n {\n \"extension\": [\n {\n \"extension\": [\n {\n \"url\": \"type\",\n \"valueCoding\": {\n \"code\": \"PAF\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType\"\n }\n },\n {\n \"url\": \"value\",\n \"valueString\": \"19976537\"\n }\n ],\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey\"\n }\n ],\n \"id\": \"pBQDr\",\n \"line\": [\n \"CARLTON\",\n \"VICARAGE LANE\",\n \"REDBOURNE\",\n \"GAINSBOROUGH\",\n \"LINCS\"\n ],\n \"period\": {\n \"start\": \"2025-07-15\"\n },\n \"postalCode\": \"DN21 4QW\",\n \"use\": \"home\"\n }\n ],\n \"birthDate\": \"2012-04-24\",\n \"gender\": \"female\",\n \"generalPractitioner\": [\n {\n \"id\": \"xSEnH\",\n \"identifier\": {\n \"period\": {\n \"start\": \"2024-11-06\"\n },\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A20047\"\n }\n }\n ],\n \"identifier\": [\n {\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"01\",\n \"display\": \"Number present and verified\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\n \"version\": \"1.0.0\"\n }\n ]\n }\n }\n ],\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898660\"\n }\n ],\n \"name\": [\n {\n \"family\": \"GODREY\",\n \"given\": [\n \"Davina\",\n \"Linda\"\n ],\n \"period\": {\n \"start\": \"2017-04-22\"\n },\n \"prefix\": [\n \"MISS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/nVLgl\",\n \"resource\": {\n \"id\": \"nVLgl\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898660\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" - } - ] - }, - { - "name": "Valid request - NPS - Get proxy roles for patient", - "event": [ - { - "listen": "prerequest", - "script": { - "exec": [ - "" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - }, - { - "listen": "test", - "script": { - "exec": [ - "" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "SomeToken;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?patient:identifier=9736898644", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "patient:identifier", - "value": "9736898644" - } - ] - }, - "description": "This request and its examples will only retrieve proxy roles from the National Proxy Store and not directly from GPIT suppliers via NAM.\n\nSee folder level docs for more info.\n\n## Example scenario\n\n**Given** proxy roles exist for a patient in the National Proxy Store (NPS) \n**When** a GET /Consent request is sent with the patient identifier \n**Then** the proxy roles in NPS are returned\n\n## Authorization\n\nPlease see the folder overview for details of how to generate tokens for this endpoint." - }, - "response": [ - { - "name": "Proxy roles returned - No patient or performer details", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "a8fe6a8d-44c5-4451-b8e8-5cf5adc2db03", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "43c2ad8f-43a2-4cfc-8d3a-2b4298ab2b6d", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "some_token;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?patient:identifier=9736898644", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "patient:identifier", - "value": "9736898644" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Date", - "value": "Thu, 04 Dec 2025 11:17:19 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "3484" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "cd84643e-5789-445f-9d2f-eb53fe6b57c5" - }, - { - "key": "x-amz-apigw-id", - "value": "VD4VeEsnLPEFmxA=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-69316dbc-851b7fe822d672bb07d0be6d" - }, - { - "key": "X-Request-ID", - "value": "b7120974-233d-4634-80e2-f404e817f80b" - }, - { - "key": "X-Correlation-ID", - "value": "73e7ab39-f339-4f53-8090-d4320c6a1fc5" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:17:19Z\",\n \"total\": 2,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?patient%3Aidentifier=9736898644\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"resource\": {\n \"id\": \"7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T10:46:27Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"resource\": {\n \"id\": \"553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:15:26Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n }\n ]\n}" - }, - { - "name": "Proxy roles returned - Include performer details", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "some_token;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?patient:identifier=9736898644&_include=Consent:performer", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "patient:identifier", - "value": "9736898644" - }, - { - "key": "_include", - "value": "Consent:performer" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Date", - "value": "Thu, 04 Dec 2025 11:17:45 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "5287" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "d6ea589d-359b-43a5-ac3d-6b570eec9cac" - }, - { - "key": "x-amz-apigw-id", - "value": "VD4YuGlSLPEF7zw=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-69316dd1-47a064ac1a1d588355c13564" - }, - { - "key": "X-Request-ID", - "value": "eb00dad3-5e15-4ade-8ee9-f3597bfab4d3" - }, - { - "key": "X-Correlation-ID", - "value": "a496e8bd-c333-4e87-9927-bbe9ead436a4" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:17:45Z\",\n \"total\": 2,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?patient%3Aidentifier=9736898644&_include=Consent%3Aperformer\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"resource\": {\n \"id\": \"7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T10:46:27Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"resource\": {\n \"id\": \"553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:15:26Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/ZfgKO\",\n \"resource\": {\n \"id\": \"ZfgKO\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/EAONj\",\n \"resource\": {\n \"id\": \"EAONj\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" - }, - { - "name": "Proxy roles returned - Include patient details", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "some_token;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?patient:identifier=9736898644&_include=Consent:patient", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "patient:identifier", - "value": "9736898644" - }, - { - "key": "_include", - "value": "Consent:patient" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Date", - "value": "Thu, 04 Dec 2025 11:18:02 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "5218" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "3a81d012-80ef-4350-8d7b-1f8cda1ef809" - }, - { - "key": "x-amz-apigw-id", - "value": "VD4cPGnErPEFYsw=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-69316de7-bb724d308ffa3272269bfba9" - }, - { - "key": "X-Request-ID", - "value": "ada44c4a-9dcc-4666-a97e-72ebce5630a8" - }, - { - "key": "X-Correlation-ID", - "value": "cfa6112c-4235-41a4-9e58-f4f04d4f7614" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:18:02Z\",\n \"total\": 2,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?patient%3Aidentifier=9736898644&_include=Consent%3Apatient\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"resource\": {\n \"id\": \"7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T10:46:27Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"resource\": {\n \"id\": \"553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:15:26Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898644\",\n \"resource\": {\n \"id\": \"9736898644\",\n \"meta\": {\n \"security\": [\n {\n \"code\": \"U\",\n \"display\": \"unrestricted\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-Confidentiality\"\n },\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ],\n \"versionId\": \"4\"\n },\n \"address\": [\n {\n \"extension\": [\n {\n \"extension\": [\n {\n \"url\": \"type\",\n \"valueCoding\": {\n \"code\": \"PAF\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType\"\n }\n },\n {\n \"url\": \"value\",\n \"valueString\": \"29706100\"\n }\n ],\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey\"\n }\n ],\n \"id\": \"gDmhc\",\n \"line\": [\n \"BRAMBLE COTTAGE\",\n \"OLD VICARAGE PARK\",\n \"SCAWBY\",\n \"BRIGG\",\n \"S HUMBERSIDE\"\n ],\n \"period\": {\n \"start\": \"2021-09-10\"\n },\n \"postalCode\": \"DN20 9RL\",\n \"use\": \"home\"\n }\n ],\n \"birthDate\": \"2015-09-26\",\n \"gender\": \"female\",\n \"generalPractitioner\": [\n {\n \"id\": \"gDHTb\",\n \"identifier\": {\n \"period\": {\n \"start\": \"2018-08-22\"\n },\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A20047\"\n }\n }\n ],\n \"identifier\": [\n {\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"01\",\n \"display\": \"Number present and verified\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\n \"version\": \"1.0.0\"\n }\n ]\n }\n }\n ],\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n ],\n \"name\": [\n {\n \"family\": \"SHEPP\",\n \"given\": [\n \"Ashley\",\n \"Ellen\"\n ],\n \"period\": {\n \"start\": \"2025-08-06\"\n },\n \"prefix\": [\n \"MS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" - }, - { - "name": "Proxy roles returned - Include patient and performer details", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "some_token;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?patient:identifier=9736898644&_include=Consent:performer&_include=Consent:patient", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "patient:identifier", - "value": "9736898644" - }, - { - "key": "_include", - "value": "Consent:performer" - }, - { - "key": "_include", - "value": "Consent:patient" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Date", - "value": "Thu, 04 Dec 2025 11:18:17 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "7021" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "013f49d1-ffbe-4880-bfd6-1b92d13d08a3" - }, - { - "key": "x-amz-apigw-id", - "value": "VD4evE6yLPEFZZA=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-69316df7-175910d69cd894708a0921b9" - }, - { - "key": "X-Request-ID", - "value": "9ce9a6d5-2bd2-4d5e-a984-2c78a457f4d4" - }, - { - "key": "X-Correlation-ID", - "value": "02eabdf7-0a76-4fec-9c99-306273ea8da5" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:18:17Z\",\n \"total\": 2,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?patient%3Aidentifier=9736898644&_include=Consent%3Aperformer&_include=Consent%3Apatient\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"resource\": {\n \"id\": \"7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T10:46:27Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"resource\": {\n \"id\": \"553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:15:26Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898644\",\n \"resource\": {\n \"id\": \"9736898644\",\n \"meta\": {\n \"security\": [\n {\n \"code\": \"U\",\n \"display\": \"unrestricted\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-Confidentiality\"\n },\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ],\n \"versionId\": \"4\"\n },\n \"address\": [\n {\n \"extension\": [\n {\n \"extension\": [\n {\n \"url\": \"type\",\n \"valueCoding\": {\n \"code\": \"PAF\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType\"\n }\n },\n {\n \"url\": \"value\",\n \"valueString\": \"29706100\"\n }\n ],\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey\"\n }\n ],\n \"id\": \"gDmhc\",\n \"line\": [\n \"BRAMBLE COTTAGE\",\n \"OLD VICARAGE PARK\",\n \"SCAWBY\",\n \"BRIGG\",\n \"S HUMBERSIDE\"\n ],\n \"period\": {\n \"start\": \"2021-09-10\"\n },\n \"postalCode\": \"DN20 9RL\",\n \"use\": \"home\"\n }\n ],\n \"birthDate\": \"2015-09-26\",\n \"gender\": \"female\",\n \"generalPractitioner\": [\n {\n \"id\": \"gDHTb\",\n \"identifier\": {\n \"period\": {\n \"start\": \"2018-08-22\"\n },\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A20047\"\n }\n }\n ],\n \"identifier\": [\n {\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"01\",\n \"display\": \"Number present and verified\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\n \"version\": \"1.0.0\"\n }\n ]\n }\n }\n ],\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n ],\n \"name\": [\n {\n \"family\": \"SHEPP\",\n \"given\": [\n \"Ashley\",\n \"Ellen\"\n ],\n \"period\": {\n \"start\": \"2025-08-06\"\n },\n \"prefix\": [\n \"MS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/ZfgKO\",\n \"resource\": {\n \"id\": \"ZfgKO\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/EAONj\",\n \"resource\": {\n \"id\": \"EAONj\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" - }, - { - "name": "Proxy roles returned - Filtered by status 'inactive'", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "some_token;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?patient:identifier=9736898717&status=inactive", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "patient:identifier", - "value": "9736898717" - }, - { - "key": "status", - "value": "inactive" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Date", - "value": "Thu, 04 Dec 2025 11:18:37 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "1886" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "595418c1-5c22-46b6-907c-e799e9fdf609" - }, - { - "key": "x-amz-apigw-id", - "value": "VD4iFHTWLPEFnHA=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-69316e0c-b334c67c9e4d72fd5809672a" - }, - { - "key": "X-Request-ID", - "value": "e6ad06af-45a7-4f98-92c2-88300871c3bc" - }, - { - "key": "X-Correlation-ID", - "value": "8d75c837-bd9e-4784-ac40-84322ee4d188" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:18:37Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?patient%3Aidentifier=9736898717&status=inactive\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/cf7bc8e6-f8e0-41c5-8d08-1741eee5a256\",\n \"resource\": {\n \"id\": \"cf7bc8e6-f8e0-41c5-8d08-1741eee5a256\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:16:43Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"inactive\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n }\n ]\n}" - }, - { - "name": "Proxy roles returned - Filtered by status 'active' and include patient and performer details", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "some_token;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?patient:identifier=9736898717&status=active&_include=Consent:performer&_include=Consent:patient", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "patient:identifier", - "value": "9736898717" - }, - { - "key": "status", - "value": "active" - }, - { - "key": "_include", - "value": "Consent:performer" - }, - { - "key": "_include", - "value": "Consent:patient" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Date", - "value": "Thu, 04 Dec 2025 11:18:51 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "4528" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "bd5079fb-1fc3-428c-ab53-5ba1dfacc510" - }, - { - "key": "x-amz-apigw-id", - "value": "VD4kRHuoLPEF-DQ=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-69316e1a-0dc7c19d64d48ad8a86c4518" - }, - { - "key": "X-Request-ID", - "value": "8da5a25e-ef8b-4cec-84c0-81af22e5132f" - }, - { - "key": "X-Correlation-ID", - "value": "ce7840a8-db71-4897-9853-d06c699adca9" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:18:51Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?patient%3Aidentifier=9736898717&status=active&_include=Consent%3Aperformer&_include=Consent%3Apatient\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/b22d6068-fe78-40f4-b71a-b916dac48c0b\",\n \"resource\": {\n \"id\": \"b22d6068-fe78-40f4-b71a-b916dac48c0b\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T10:47:43Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898717\",\n \"resource\": {\n \"id\": \"9736898717\",\n \"meta\": {\n \"security\": [\n {\n \"code\": \"U\",\n \"display\": \"unrestricted\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-Confidentiality\"\n },\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ],\n \"versionId\": \"4\"\n },\n \"address\": [\n {\n \"extension\": [\n {\n \"extension\": [\n {\n \"url\": \"type\",\n \"valueCoding\": {\n \"code\": \"PAF\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType\"\n }\n },\n {\n \"url\": \"value\",\n \"valueString\": \"16654057\"\n }\n ],\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey\"\n }\n ],\n \"id\": \"YoGEf\",\n \"line\": [\n \"GLENVILLE\",\n \"FERRY ROAD\",\n \"GOXHILL\",\n \"BARROW-UPON-HUMBER\",\n \"S HUMBERSIDE\"\n ],\n \"period\": {\n \"start\": \"2016-04-09\"\n },\n \"postalCode\": \"DN19 7JY\",\n \"use\": \"home\"\n }\n ],\n \"birthDate\": \"2010-05-31\",\n \"gender\": \"male\",\n \"generalPractitioner\": [\n {\n \"id\": \"bYoHa\",\n \"identifier\": {\n \"period\": {\n \"start\": \"2016-02-12\"\n },\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A20047\"\n }\n }\n ],\n \"identifier\": [\n {\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"01\",\n \"display\": \"Number present and verified\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\n \"version\": \"1.0.0\"\n }\n ]\n }\n }\n ],\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n ],\n \"name\": [\n {\n \"family\": \"CASH\",\n \"given\": [\n \"Jacob\",\n \"Chas\"\n ],\n \"period\": {\n \"start\": \"2025-07-22\"\n },\n \"prefix\": [\n \"MR\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/UwTCq\",\n \"resource\": {\n \"id\": \"UwTCq\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" - } - ] - }, - { - "name": "Valid request - NPS - Get proxy roles for patient and proxy", - "event": [ - { - "listen": "prerequest", - "script": { - "exec": [ - "" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - }, - { - "listen": "test", - "script": { - "exec": [ - "" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "SomeToken;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9736898121&patient:identifier=9736898644", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9736898121" - }, - { - "key": "patient:identifier", - "value": "9736898644" - } - ] - }, - "description": "This request and its examples will only retrieve proxy roles from the National Proxy Store and not directly from GPIT suppliers via NAM.\n\nSee folder level docs for more info.\n\n## Example scenario\n\n**Given** proxy roles exist for a patient in the National Proxy Store (NPS) \n**When** a GET /Consent request is sent with the performer and patient identifier \n**Then** a single proxy role from NPS is returned\n\n## Authorization\n\nPlease see the folder overview for details of how to generate tokens for this endpoint." - }, - "response": [ - { - "name": "Proxy roles returned - No patient or performer details", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "4d896833-170b-4dc9-a455-66db155cb5c1", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "1525b9dd-abde-44c0-a226-c93af7e47d8e", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "some_token;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9736898121&patient:identifier=9736898644", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9736898121" - }, - { - "key": "patient:identifier", - "value": "9736898644" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Date", - "value": "Thu, 04 Dec 2025 11:19:27 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "1902" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "3d56eb4c-4bc0-47d8-bc61-a55b098dfd9c" - }, - { - "key": "x-amz-apigw-id", - "value": "VD4p_GRgrPEFVPA=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-69316e3f-6ddd811fdb997165b9c6a0d5" - }, - { - "key": "X-Request-ID", - "value": "f8ac2f03-2a5f-4ff7-8ada-093f55fb9c38" - }, - { - "key": "X-Correlation-ID", - "value": "8fc4ed98-4b94-41e1-bff0-0065b6058201" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:19:27Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9736898121&patient%3Aidentifier=9736898644\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"resource\": {\n \"id\": \"553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:15:26Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n }\n ]\n}" - }, - { - "name": "Proxy roles returned - Include performer details", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "some_token;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9736898121&patient:identifier=9736898644&_include=Consent:performer", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9736898121" - }, - { - "key": "patient:identifier", - "value": "9736898644" - }, - { - "key": "_include", - "value": "Consent:performer" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Date", - "value": "Thu, 04 Dec 2025 11:19:44 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "2818" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "12da5c87-c8eb-4085-ad09-ab9df3923150" - }, - { - "key": "x-amz-apigw-id", - "value": "VD4slFJ5rPEF6Mg=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-69316e50-a15563e078d9633ab0d45fb6" - }, - { - "key": "X-Request-ID", - "value": "51afba5e-eea1-415e-a0c3-bc5d47e884fd" - }, - { - "key": "X-Correlation-ID", - "value": "c31bc807-8bc9-4aa5-b531-f44fbfeeef0c" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:19:44Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9736898121&patient%3Aidentifier=9736898644&_include=Consent%3Aperformer\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"resource\": {\n \"id\": \"553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:15:26Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/EAONj\",\n \"resource\": {\n \"id\": \"EAONj\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" - }, - { - "name": "Proxy roles returned - Include patient details", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "some_token;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9736898121&patient:identifier=9736898644&_include=Consent:patient", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9736898121" - }, - { - "key": "patient:identifier", - "value": "9736898644" - }, - { - "key": "_include", - "value": "Consent:patient" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Date", - "value": "Thu, 04 Dec 2025 11:19:57 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "3636" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "341e64dd-974f-4307-a16b-e775c0777fdd" - }, - { - "key": "x-amz-apigw-id", - "value": "VD4uhGhjLPEF8-A=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-69316e5c-16469b05761a5ee0d5ffe220" - }, - { - "key": "X-Request-ID", - "value": "2762b971-bfcc-42c6-be87-b2d2a98cf5b5" - }, - { - "key": "X-Correlation-ID", - "value": "94e42484-2c4d-46fc-8364-027c06a21798" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:19:56Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9736898121&patient%3Aidentifier=9736898644&_include=Consent%3Apatient\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"resource\": {\n \"id\": \"553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:15:26Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898644\",\n \"resource\": {\n \"id\": \"9736898644\",\n \"meta\": {\n \"security\": [\n {\n \"code\": \"U\",\n \"display\": \"unrestricted\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-Confidentiality\"\n },\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ],\n \"versionId\": \"4\"\n },\n \"address\": [\n {\n \"extension\": [\n {\n \"extension\": [\n {\n \"url\": \"type\",\n \"valueCoding\": {\n \"code\": \"PAF\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType\"\n }\n },\n {\n \"url\": \"value\",\n \"valueString\": \"29706100\"\n }\n ],\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey\"\n }\n ],\n \"id\": \"gDmhc\",\n \"line\": [\n \"BRAMBLE COTTAGE\",\n \"OLD VICARAGE PARK\",\n \"SCAWBY\",\n \"BRIGG\",\n \"S HUMBERSIDE\"\n ],\n \"period\": {\n \"start\": \"2021-09-10\"\n },\n \"postalCode\": \"DN20 9RL\",\n \"use\": \"home\"\n }\n ],\n \"birthDate\": \"2015-09-26\",\n \"gender\": \"female\",\n \"generalPractitioner\": [\n {\n \"id\": \"gDHTb\",\n \"identifier\": {\n \"period\": {\n \"start\": \"2018-08-22\"\n },\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A20047\"\n }\n }\n ],\n \"identifier\": [\n {\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"01\",\n \"display\": \"Number present and verified\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\n \"version\": \"1.0.0\"\n }\n ]\n }\n }\n ],\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n ],\n \"name\": [\n {\n \"family\": \"SHEPP\",\n \"given\": [\n \"Ashley\",\n \"Ellen\"\n ],\n \"period\": {\n \"start\": \"2025-08-06\"\n },\n \"prefix\": [\n \"MS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" - }, - { - "name": "Proxy roles returned - Include patient and performer details", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "some_token;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9736898121&patient:identifier=9736898644&_include=Consent:performer&_include=Consent:patient", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9736898121" - }, - { - "key": "patient:identifier", - "value": "9736898644" - }, - { - "key": "_include", - "value": "Consent:performer" - }, - { - "key": "_include", - "value": "Consent:patient" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Date", - "value": "Thu, 04 Dec 2025 11:20:24 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "4552" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "306d5243-752e-45e4-9c44-f175a008c1de" - }, - { - "key": "x-amz-apigw-id", - "value": "VD4y2Gg1rPEFcxQ=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-69316e78-df1338116d16a7272e1de2dc" - }, - { - "key": "X-Request-ID", - "value": "b05f7a59-c008-47d8-868c-011cbdf17500" - }, - { - "key": "X-Correlation-ID", - "value": "95f4ebb0-274e-4757-91f3-91a5fc0a3f0f" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:20:24Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9736898121&patient%3Aidentifier=9736898644&_include=Consent%3Aperformer&_include=Consent%3Apatient\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"resource\": {\n \"id\": \"553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:15:26Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898644\",\n \"resource\": {\n \"id\": \"9736898644\",\n \"meta\": {\n \"security\": [\n {\n \"code\": \"U\",\n \"display\": \"unrestricted\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-Confidentiality\"\n },\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ],\n \"versionId\": \"4\"\n },\n \"address\": [\n {\n \"extension\": [\n {\n \"extension\": [\n {\n \"url\": \"type\",\n \"valueCoding\": {\n \"code\": \"PAF\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType\"\n }\n },\n {\n \"url\": \"value\",\n \"valueString\": \"29706100\"\n }\n ],\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey\"\n }\n ],\n \"id\": \"gDmhc\",\n \"line\": [\n \"BRAMBLE COTTAGE\",\n \"OLD VICARAGE PARK\",\n \"SCAWBY\",\n \"BRIGG\",\n \"S HUMBERSIDE\"\n ],\n \"period\": {\n \"start\": \"2021-09-10\"\n },\n \"postalCode\": \"DN20 9RL\",\n \"use\": \"home\"\n }\n ],\n \"birthDate\": \"2015-09-26\",\n \"gender\": \"female\",\n \"generalPractitioner\": [\n {\n \"id\": \"gDHTb\",\n \"identifier\": {\n \"period\": {\n \"start\": \"2018-08-22\"\n },\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A20047\"\n }\n }\n ],\n \"identifier\": [\n {\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"01\",\n \"display\": \"Number present and verified\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\n \"version\": \"1.0.0\"\n }\n ]\n }\n }\n ],\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n ],\n \"name\": [\n {\n \"family\": \"SHEPP\",\n \"given\": [\n \"Ashley\",\n \"Ellen\"\n ],\n \"period\": {\n \"start\": \"2025-08-06\"\n },\n \"prefix\": [\n \"MS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/EAONj\",\n \"resource\": {\n \"id\": \"EAONj\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" - }, - { - "name": "Proxy roles returned - Filtered by status 'inactive'", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "some_token;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9736898156&patient:identifier=9736898652&status=inactive", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9736898156" - }, - { - "key": "patient:identifier", - "value": "9736898652" - }, - { - "key": "status", - "value": "inactive" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Date", - "value": "Thu, 04 Dec 2025 11:21:09 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "1920" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "24bfc7a0-5f30-47b4-a751-7534837f5224" - }, - { - "key": "x-amz-apigw-id", - "value": "VD455ErXrPEFuaQ=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-69316ea5-6c272d90a7d3656142da3073" - }, - { - "key": "X-Request-ID", - "value": "67a71930-24b3-4baa-8b13-65f27c413a41" - }, - { - "key": "X-Correlation-ID", - "value": "dd934795-88bf-44a3-a2c3-eff757413bfb" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:21:09Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9736898156&patient%3Aidentifier=9736898652&status=inactive\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/750cb586-eb9b-46c7-a1a5-711307a087af\",\n \"resource\": {\n \"id\": \"750cb586-eb9b-46c7-a1a5-711307a087af\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T10:55:53Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898652\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2025-12-05\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"inactive\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n }\n ]\n}" - }, - { - "name": "Proxy roles returned - Filtered by status 'active' and include patient and performer details", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "some_token;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9736898156&patient:identifier=9736898652&status=active&_include=Consent:performer&_include=Consent:patient", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9736898156" - }, - { - "key": "patient:identifier", - "value": "9736898652" - }, - { - "key": "status", - "value": "active" - }, - { - "key": "_include", - "value": "Consent:performer" - }, - { - "key": "_include", - "value": "Consent:patient" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Date", - "value": "Thu, 04 Dec 2025 11:21:28 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "2038" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "f44b69f0-f814-4e0f-89eb-349f1f7e143d" - }, - { - "key": "x-amz-apigw-id", - "value": "VD48uEKHLPEF67A=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-69316eb7-00b15aebe653e94192bc60ee" - }, - { - "key": "X-Request-ID", - "value": "8f40b74e-99fa-4401-bcf1-def08a63da50" - }, - { - "key": "X-Correlation-ID", - "value": "1460d166-ba8d-4d1c-8822-83394abe1169" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:21:27Z\",\n \"total\": 0,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9736898156&patient%3Aidentifier=9736898652&status=active&_include=Consent%3Aperformer&_include=Consent%3Apatient\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898652\",\n \"resource\": {\n \"id\": \"9736898652\",\n \"meta\": {\n \"security\": [\n {\n \"code\": \"U\",\n \"display\": \"unrestricted\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-Confidentiality\"\n },\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ],\n \"versionId\": \"4\"\n },\n \"address\": [\n {\n \"extension\": [\n {\n \"extension\": [\n {\n \"url\": \"type\",\n \"valueCoding\": {\n \"code\": \"PAF\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType\"\n }\n },\n {\n \"url\": \"value\",\n \"valueString\": \"6290975\"\n }\n ],\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey\"\n }\n ],\n \"id\": \"RPnzd\",\n \"line\": [\n \"77 ANGERSTEIN ROAD\",\n \"SCUNTHORPE\",\n \"S HUMBERSIDE\"\n ],\n \"period\": {\n \"start\": \"2019-11-10\"\n },\n \"postalCode\": \"DN17 2NB\",\n \"use\": \"home\"\n }\n ],\n \"birthDate\": \"2013-09-02\",\n \"gender\": \"female\",\n \"generalPractitioner\": [\n {\n \"id\": \"yIjPV\",\n \"identifier\": {\n \"period\": {\n \"start\": \"2021-01-07\"\n },\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A20047\"\n }\n }\n ],\n \"identifier\": [\n {\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"01\",\n \"display\": \"Number present and verified\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\n \"version\": \"1.0.0\"\n }\n ]\n }\n }\n ],\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898652\"\n }\n ],\n \"name\": [\n {\n \"family\": \"CLYDE\",\n \"given\": [\n \"Deanne\",\n \"Tara\"\n ],\n \"period\": {\n \"start\": \"2018-06-16\"\n },\n \"prefix\": [\n \"MS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" - } - ] - }, - { - "name": "Valid request - NAM - Get proxy roles", - "event": [ - { - "listen": "prerequest", - "script": { - "exec": [ - "" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - }, - { - "listen": "test", - "script": { - "exec": [ - "" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "{{tpp_9674998535_access_token}};A82648", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=false;nam-cache-enabled=false;nam-enabled=true;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9674998535", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9674998535" - } - ] - }, - "description": "This request and its examples will only retrieve proxy roles directly from GPIT suppliers via NAM and not from the National Proxy Store.\n\nSee folder level docs for more info.\n\n## Example scenario\n\n**Given** proxy roles exist for a patient/performer in a GPIT system \n**And** no proxy roles exist in the National Proxy Store (NPS) for the patient/performer \n**When** a GET /Consent request is sent with the performer/patient identifier \n**Then** the proxy roles from GPIT are returned\n\n## Authorization\n\nPlease see the folder overview for details of how to generate tokens for this endpoint." - }, - "response": [ - { - "name": "No linked profiles returned from NAM - TPP user", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "83892b1a-6369-4657-a0c3-f6071a25e226", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "b496d552-f0c3-4e20-b362-cfc0c80724e3", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "{{tpp_9674998535_access_token}};A82648", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=false;nam-cache-enabled=false;nam-enabled=true;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9674998535&_include=Consent:performer&_include=Consent:patient", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9674998535" - }, - { - "key": "_include", - "value": "Consent:performer" - }, - { - "key": "_include", - "value": "Consent:patient" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Date", - "value": "Thu, 04 Dec 2025 11:22:00 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "5773" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "94465816-7aaa-4d03-81c9-e19156606316" - }, - { - "key": "x-amz-apigw-id", - "value": "VD5BAEGOLPEFVPA=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-69316ed8-af72bfe69942b25c155a4daa" - }, - { - "key": "X-Request-ID", - "value": "ed28025a-9c27-468c-85fd-9b1b8f794198" - }, - { - "key": "X-Correlation-ID", - "value": "fbd025d4-c7e1-4085-8bf8-d11b84652f8d" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:22:00Z\",\n \"total\": 2,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9674998535&_include=Consent%3Aperformer&_include=Consent%3Apatient\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/3a86ad92\",\n \"resource\": {\n \"id\": \"3a86ad92\",\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:21:58.915488+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9692113736\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998535\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998535\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/5c0c47d9\",\n \"resource\": {\n \"id\": \"5c0c47d9\",\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:21:58.915640+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998454\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998535\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998535\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/0b36c4e0\",\n \"resource\": {\n \"id\": \"0b36c4e0\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998535\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9692113736\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/bd6da0a0\",\n \"resource\": {\n \"id\": \"bd6da0a0\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998535\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998454\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/e41dfa63\",\n \"resource\": {\n \"id\": \"e41dfa63\",\n \"meta\": {\n \"profile\": [\n \"https://fhir.hl7.org.uk/StructureDefinition/UKCore-Patient\"\n ],\n \"security\": [\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ]\n },\n \"birthDate\": \"1985-05-29\",\n \"generalPractitioner\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A82648\"\n }\n }\n ],\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9692113736\"\n }\n ],\n \"name\": [\n {\n \"text\": \"Mr Kevin Barry\",\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/2d10a3d9\",\n \"resource\": {\n \"id\": \"2d10a3d9\",\n \"meta\": {\n \"profile\": [\n \"https://fhir.hl7.org.uk/StructureDefinition/UKCore-Patient\"\n ],\n \"security\": [\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ]\n },\n \"birthDate\": \"1921-10-17\",\n \"generalPractitioner\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A82648\"\n }\n }\n ],\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998454\"\n }\n ],\n \"name\": [\n {\n \"text\": \"Mr Landon Fahey\",\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" - }, - { - "name": "Linked profiles returned from NAM - TPP user", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "{{tpp_9674998454_access_token}};A82648", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=false;nam-cache-enabled=false;nam-enabled=true;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9674998454&_include=Consent:patient", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9674998454" - }, - { - "key": "_include", - "value": "Consent:patient" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Date", - "value": "Thu, 04 Dec 2025 11:22:15 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "4370" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "1b190446-e56f-4a64-8c54-25688af8f8f7" - }, - { - "key": "x-amz-apigw-id", - "value": "VD5EAFv1rPEF7zw=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-69316ee6-9925773ab605850282f2d18c" - }, - { - "key": "X-Request-ID", - "value": "dfa182c6-8f6a-46e9-bdc1-1ef5a00740c1" - }, - { - "key": "X-Correlation-ID", - "value": "d50ce1da-c025-451c-847e-c405c299115f" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:22:15Z\",\n \"total\": 2,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9674998454&_include=Consent%3Apatient\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/92a66114\",\n \"resource\": {\n \"id\": \"92a66114\",\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:22:15.290954+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998640\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998454\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998454\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/0b02be0a\",\n \"resource\": {\n \"id\": \"0b02be0a\",\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:22:15.290994+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998543\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998454\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998454\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/934bfd54\",\n \"resource\": {\n \"id\": \"934bfd54\",\n \"meta\": {\n \"profile\": [\n \"https://fhir.hl7.org.uk/StructureDefinition/UKCore-Patient\"\n ],\n \"security\": [\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ]\n },\n \"birthDate\": \"1998-11-14\",\n \"generalPractitioner\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A82648\"\n }\n }\n ],\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998640\"\n }\n ],\n \"name\": [\n {\n \"text\": \"Mr Harry Hood\",\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/29b6ab39\",\n \"resource\": {\n \"id\": \"29b6ab39\",\n \"meta\": {\n \"profile\": [\n \"https://fhir.hl7.org.uk/StructureDefinition/UKCore-Patient\"\n ],\n \"security\": [\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ]\n },\n \"birthDate\": \"1930-11-02\",\n \"generalPractitioner\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A82648\"\n }\n }\n ],\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998543\"\n }\n ],\n \"name\": [\n {\n \"text\": \"Miss Lisa Hankey\",\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" - }, - { - "name": "No linked profiles returned from NAM - EMIS user", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "{{emis_9692113612_access_token}};A29928", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=false;nam-cache-enabled=false;nam-enabled=true;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9692113612&_include=Consent:patient", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9692113612" - }, - { - "key": "_include", - "value": "Consent:patient" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Date", - "value": "Thu, 04 Dec 2025 11:22:37 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "283" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "15121c1a-99de-4830-86c7-00925d4faf3a" - }, - { - "key": "x-amz-apigw-id", - "value": "VD5HEE6MLPEFz5w=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-69316ef9-58a10d83bc130c381cdb0b44" - }, - { - "key": "X-Request-ID", - "value": "1828501c-86dc-4baf-9a13-e37a822e327f" - }, - { - "key": "X-Correlation-ID", - "value": "b891fe97-7778-4db5-be39-b23c03879d2d" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:22:36Z\",\n \"total\": 0,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9692113612&_include=Consent%3Apatient\"\n }\n ],\n \"entry\": []\n}" - }, - { - "name": "Linked profiles returned from NAM - EMIS user", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "{{emis_9692113698_access_token}};A00002", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=false;nam-cache-enabled=false;nam-enabled=true;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9692113698&_include=Consent:performer", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9692113698" - }, - { - "key": "_include", - "value": "Consent:patient", - "disabled": true - }, - { - "key": "_include", - "value": "Consent:performer" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Date", - "value": "Thu, 04 Dec 2025 11:24:08 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "17617" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "739313dc-9917-4df2-9b9d-e59bf36d8c4e" - }, - { - "key": "x-amz-apigw-id", - "value": "VD5U-FHkLPEF0fw=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-69316f52-1205235fe7d41983ba807831" - }, - { - "key": "X-Request-ID", - "value": "2eb98c87-f421-4902-a885-ecc408bd8d89" - }, - { - "key": "X-Correlation-ID", - "value": "4ac19b94-25d4-4de6-9be6-fe5a4a520d15" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:24:08Z\",\n \"total\": 9,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9692113698&_include=Consent%3Aperformer\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/2993b769\",\n \"resource\": {\n \"id\": \"2993b769\",\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:24:07.874676+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9661034451\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/c0d48822\",\n \"resource\": {\n \"id\": \"c0d48822\",\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:24:07.874715+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998403\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/75d0c9dc\",\n \"resource\": {\n \"id\": \"75d0c9dc\",\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:24:07.874739+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9661034400\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/2bed6c1e\",\n \"resource\": {\n \"id\": \"2bed6c1e\",\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:24:07.874762+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9661034168\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/ed77c791\",\n \"resource\": {\n \"id\": \"ed77c791\",\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:24:07.874785+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9253046414\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/02e9fe06\",\n \"resource\": {\n \"id\": \"02e9fe06\",\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:24:07.874807+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9930725970\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/70f274ba\",\n \"resource\": {\n \"id\": \"70f274ba\",\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:24:07.874830+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9803007025\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/87501704\",\n \"resource\": {\n \"id\": \"87501704\",\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:24:07.874852+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9734615173\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/022a7290\",\n \"resource\": {\n \"id\": \"022a7290\",\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:24:07.874874+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9694154065\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/4931d7ae\",\n \"resource\": {\n \"id\": \"4931d7ae\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9661034451\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/34e6ba88\",\n \"resource\": {\n \"id\": \"34e6ba88\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998403\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/1b0f7204\",\n \"resource\": {\n \"id\": \"1b0f7204\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9661034400\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/7115d670\",\n \"resource\": {\n \"id\": \"7115d670\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9661034168\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/63bd0423\",\n \"resource\": {\n \"id\": \"63bd0423\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9253046414\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/04683858\",\n \"resource\": {\n \"id\": \"04683858\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9930725970\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/e0cff956\",\n \"resource\": {\n \"id\": \"e0cff956\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9803007025\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/a9f54c1c\",\n \"resource\": {\n \"id\": \"a9f54c1c\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9734615173\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/8b794ba5\",\n \"resource\": {\n \"id\": \"8b794ba5\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9694154065\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" - } - ] - }, - { - "name": "Valid request - No proxy roles returned - Get proxy roles", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - }, - { - "listen": "prerequest", - "script": { - "exec": [ - "" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "SomeToken;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?patient:identifier=9736898199", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "patient:identifier", - "value": "9736898199" - } - ] - }, - "description": "## Example scenario\n\n**Given** no proxy roles exist for a patient/performer in NPS or GPIT systems \n**When** a GET /Consent request is sent with the performer/patient identifier \n**Then** no proxy roles are returned\n\n## Authorization\n\nPlease see the folder overview for details of how to generate tokens for this endpoint." - }, - "response": [ - { - "name": "No roles returned", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "b8b052ae-6841-4b64-bdf0-c969d32d94bd", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "e9920101-1ae7-4644-8ae9-5298f7bdda3b", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "SomeToken;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?patient:identifier=9736898199", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "patient:identifier", - "value": "9736898199" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Thu, 27 Nov 2025 15:20:11 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "254" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "62f7a9ef-477a-4a24-8bba-c3da1f684805" - }, - { - "key": "x-amz-apigw-id", - "value": "UtXWqH7MLPEFkaw=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-69286c2a-60c4f8c5c094e6753e2352ce" - }, - { - "key": "X-Request-ID", - "value": "31683198-4901-4516-8522-baf7a3de343a" - }, - { - "key": "X-Correlation-ID", - "value": "bdc29a81-c2c3-4622-b1cb-6b0d939ef622" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2025-11-27T15:20:11Z\",\n \"total\": 0,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?patient%3Aidentifier=9736898199\"\n }\n ],\n \"entry\": []\n}" - } - ] - }, - { - "name": "Invalid status parameter - Get proxy roles", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "SomeToken;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?patient:identifier=9736898199&status=test", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "patient:identifier", - "value": "9736898199" - }, - { - "key": "status", - "value": "test" - } - ] - }, - "description": "## Example scenario\n\n**Given** proxy roles exist for a patient/performer in NPS or a GPIT system \n**When** a GET /Consent request is sent with an invalid status parameter \n**Then** a 422 error is returned with the detail 'Required parameter(s) are invalid.'\n\n## Authorization\n\nPlease see the folder overview for details of how to generate tokens for this endpoint." - }, - "response": [ - { - "name": "Invalid status parameter error returned", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "dcc26889-b2fe-4794-9531-88c887f7e134", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "91e70db5-6a5d-4382-bfc1-027d2b81bc3c", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "SomeToken;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?patient:identifier=9736898199&status=test", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "patient:identifier", - "value": "9736898199" - }, - { - "key": "status", - "value": "test" - } - ] - } - }, - "status": "Unprocessable Entity (WebDAV) (RFC 4918)", - "code": 422, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Thu, 27 Nov 2025 16:45:57 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "375" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "072d3fa4-9703-4b80-88ba-e679c01b3129" - }, - { - "key": "x-amz-apigw-id", - "value": "Utj6vHGjLPEFvyQ=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-69288044-9a8fa9560202aeb1b9390e51" - }, - { - "key": "X-Request-ID", - "value": "0437a831-fa18-43ca-a376-21b2a8f33900" - }, - { - "key": "X-Correlation-ID", - "value": "8cf2b8d1-d98e-4b93-bb62-34583b31f0ea" - }, - { - "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_PARAMETER\",\n \"display\": \"Required parameter(s) are invalid.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"Invalid request with error - status parameter is invalid.\",\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" - } - ] - }, - { - "name": "Invalid include parameter - Get proxy roles", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "SomeToken;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9736898148&_include=Consent:test", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9736898148" - }, - { - "key": "_include", - "value": "Consent:test" - } - ] - }, - "description": "## Gherkin scenario\n\n**Given** proxy roles exist for a patient/performer in NPS or a GPIT system \n**When** a GET /Consent request is sent with an invalid include parameter \n**Then** a 422 error is returned with the detail 'Required parameter(s) are invalid.'\n\n## Authorization\n\nPlease see the folder overview for details of how to generate tokens for this endpoint." - }, - "response": [ - { - "name": "Invalid include parameter error returned", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "b14c0f0f-ad95-45e4-9b2a-9286fb050453", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "e7e0d226-d580-44a6-8688-2aeb0deedf00", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "SomeToken;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9736898148&_include=Consent:test", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9736898148" - }, - { - "key": "_include", - "value": "Consent:test" - } - ] - } - }, - "status": "Unprocessable Entity (WebDAV) (RFC 4918)", - "code": 422, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Thu, 27 Nov 2025 16:46:36 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "377" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "e9f62008-61ec-417a-8231-506b51d07844" - }, - { - "key": "x-amz-apigw-id", - "value": "UtkBAFkIrPEFuvQ=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-6928806c-3f5337b27e75f90c703fd6b0" - }, - { - "key": "X-Request-ID", - "value": "fb15a103-bf9a-499e-a7b1-24dc6563eb13" - }, - { - "key": "X-Correlation-ID", - "value": "f5ec5ae0-c762-4efb-95e3-317628c5cd80" - }, - { - "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_PARAMETER\",\n \"display\": \"Required parameter(s) are invalid.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"Invalid request with error - _include parameter is invalid.\",\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" - } - ] - }, - { - "name": "Invalid performer identifier - Get proxy roles", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "SomeToken;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=90000000", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "90000000" - } - ] - }, - "description": "## Example scenario\n\n**Given** proxy roles exist for a patient/performer in NPS or a GPIT system \n**When** a GET /Consent request is sent with an invalid performer identifier \n**Then** a 422 error is returned with the detail 'Required parameter(s) are invalid.'\n\n## Authorization\n\nPlease see the folder overview for details of how to generate tokens for this endpoint." - }, - "response": [ - { - "name": "Invalid performer identifier returned", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "6e975672-d1b4-402c-b47d-0994d55e1517", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "268d0936-6ffb-474a-a7bf-f44d4214e36e", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "SomeToken;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=90000000", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "90000000" - } - ] - } - }, - "status": "Unprocessable Entity (WebDAV) (RFC 4918)", - "code": 422, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Thu, 27 Nov 2025 16:47:01 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "428" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "2c57ff69-fe19-498b-8163-00b392e47313" - }, - { - "key": "x-amz-apigw-id", - "value": "UtkE-EaXLPEFV9Q=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-69288085-dfbdd45a57543fb9bb4ebd8b" - }, - { - "key": "X-Request-ID", - "value": "2d274752-140d-49de-ab31-56012d28c2cb" - }, - { - "key": "X-Correlation-ID", - "value": "7187bca7-8d57-4561-b0f2-a5aba91ec94c" - }, - { - "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_IDENTIFIER_VALUE\",\n \"display\": \"Required parameter(s) are invalid.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"Invalid request with error - performer:identifier or patient:identifier parameter is invalid.\",\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" - } - ] - }, - { - "name": "Invalid performer identifier system - Get proxy roles", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "SomeToken;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=invalid|9736898199", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "invalid|9736898199" - } - ] - }, - "description": "## Example scenario\n\n**Given** proxy roles exist for a patient/performer in NPS or a GPIT system \n**When** a GET /Consent request is sent with an invalid performer identifier system \n**Then** a 422 error is returned with the detail 'Required parameter(s) are invalid.'\n\n## Authorization\n\nPlease see the folder overview for details of how to generate tokens for this endpoint." - }, - "response": [ - { - "name": "Invalid performer identifier system error returned", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "995e5222-fce7-40e2-8424-1e920d920491", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "16ec5418-1591-45f7-a84c-e95cbcd5cd67", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "SomeToken;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=invalid|9736898199", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "invalid|9736898199" - } - ] - } - }, - "status": "Unprocessable Entity (WebDAV) (RFC 4918)", - "code": 422, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Thu, 27 Nov 2025 16:47:46 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "426" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "8a8529b6-34ac-46b1-8868-0a6ec0440151" - }, - { - "key": "x-amz-apigw-id", - "value": "UtkL-HDVLPEFVxg=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-692880b2-6286da8b511f08a6d7ccf9db" - }, - { - "key": "X-Request-ID", - "value": "9cc2d0ef-8f7a-46b7-89c9-c884bf61cc3a" - }, - { - "key": "X-Correlation-ID", - "value": "57948f02-5db0-4267-a6b7-cae30485e5eb" - }, - { - "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_IDENTIFIER_SYSTEM\",\n \"display\": \"Required parameter(s) are invalid.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"Invalid request with error - performer:identifier or patient:identifier system parameter is invalid.\",\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" - } - ] - }, - { - "name": "Missing performer identifier value - Get proxy roles", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "SomeToken;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ] - }, - "description": "## Example scenario\n\n**Given** proxy roles exist for a patient/performer in NPS or a GPIT system \n**When** a GET /Consent request is sent with an missing performer identifier value \n**Then** a 400 error is returned with the detail 'Required parameter(s) are missing.'\n\n## Authorization\n\nPlease see the folder overview for details of how to generate tokens for this endpoint." - }, - "response": [ - { - "name": "Missing performer identifier value error returned", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "53b3ca95-ad9d-4cd5-a194-78a42daff0df", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "88aaae3f-7168-4f69-b71a-60641082ab4b", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "SomeToken;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ] - } - }, - "status": "Bad Request", - "code": 400, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Thu, 27 Nov 2025 16:48:15 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "417" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "4984ba67-d994-4f08-910e-e25024a8ba57" - }, - { - "key": "x-amz-apigw-id", - "value": "UtkQdERvrPEFrBg=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-692880cf-614067cb88aa075eca482015" - }, - { - "key": "X-Request-ID", - "value": "f536a55f-7115-4ab4-a1c9-3049ca919351" - }, - { - "key": "X-Correlation-ID", - "value": "636e5f80-53b3-4bcf-9176-2967325a9e85" - }, - { - "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_IDENTIFIER_VALUE\",\n \"display\": \"Required parameter(s) are missing.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"Invalid request with error - performer:identifier or patient:identifier parameter not found.\",\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" - } - ] - }, - { - "name": "GP practice not found - Get proxy roles", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "SomeToken;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=false;nam-cache-enabled=false;nam-enabled=true;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9736898229", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9736898229" - } - ] - }, - "description": "## Example scenario\n\n**Given** a performer/patient is not registered at a GP \n**And** the performer/patient has no proxy roles in the National Proxy Store \n**When** a GET /Consent request is sent for the performer/patient \n**Then** a 404 error is returned with the detail 'GP Practice could not be found - invalid resources cannot be retrieved'\n\n## Authorization\n\nPlease see the folder overview for details of how to generate tokens for this endpoint." - }, - "response": [ - { - "name": "GP practice not found error returned", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "7c22ece1-b0a0-4067-8ad7-56f8bceced93", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "f1b40261-0aa6-44de-8563-3bfcc5813510", - "type": "text" - }, - { - "key": "X-IM1-Connection-Params", - "value": "SomeToken;A20047", - "type": "text" - }, - { - "key": "X-Test-Routing-Flag", - "value": "nps-enabled=false;nam-cache-enabled=false;nam-enabled=true;use-nam-mock=false", - "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9736898229", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9736898229" - } - ] - } - }, - "status": "Not Found", - "code": 404, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Thu, 27 Nov 2025 16:48:38 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "391" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "e0bae044-bde7-4def-a600-199f72ea2e50" - }, - { - "key": "x-amz-apigw-id", - "value": "UtkTcEIOLPEF5aQ=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-692880e2-7d058bc8fc71f9ee272f339d" - }, - { - "key": "X-Request-ID", - "value": "c1f8bed5-6729-4b9f-b20c-180b069809ed" - }, - { - "key": "X-Correlation-ID", - "value": "3132cc74-64ef-465d-aac9-502f27c6ac1d" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"issue\": [\n {\n \"code\": \"processing\",\n \"details\": {\n \"coding\": [\n {\n \"code\": \"GP_PRACTICE_NOT_FOUND\",\n \"display\": \"GP Practice could not be found - invalid resources cannot be retrieved\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"GP Practice could not be found\",\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" - } - ] - } - ], - "description": "## Authorization\n\n### Allowed auth methods\n\n- App restricted token\n \n- NHS Login token - Auth with test user `9730675929`\n \n- CIS2 token - Auth with test user `656005750108`\n \n\nSee collection level documentation for info about how to get authorization tokens.\n\n## NPS and NAM routing\n\nYou will notice that there are 'Valid request - NPS' and 'Valid request - NAM' requests and examples within this folder. These are set up to retrieve the proxy roles from different data sources:\n\n- **Valid request - NPS**: Retrieves the roles from the National Proxy Store (NPS) only. Following the eventual migration of all proxy and related person data from GPIT to NPS, this will become the only route for all requests.\n \n- **Valid request - NAM:** Retrives the roles as related person data from the GPIT suppliers via NAM without checking if any exist in NPS first. This requires specific connection parameters to authorise with the GPIT supplier systems\n \n\nThis routing is controlled in the requests by the `X-Test-Routing-Flag` header. This header is used in the VRS pre-prod environments to control where the proxy roles are retrieved from. It is intended to be used for testing purposes only. Omission of this header will cause the default routing settings for the given environment to be followed instead. This is typically for roles to be retrieved from NPS, with NAM used as a fallback if none are found.", - "auth": { - "type": "bearer", - "bearer": [ - { - "key": "token", - "value": "{{consent_app_auth_header_value}}", - "type": "string" - } - ] - }, - "event": [ - { - "listen": "prerequest", - "script": { - "type": "text/javascript", - "packages": {}, - "requests": {}, - "exec": [ - "var uuid = require('uuid');", - "", - "var privateKey = pm.environment.get('vrs_api_private_key') || '';", - "var api_key_value = pm.environment.get('nhs_developer_account_api_key') || '';", - "", - "if (!privateKey) {", - " throw new Error(\"Variable vrs_api_private_key must be set with your private key for signed JWT authentication.\");", - "}", - "", - "// Replace any '/n' new lines with actual new lines", - "privateKey = privateKey.replace(/\\\\n/g, '\\n');", - "", - "if (!api_key_value) {", - " throw new Error(\"Variable nhs_developer_account_app_key must be set with your integration testing application API key.\");", - "}", - "", - "var auth_url = 'https://int.api.service.nhs.uk/oauth2-mock/token';", - "var navigator = {};", - "var window = {};", - "const interval = setTimeout(() => {}, 2147483647);", - "", - "return new Promise((resolve, reject) => { ", - " if (pm.globals.has('jsrsasign-js') && pm.globals.get('jsrsasign-js') !== \"\") {", - " return resolve();", - " }", - "", - " pm.sendRequest(", - " {", - " url: 'https://kjur.github.io/jsrsasign/jsrsasign-all-min.js',", - " method: 'GET'", - " }, function (err, res) {", - " if (err) {", - " return reject(err);", - " }", - "", - " pm.globals.set('jsrsasign-js', res.text()); ", - " return resolve();", - " }", - " );", - "}).then(() => { ", - " eval(pm.globals.get(\"jsrsasign-js\")); ", - "", - " // Set headers for JWT", - " var header = {", - " 'typ': 'JWT',", - " 'alg': 'RS512',", - " 'kid': 'VRS-dev-12-nov-2025'", - " };", - "", - " // Prepare timestamp in seconds", - " var currentTimestamp = Math.floor(Date.now() / 1000)", - " var uuid = require('uuid');", - " var jti_value = uuid.v4();", - " var data = {", - " 'sub': api_key_value,", - " 'iss': api_key_value,", - " 'jti': jti_value,", - " 'aud': auth_url,", - " 'exp': currentTimestamp + 180, // expiry time is 180 seconds from time of creation", - " } ", - "", - " var sJWT = KJUR.jws.JWS.sign(header.alg, JSON.stringify(header), JSON.stringify(data), privateKey); ", - " return new Promise((resolve, reject) => { ", - " pm.sendRequest({", - " url: auth_url,", - " method: \"POST\",", - " header: {", - " \"Content-Type\": \"application/x-www-form-urlencoded\"", - " },", - " body: {", - " mode: \"urlencoded\",", - " urlencoded: [", - " {", - " key: \"grant_type\",", - " value: \"client_credentials\"", - " },", - " {", - " key: \"client_assertion_type\",", - " value: \"urn:ietf:params:oauth:client-assertion-type:jwt-bearer\",", - " },", - " {", - " key: \"client_assertion\",", - " value: sJWT", - " }", - " ]", - " }", - " }, function (err, res) { ", - " if (err) {", - " return reject(err);", - " }", - "", - " //assign the authorization header value", - " pm.environment.set('consent_app_auth_header_value', `${res.json().access_token}`);", - "", - " return resolve();", - " }); ", - " });", - "}).then(() => { ", - " clearTimeout(interval);", - "}).catch((err) => { ", - " console.error(err); ", - " clearTimeout(interval); ", - "});" - ] - } - }, - { - "listen": "test", - "script": { - "type": "text/javascript", - "packages": {}, - "requests": {}, - "exec": [ - "" - ] - } - } - ] - }, - { - "name": "Get proxy role (GET /Consent/{id})", - "item": [ - { - "name": "Valid request - Get proxy role", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent/:consent_id", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - ":consent_id" - ], - "variable": [ - { - "key": "consent_id", - "value": "4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40" - } - ] - }, - "description": "## Example scenario\n\n**Given** a proxy role exists between a performer and a patient in the National Proxy Store \n**When** a GET /Consent/{id} request is sent with the consent id of the proxy role \n**Then** the proxy role is returned" - }, - "response": [ - { - "name": "Proxy role returned - No patient or performer details", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "4b1a8cf8-aa7e-4aa2-b465-44a5d25be876", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "b09740bc-b71f-4d04-a597-c89ab3804f90", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent/:consent_id", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - ":consent_id" - ], - "variable": [ - { - "key": "consent_id", - "value": "4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Date", - "value": "Thu, 04 Dec 2025 11:28:18 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "1873" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "23636f8d-f5ef-4050-8c67-51e393b47c87" - }, - { - "key": "x-amz-apigw-id", - "value": "VD581F_4LPEFyDg=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-69317051-6384bdf9e3106d26096daa32" - }, - { - "key": "X-Request-ID", - "value": "784fb8d0-37ff-4716-bf77-81a395fd20f8" - }, - { - "key": "X-Correlation-ID", - "value": "ec404ce9-1721-4158-91af-2064ad3e7ea4" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:28:18Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40\",\n \"resource\": {\n \"id\": \"4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:08:46Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898660\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-12-05\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n }\n ]\n}" - }, - { - "name": "Proxy role returned - Include performer details", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent/:consent_id?_include=Consent:performer", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - ":consent_id" - ], - "query": [ - { - "key": "_include", - "value": "Consent:performer" - } - ], - "variable": [ - { - "key": "consent_id", - "value": "4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Date", - "value": "Thu, 04 Dec 2025 11:28:48 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "2789" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "a1f034c1-6ee8-499e-aa60-eea157ad4bd9" - }, - { - "key": "x-amz-apigw-id", - "value": "VD6AYFQMrPEFgjw=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-69317068-3a18b175fb02b76c68acfce1" - }, - { - "key": "X-Request-ID", - "value": "e8a5dada-5577-4738-abd5-7a09251e8c3b" - }, - { - "key": "X-Correlation-ID", - "value": "5eeb9d78-133f-4132-b121-649162a6bc14" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:28:47Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40?_include=Consent%3Aperformer\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40\",\n \"resource\": {\n \"id\": \"4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:08:46Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898660\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-12-05\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/nVLgl\",\n \"resource\": {\n \"id\": \"nVLgl\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898660\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" - }, - { - "name": "Proxy role returned - Include patient details", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent/:consent_id?_include=Consent:patient", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - ":consent_id" - ], - "query": [ - { - "key": "_include", - "value": "Consent:patient" - } - ], - "variable": [ - { - "key": "consent_id", - "value": "4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Date", - "value": "Thu, 04 Dec 2025 11:29:08 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "3601" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "b6cb5439-d1a8-4f95-bd3e-9dca7bed9e88" - }, - { - "key": "x-amz-apigw-id", - "value": "VD6ErHoPLPEF1rg=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-69317083-b57a368a7776107b8b3e5f7a" - }, - { - "key": "X-Request-ID", - "value": "22ca0610-1b6e-4e3a-aa1a-ede697da4a1d" - }, - { - "key": "X-Correlation-ID", - "value": "71035b63-936a-4ce4-b036-3d592c764d88" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:29:08Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40?_include=Consent%3Apatient\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40\",\n \"resource\": {\n \"id\": \"4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:08:46Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898660\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-12-05\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898660\",\n \"resource\": {\n \"id\": \"9736898660\",\n \"meta\": {\n \"security\": [\n {\n \"code\": \"U\",\n \"display\": \"unrestricted\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-Confidentiality\"\n },\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ],\n \"versionId\": \"4\"\n },\n \"address\": [\n {\n \"extension\": [\n {\n \"extension\": [\n {\n \"url\": \"type\",\n \"valueCoding\": {\n \"code\": \"PAF\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType\"\n }\n },\n {\n \"url\": \"value\",\n \"valueString\": \"19976537\"\n }\n ],\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey\"\n }\n ],\n \"id\": \"pBQDr\",\n \"line\": [\n \"CARLTON\",\n \"VICARAGE LANE\",\n \"REDBOURNE\",\n \"GAINSBOROUGH\",\n \"LINCS\"\n ],\n \"period\": {\n \"start\": \"2025-07-15\"\n },\n \"postalCode\": \"DN21 4QW\",\n \"use\": \"home\"\n }\n ],\n \"birthDate\": \"2012-04-24\",\n \"gender\": \"female\",\n \"generalPractitioner\": [\n {\n \"id\": \"xSEnH\",\n \"identifier\": {\n \"period\": {\n \"start\": \"2024-11-06\"\n },\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A20047\"\n }\n }\n ],\n \"identifier\": [\n {\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"01\",\n \"display\": \"Number present and verified\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\n \"version\": \"1.0.0\"\n }\n ]\n }\n }\n ],\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898660\"\n }\n ],\n \"name\": [\n {\n \"family\": \"GODREY\",\n \"given\": [\n \"Davina\",\n \"Linda\"\n ],\n \"period\": {\n \"start\": \"2017-04-22\"\n },\n \"prefix\": [\n \"MISS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" - }, - { - "name": "Proxy role returned - Include performer and patient details", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent/:consent_id?_include=Consent:patient&_include=Consent:performer", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - ":consent_id" - ], - "query": [ - { - "key": "_include", - "value": "Consent:patient" - }, - { - "key": "_include", - "value": "Consent:performer" - } - ], - "variable": [ - { - "key": "consent_id", - "value": "4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Date", - "value": "Thu, 04 Dec 2025 11:29:26 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "4517" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "9db19dac-df92-4494-8f31-076621ab3d1a" - }, - { - "key": "x-amz-apigw-id", - "value": "VD6HkGFkrPEFxmw=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-69317096-6ad930e767f145f7dd07b977" - }, - { - "key": "X-Request-ID", - "value": "5fd5c3dc-1f5c-4ac5-a9b4-018fdd7f1a0b" - }, - { - "key": "X-Correlation-ID", - "value": "fd7368b4-0828-40b0-97fa-6d19fb51a9e0" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:29:26Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40?_include=Consent%3Apatient&_include=Consent%3Aperformer\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40\",\n \"resource\": {\n \"id\": \"4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:08:46Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898660\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-12-05\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898660\",\n \"resource\": {\n \"id\": \"9736898660\",\n \"meta\": {\n \"security\": [\n {\n \"code\": \"U\",\n \"display\": \"unrestricted\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-Confidentiality\"\n },\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ],\n \"versionId\": \"4\"\n },\n \"address\": [\n {\n \"extension\": [\n {\n \"extension\": [\n {\n \"url\": \"type\",\n \"valueCoding\": {\n \"code\": \"PAF\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType\"\n }\n },\n {\n \"url\": \"value\",\n \"valueString\": \"19976537\"\n }\n ],\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey\"\n }\n ],\n \"id\": \"pBQDr\",\n \"line\": [\n \"CARLTON\",\n \"VICARAGE LANE\",\n \"REDBOURNE\",\n \"GAINSBOROUGH\",\n \"LINCS\"\n ],\n \"period\": {\n \"start\": \"2025-07-15\"\n },\n \"postalCode\": \"DN21 4QW\",\n \"use\": \"home\"\n }\n ],\n \"birthDate\": \"2012-04-24\",\n \"gender\": \"female\",\n \"generalPractitioner\": [\n {\n \"id\": \"xSEnH\",\n \"identifier\": {\n \"period\": {\n \"start\": \"2024-11-06\"\n },\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A20047\"\n }\n }\n ],\n \"identifier\": [\n {\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"01\",\n \"display\": \"Number present and verified\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\n \"version\": \"1.0.0\"\n }\n ]\n }\n }\n ],\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898660\"\n }\n ],\n \"name\": [\n {\n \"family\": \"GODREY\",\n \"given\": [\n \"Davina\",\n \"Linda\"\n ],\n \"period\": {\n \"start\": \"2017-04-22\"\n },\n \"prefix\": [\n \"MISS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/nVLgl\",\n \"resource\": {\n \"id\": \"nVLgl\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898660\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" - } - ] - }, - { - "name": "Invalid consent id - Get proxy role", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent/:consent_id", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - ":consent_id" - ], - "variable": [ - { - "key": "consent_id", - "value": "invalid" - } - ] - }, - "description": "## Example scenario\n\n**Given** a proxy role exists between a performer and a patient in the National Proxy Store \n**When** a GET /Consent/{id} request is sent where the ID is invalid \n**Then** a 400 error is returned with details including 'Required parameter(s) are invalid.'" - }, - "response": [ - { - "name": "Invalid consent id error returned", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "6ada3f0b-6520-4517-a71c-8ee93616f52b", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "ac9c9714-f361-44f2-92be-ea1eb00f9990", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent/:consent_id", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - ":consent_id" - ], - "variable": [ - { - "key": "consent_id", - "value": "invalid" - } - ] - } - }, - "status": "Unprocessable Entity (WebDAV) (RFC 4918)", - "code": 422, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Thu, 27 Nov 2025 16:49:51 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "370" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "8bae29b7-2cf9-4f6f-b054-0ff6133092b7" - }, - { - "key": "x-amz-apigw-id", - "value": "UtkfVE6VLPEFmDg=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-6928812e-f15d362bb65b30e32885ea32" - }, - { - "key": "X-Request-ID", - "value": "51f1c948-51e0-4719-8307-fd1f987809a1" - }, - { - "key": "X-Correlation-ID", - "value": "cf91adbc-f994-4a56-9d6b-2b324c0af196" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"issue\": [\n {\n \"code\": \"invalid\",\n \"diagnostics\": \"Invalid request with error - ID must be a valid UUID.\",\n \"details\": {\n \"coding\": [\n {\n \"code\": \"INVALID_ID_VALUE\",\n \"display\": \"Required parameter(s) are invalid.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" - } - ] - }, - { - "name": "Invalid include parameter - Get proxy role", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent/:consent_id?_include=Consent:invalid", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - ":consent_id" - ], - "query": [ - { - "key": "_include", - "value": "Consent:invalid" - } - ], - "variable": [ - { - "key": "consent_id", - "value": "77363c92-8c33-490f-b5c9-9ef81c2cf16f" - } - ] - }, - "description": "## Example scenario\n\n**Given** a proxy role exists between a performer and a patient in the National Proxy Store \n**When** a GET /Consent/{id} request is sent with an invalid include parameter \n**Then** a 422 error is returned with details including 'Required parameter(s) are invalid.'" - }, - "response": [ - { - "name": "Invalid include parameter error returned", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "b6656a79-4fde-4def-b9ae-5cb1d5667d8f", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "7ae117a4-5b43-4aac-aa00-5fcc0c460fac", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent/:consent_id?_include=Consent:invalid", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - ":consent_id" - ], - "query": [ - { - "key": "_include", - "value": "Consent:invalid" - } - ], - "variable": [ - { - "key": "consent_id", - "value": "77363c92-8c33-490f-b5c9-9ef81c2cf16f" - } - ] - } - }, - "status": "Unprocessable Entity (WebDAV) (RFC 4918)", - "code": 422, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Thu, 27 Nov 2025 16:50:07 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "377" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "6da48428-7512-4d8b-9856-b2cc37713381" - }, - { - "key": "x-amz-apigw-id", - "value": "Utkh9GPDLPEF3pw=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-6928813f-6ca71472e425ed45ed5bd0a5" - }, - { - "key": "X-Request-ID", - "value": "2dbb0b8c-a6c8-4bf2-9005-ec19ff68f5b2" - }, - { - "key": "X-Correlation-ID", - "value": "ec9a3692-5922-491d-8df1-da17fe8e473b" - }, - { - "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_PARAMETER\",\n \"display\": \"Required parameter(s) are invalid.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"Invalid request with error - _include parameter is invalid.\",\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" - } - ] - }, - { - "name": "Proxy role not found - Get proxy role", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent/:consent_id", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - ":consent_id" - ], - "variable": [ - { - "key": "consent_id", - "value": "4cfccac1-673c-4fea-9b73-54b1a605c9a0" - } - ] - }, - "description": "## Example scenario\n\n**Given** a proxy role does not exist between a performer and a patient in the National Proxy Store \n**When** a GET /Consent/{id} request is sent \n**Then** a 404 error is returned with details including 'Resource that has been marked as invalid was requested - invalid resources cannot be retrieved'" - }, - "response": [ - { - "name": "Proxy role not found error response", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "ed862755-76fc-47b5-9381-9578062418e3", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "5095096c-4f78-4544-b812-ba9a4b21d08d", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent/:consent_id", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - ":consent_id" - ], - "variable": [ - { - "key": "consent_id", - "value": "4cfccac1-673c-4fea-9b73-54b1a605c9a0" - } - ] - } - }, - "status": "Not Found", - "code": 404, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Thu, 27 Nov 2025 16:50:22 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "478" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "ece32b72-4d4a-43c9-b42a-e47b729e04da" - }, - { - "key": "x-amz-apigw-id", - "value": "UtkkIHJprPEFiYw=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-6928814d-5023dcb7c8009889ccde4f3d" - }, - { - "key": "X-Request-ID", - "value": "3ec49ee6-c56c-4df9-aa7a-f54bb6b3e795" - }, - { - "key": "X-Correlation-ID", - "value": "74eb5dd5-2d74-4b3a-a482-5480e1ad6464" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"issue\": [\n {\n \"code\": \"processing\",\n \"details\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\",\n \"code\": \"INVALIDATED_RESOURCE\",\n \"display\": \"Resource that has been marked as invalid was requested - invalid resources cannot be retrieved\"\n }\n ]\n },\n \"diagnostics\": \"Resource that has been marked as invalid was requested - invalid resources cannot be retrieved\",\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" - } - ] - }, - { - "name": "Missing consent id value - Get proxy role", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent/", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - "" - ] - }, - "description": "## Example scenario\n\n**Given** a proxy role exists between a performer and a patient in the National Proxy Store \n**When** a GET /Consent/{id} request is sent with the ID value missing \n**Then** a 400 error is returned with details including 'Required parameter(s) are missing.'" - }, - "response": [ - { - "name": "Missing consent id value error returned", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "7c50dc2d-fc25-4bed-8ce8-d58b4811f58c", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "210ede12-efec-4195-b2cd-1a04d1827a81", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/Consent/", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - "" - ] - } - }, - "status": "Bad Request", - "code": 400, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Thu, 27 Nov 2025 16:51:00 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "417" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "c4a3d99b-0ea1-40de-82bf-5cd2fa60afd6" - }, - { - "key": "x-amz-apigw-id", - "value": "UtkqLGF_rPEFcMw=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-69288173-c5d997b9110a61bf7b655fe7" - }, - { - "key": "X-Request-ID", - "value": "de0e2e5b-1f1b-4448-a7ee-42d0236b88a6" - }, - { - "key": "X-Correlation-ID", - "value": "6f458de2-64c6-4764-9044-34a5617d3d43" - }, - { - "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_IDENTIFIER_VALUE\",\n \"display\": \"Required parameter(s) are missing.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"Invalid request with error - performer:identifier or patient:identifier parameter not found.\",\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" - } - ] - } - ], - "description": "## Allowed auth methods\n\n- NHS Login token - Auth with test user `9730675929`\n \n- CIS2 token - Auth with test user `656005750108`\n \n\nSee collection level documentation for info about how to get authorization tokens.", - "auth": { - "type": "bearer", - "bearer": [ - { - "key": "token", - "value": "{{cis2_token}}", - "type": "string" - } - ] - }, - "event": [ - { - "listen": "prerequest", - "script": { - "type": "text/javascript", - "packages": {}, - "requests": {}, - "exec": [ - "" - ] - } - }, - { - "listen": "test", - "script": { - "type": "text/javascript", - "packages": {}, - "requests": {}, - "exec": [ - "" - ] - } - } - ] - }, - { - "name": "Create a new access request (POST /QuestionnaireResponse)", - "item": [ - { - "name": "Valid request - Proxy applicant - New adult to adult access request", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/fhir+json", - "type": "text" - }, - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Use-National-Proxy-Store", - "value": "False", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"resourceType\": \"QuestionnaireResponse\",\n \"status\": \"completed\",\n \"authored\": \"{{$isoTimestamp}}\",\n \"source\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9730675929\"\n }\n },\n \"subject\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898202\"\n }\n },\n \"questionnaire\": \"Questionnaire/{{$randomUUID}}\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson\",\n \"text\": \"relatedPerson\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_identifier\",\n \"text\": \"NHS Number\",\n \"answer\": [\n {\n \"valueString\": \"9730675929\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name\",\n \"text\": \"relatedPerson_name\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_name_first\",\n \"text\": \"First name.\",\n \"answer\": [\n {\n \"valueString\": \"Betty\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name_family\",\n \"text\": \"Family name (often called Surname).\",\n \"answer\": [\n {\n \"valueString\": \"MORLEY\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_birthDate\",\n \"text\": \"Date of Birth\",\n \"answer\": [\n {\n \"valueDate\": \"2005-01-20\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_basisForAccess\",\n \"text\": \"Basis For Access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_relationship\",\n \"text\": \"Relationship\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient\",\n \"text\": \"patient\",\n \"item\": [\n {\n \"linkId\": \"patient_identifier\",\n \"text\": \"NHS Number\",\n \"answer\": [\n {\n \"valueString\": \"9736898202\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name\",\n \"text\": \"patient_name\",\n \"item\": [\n {\n \"linkId\": \"patient_name_first\",\n \"text\": \"First name.\",\n \"answer\": [\n {\n \"valueString\": \"URIEL\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name_family\",\n \"text\": \"Family name (often called Surname).\",\n \"answer\": [\n {\n \"valueString\": \"ROTH\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient_birthDate\",\n \"text\": \"Date of Birth\",\n \"answer\": [\n {\n \"valueDate\": \"1988-11-10\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess\",\n \"text\": \"requestedAccess\",\n \"item\": [\n {\n \"linkId\": \"requestedAccess_accessLevel\",\n \"text\": \"Requested access level\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"APPT\",\n \"display\": \"Appointment Booking\"\n }\n },\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"VACC\",\n \"display\": \"Vaccination Records\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccess\",\n \"text\": \"Reason for access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-ReasonForAccess\",\n \"code\": \"COMB\",\n \"display\": \"Communication Barriers\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccessMoreinfo\",\n \"text\": \"Reason for access - further information\",\n \"answer\": [\n {\n \"valueString\": \"No internet connection\"\n }\n ]\n }\n ]\n }\n ]\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/QuestionnaireResponse", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "QuestionnaireResponse" - ] - }, - "description": "## Example scenario\n\n**Given** no proxy role exists between two adults \n**When** a valid access request is sent with the proxy as the applicant \n**Then** a 201 response is returned" - }, - "response": [ - { - "name": "A2A proxy applicant access request created", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/fhir+json", - "type": "text" - }, - { - "key": "X-Request-ID", - "value": "5ef96245-493a-468c-9936-06fb46e387af", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "15ace5c8-dc43-435f-baf8-3437b76ffdbf", - "type": "text" - }, - { - "key": "X-Use-National-Proxy-Store", - "value": "False", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"resourceType\": \"QuestionnaireResponse\",\n \"status\": \"completed\",\n \"authored\": \"2026-01-12T15:09:45.790Z\",\n \"source\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9730675929\"\n }\n },\n \"subject\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898202\"\n }\n },\n \"questionnaire\": \"Questionnaire/2e61ba16-f2ee-4e16-8526-194873d63f24\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson\",\n \"text\": \"relatedPerson\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_identifier\",\n \"text\": \"NHS Number\",\n \"answer\": [\n {\n \"valueString\": \"9730675929\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name\",\n \"text\": \"relatedPerson_name\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_name_first\",\n \"text\": \"First name.\",\n \"answer\": [\n {\n \"valueString\": \"Betty\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name_family\",\n \"text\": \"Family name (often called Surname).\",\n \"answer\": [\n {\n \"valueString\": \"MORLEY\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_birthDate\",\n \"text\": \"Date of Birth\",\n \"answer\": [\n {\n \"valueDate\": \"2005-01-20\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_basisForAccess\",\n \"text\": \"Basis For Access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_relationship\",\n \"text\": \"Relationship\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient\",\n \"text\": \"patient\",\n \"item\": [\n {\n \"linkId\": \"patient_identifier\",\n \"text\": \"NHS Number\",\n \"answer\": [\n {\n \"valueString\": \"9736898202\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name\",\n \"text\": \"patient_name\",\n \"item\": [\n {\n \"linkId\": \"patient_name_first\",\n \"text\": \"First name.\",\n \"answer\": [\n {\n \"valueString\": \"URIEL\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name_family\",\n \"text\": \"Family name (often called Surname).\",\n \"answer\": [\n {\n \"valueString\": \"ROTH\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient_birthDate\",\n \"text\": \"Date of Birth\",\n \"answer\": [\n {\n \"valueDate\": \"1988-11-10\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess\",\n \"text\": \"requestedAccess\",\n \"item\": [\n {\n \"linkId\": \"requestedAccess_accessLevel\",\n \"text\": \"Requested access level\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"APPT\",\n \"display\": \"Appointment Booking\"\n }\n },\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"VACC\",\n \"display\": \"Vaccination Records\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccess\",\n \"text\": \"Reason for access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-ReasonForAccess\",\n \"code\": \"COMB\",\n \"display\": \"Communication Barriers\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccessMoreinfo\",\n \"text\": \"Reason for access - further information\",\n \"answer\": [\n {\n \"valueString\": \"No internet connection\"\n }\n ]\n }\n ]\n }\n ]\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/QuestionnaireResponse", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "QuestionnaireResponse" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Mon, 01 Dec 2025 16:09:01 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "186" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "720499ae-68fe-495a-8485-862105f276a9" - }, - { - "key": "x-amz-apigw-id", - "value": "U6qQkGxVrPEFeoA=" - }, - { - "key": "location", - "value": "https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/QuestionnaireResponse/e185e5e3-901e-4b6a-bfe2-f9adb0b311a4" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-692dbd9c-999e6478f9613be345a68c77" - }, - { - "key": "X-Request-ID", - "value": "687bfc1b-b7a7-4681-a7bf-01ac6e7dd97a" - }, - { - "key": "X-Correlation-ID", - "value": "6adda3bb-aacf-4e4f-a459-a2a0fe6d34be" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"OperationOutcome\",\n \"issue\": [\n {\n \"severity\": \"information\",\n \"code\": \"informational\",\n \"details\": {\n \"coding\": [\n {\n \"code\": \"19C01XB6WC\",\n \"display\": \"19C01XB6WC\"\n }\n ]\n }\n }\n ]\n}" - } - ] - }, - { - "name": "Valid request - Patient applicant - New adult to adult access request", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/fhir+json", - "type": "text" - }, - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Use-National-Proxy-Store", - "value": "False", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"resourceType\": \"QuestionnaireResponse\",\n \"status\": \"completed\",\n \"authored\": \"{{$isoTimestamp}}\",\n \"source\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9730675929\"\n }\n },\n \"subject\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9730675929\"\n }\n },\n \"questionnaire\": \"Questionnaire/{{$randomUUID}}\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson\",\n \"text\": \"relatedPerson\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_identifier\",\n \"text\": \"NHS Number\",\n \"answer\": [\n {\n \"valueString\": \"9736898164\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name\",\n \"text\": \"relatedPerson_name\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_name_first\",\n \"text\": \"First name.\",\n \"answer\": [\n {\n \"valueString\": \"Heidi\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name_family\",\n \"text\": \"Family name (often called Surname).\",\n \"answer\": [\n {\n \"valueString\": \"LAW\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_birthDate\",\n \"text\": \"Date of Birth\",\n \"answer\": [\n {\n \"valueDate\": \"1997-09-15\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_basisForAccess\",\n \"text\": \"Basis For Access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_relationship\",\n \"text\": \"Relationship\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient\",\n \"text\": \"patient\",\n \"item\": [\n {\n \"linkId\": \"patient_identifier\",\n \"text\": \"NHS Number\",\n \"answer\": [\n {\n \"valueString\": \"9730675929\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name\",\n \"text\": \"patient_name\",\n \"item\": [\n {\n \"linkId\": \"patient_name_first\",\n \"text\": \"First name.\",\n \"answer\": [\n {\n \"valueString\": \"Betty\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name_family\",\n \"text\": \"Family name (often called Surname).\",\n \"answer\": [\n {\n \"valueString\": \"MORLEY\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient_birthDate\",\n \"text\": \"Date of Birth\",\n \"answer\": [\n {\n \"valueDate\": \"2005-01-20\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess\",\n \"text\": \"requestedAccess\",\n \"item\": [\n {\n \"linkId\": \"requestedAccess_accessLevel\",\n \"text\": \"Requested access level\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"APPT\",\n \"display\": \"Appointment Booking\"\n }\n },\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"VACC\",\n \"display\": \"Vaccination Records\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccess\",\n \"text\": \"Reason for access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-ReasonForAccess\",\n \"code\": \"COMB\",\n \"display\": \"Communication Barriers\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccessMoreinfo\",\n \"text\": \"Reason for access - further information\",\n \"answer\": [\n {\n \"valueString\": \"No internet connection\"\n }\n ]\n }\n ]\n }\n ]\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/QuestionnaireResponse", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "QuestionnaireResponse" - ] - }, - "description": "## Example scenario\n\n**Given** no proxy role exists between two adults \n**When** a valid access request is sent with the patient as the applicant \n**Then** a 201 response is returned" - }, - "response": [ - { - "name": "A2A patient applicant access request created", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/fhir+json", - "type": "text" - }, - { - "key": "X-Request-ID", - "value": "8af428cd-7e1e-4ed3-b127-0b751d6ae98d", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "e5cc0a6d-ea0d-433b-9307-30c988926969", - "type": "text" - }, - { - "key": "X-Use-National-Proxy-Store", - "value": "False", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"resourceType\": \"QuestionnaireResponse\",\n \"status\": \"completed\",\n \"authored\": \"2026-01-12T15:09:46.233Z\",\n \"source\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9730675929\"\n }\n },\n \"subject\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9730675929\"\n }\n },\n \"questionnaire\": \"Questionnaire/aa952e3f-3657-4ec3-bec0-25d881ed2e20\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson\",\n \"text\": \"relatedPerson\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_identifier\",\n \"text\": \"NHS Number\",\n \"answer\": [\n {\n \"valueString\": \"9736898164\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name\",\n \"text\": \"relatedPerson_name\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_name_first\",\n \"text\": \"First name.\",\n \"answer\": [\n {\n \"valueString\": \"Heidi\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name_family\",\n \"text\": \"Family name (often called Surname).\",\n \"answer\": [\n {\n \"valueString\": \"LAW\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_birthDate\",\n \"text\": \"Date of Birth\",\n \"answer\": [\n {\n \"valueDate\": \"1997-09-15\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_basisForAccess\",\n \"text\": \"Basis For Access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_relationship\",\n \"text\": \"Relationship\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient\",\n \"text\": \"patient\",\n \"item\": [\n {\n \"linkId\": \"patient_identifier\",\n \"text\": \"NHS Number\",\n \"answer\": [\n {\n \"valueString\": \"9730675929\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name\",\n \"text\": \"patient_name\",\n \"item\": [\n {\n \"linkId\": \"patient_name_first\",\n \"text\": \"First name.\",\n \"answer\": [\n {\n \"valueString\": \"Betty\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name_family\",\n \"text\": \"Family name (often called Surname).\",\n \"answer\": [\n {\n \"valueString\": \"MORLEY\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient_birthDate\",\n \"text\": \"Date of Birth\",\n \"answer\": [\n {\n \"valueDate\": \"2005-01-20\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess\",\n \"text\": \"requestedAccess\",\n \"item\": [\n {\n \"linkId\": \"requestedAccess_accessLevel\",\n \"text\": \"Requested access level\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"APPT\",\n \"display\": \"Appointment Booking\"\n }\n },\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"VACC\",\n \"display\": \"Vaccination Records\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccess\",\n \"text\": \"Reason for access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-ReasonForAccess\",\n \"code\": \"COMB\",\n \"display\": \"Communication Barriers\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccessMoreinfo\",\n \"text\": \"Reason for access - further information\",\n \"answer\": [\n {\n \"valueString\": \"No internet connection\"\n }\n ]\n }\n ]\n }\n ]\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/QuestionnaireResponse", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "QuestionnaireResponse" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Mon, 01 Dec 2025 16:10:22 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "186" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "d15e2ba0-3698-4fcf-80fe-d73279dd89a8" - }, - { - "key": "x-amz-apigw-id", - "value": "U6qdWHFfLPEFoUA=" - }, - { - "key": "location", - "value": "https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/QuestionnaireResponse/bdbba534-6e11-4491-aa3a-1631b0009628" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-692dbdee-08b18875f6f85ab2a7353bd4" - }, - { - "key": "X-Request-ID", - "value": "82cb14a5-09d0-41d4-8f73-2936794c32de" - }, - { - "key": "X-Correlation-ID", - "value": "73873b5d-1e2e-4a42-9dc3-83f1292f944b" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"OperationOutcome\",\n \"issue\": [\n {\n \"severity\": \"information\",\n \"code\": \"informational\",\n \"details\": {\n \"coding\": [\n {\n \"code\": \"19C0177GRI\",\n \"display\": \"19C0177GRI\"\n }\n ]\n }\n }\n ]\n}" - } - ] - }, - { - "name": "Valid request - New adult to child access request", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/fhir+json", - "type": "text" - }, - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Use-National-Proxy-Store", - "value": "False", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"resourceType\": \"QuestionnaireResponse\",\n \"status\": \"completed\",\n \"authored\": \"{{$isoTimestamp}}\",\n \"source\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9730675929\"\n }\n },\n \"subject\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898245\"\n }\n },\n \"questionnaire\": \"Questionnaire/01dc6813-3421-4d14-948d-a4888241add1\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson\",\n \"text\": \"relatedPerson\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_identifier\",\n \"text\": \"NHS Number\",\n \"answer\": [\n {\n \"valueString\": \"9730675929\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name\",\n \"text\": \"relatedPerson_name\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_name_first\",\n \"text\": \"First name.\",\n \"answer\": [\n {\n \"valueString\": \"Betty\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name_family\",\n \"text\": \"Family name (often called Surname).\",\n \"answer\": [\n {\n \"valueString\": \"MORLEY\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_birthDate\",\n \"text\": \"Date of Birth\",\n \"answer\": [\n {\n \"valueDate\": \"2005-01-20\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_basisForAccess\",\n \"text\": \"Basis For Access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_relationship\",\n \"text\": \"Relationship\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails\",\n \"text\": \"parentalApplicationSupplementaryDetails\",\n \"item\": [\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_evidenceOfResponsibility\",\n \"text\": \"Evidence of parental responsibility\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-EvidenceOfResponsibility\",\n \"code\": \"BRTH\",\n \"display\": \"Birth certificate\"\n }\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_evidenceOfResponsibilityMoreinfo\",\n \"text\": \"Evidence of responsibility - Further Information\",\n \"answer\": [\n {\n \"valueString\": \"Birth Certificate is original\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_isCurrentAddressConfirmed\",\n \"text\": \"Is current address confirmed?\",\n \"answer\": [\n {\n \"valueString\": \"Yes\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_newAddress\",\n \"text\": \"parentalApplicationSupplementaryDetails_newAddress\",\n \"item\": [\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_line1\",\n \"text\": \"Address Line 1\",\n \"answer\": [\n {\n \"valueString\": \"101 MESSINGHAM ROAD\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_line2\",\n \"text\": \"Address Line 2\",\n \"answer\": [\n {\n \"valueString\": \"\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_line3\",\n \"text\": \"Address Line 3\",\n \"answer\": [\n {\n \"valueString\": \"\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_city\",\n \"text\": \"Town / City\",\n \"answer\": [\n {\n \"valueString\": \"SCUNTHORPE\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_district\",\n \"text\": \"County\",\n \"answer\": [\n {\n \"valueString\": \"S HUMBERSIDE\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_postalCode\",\n \"text\": \"Postcode\",\n \"answer\": [\n {\n \"valueString\": \"DN17 2LN\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_liveAtSameAddress\",\n \"text\": \"Do the adult and child live at the same address?\",\n \"answer\": [\n {\n \"valueString\": \"Yes\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_canChildConsent\",\n \"text\": \"Can the child consent?\",\n \"answer\": [\n {\n \"valueString\": \"No\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_reasonNoChildConsent\",\n \"text\": \"Reason the child cannot consent\",\n \"answer\": [\n {\n \"valueString\": \"Child is too young\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient\",\n \"text\": \"patient\",\n \"item\": [\n {\n \"linkId\": \"patient_identifier\",\n \"text\": \"NHS Number\",\n \"answer\": [\n {\n \"valueString\": \"9736898245\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name\",\n \"text\": \"patient_name\",\n \"item\": [\n {\n \"linkId\": \"patient_name_first\",\n \"text\": \"First name.\",\n \"answer\": [\n {\n \"valueString\": \"Amber\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name_family\",\n \"text\": \"Family name (often called Surname).\",\n \"answer\": [\n {\n \"valueString\": \"TUCKER\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient_birthDate\",\n \"text\": \"Date of Birth\",\n \"answer\": [\n {\n \"valueDate\": \"2017-06-09\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess\",\n \"text\": \"requestedAccess\",\n \"item\": [\n {\n \"linkId\": \"requestedAccess_accessLevel\",\n \"text\": \"Requested access level\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"APPT\",\n \"display\": \"Appointment Booking\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccess\",\n \"text\": \"Reason for access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-ReasonForAccess\",\n \"code\": \"COMB\",\n \"display\": \"Communication Barriers\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccessMoreinfo\",\n \"text\": \"Reason for access - further information\",\n \"answer\": [\n {\n \"valueString\": \"No internet connection\"\n }\n ]\n }\n ]\n }\n ]\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/QuestionnaireResponse", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "QuestionnaireResponse" - ] - }, - "description": "## Example scenario\n\n**Given** no proxy role exists between an adult and child \n**When** a valid access request is sent with the proxy as the applicant \n**Then** a 201 response is returned" - }, - "response": [ - { - "name": "A2C access request created", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/fhir+json", - "type": "text" - }, - { - "key": "X-Request-ID", - "value": "d6f3b8fe-0041-4c34-aeb4-eac71020170d", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "46efa85e-d5c4-403b-a38a-1945f33bac2c", - "type": "text" - }, - { - "key": "X-Use-National-Proxy-Store", - "value": "False", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"resourceType\": \"QuestionnaireResponse\",\n \"status\": \"completed\",\n \"authored\": \"2026-01-12T15:09:46.453Z\",\n \"source\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9730675929\"\n }\n },\n \"subject\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898245\"\n }\n },\n \"questionnaire\": \"Questionnaire/01dc6813-3421-4d14-948d-a4888241add1\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson\",\n \"text\": \"relatedPerson\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_identifier\",\n \"text\": \"NHS Number\",\n \"answer\": [\n {\n \"valueString\": \"9730675929\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name\",\n \"text\": \"relatedPerson_name\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_name_first\",\n \"text\": \"First name.\",\n \"answer\": [\n {\n \"valueString\": \"Betty\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name_family\",\n \"text\": \"Family name (often called Surname).\",\n \"answer\": [\n {\n \"valueString\": \"MORLEY\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_birthDate\",\n \"text\": \"Date of Birth\",\n \"answer\": [\n {\n \"valueDate\": \"2005-01-20\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_basisForAccess\",\n \"text\": \"Basis For Access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_relationship\",\n \"text\": \"Relationship\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails\",\n \"text\": \"parentalApplicationSupplementaryDetails\",\n \"item\": [\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_evidenceOfResponsibility\",\n \"text\": \"Evidence of parental responsibility\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-EvidenceOfResponsibility\",\n \"code\": \"BRTH\",\n \"display\": \"Birth certificate\"\n }\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_evidenceOfResponsibilityMoreinfo\",\n \"text\": \"Evidence of responsibility - Further Information\",\n \"answer\": [\n {\n \"valueString\": \"Birth Certificate is original\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_isCurrentAddressConfirmed\",\n \"text\": \"Is current address confirmed?\",\n \"answer\": [\n {\n \"valueString\": \"Yes\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_newAddress\",\n \"text\": \"parentalApplicationSupplementaryDetails_newAddress\",\n \"item\": [\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_line1\",\n \"text\": \"Address Line 1\",\n \"answer\": [\n {\n \"valueString\": \"101 MESSINGHAM ROAD\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_line2\",\n \"text\": \"Address Line 2\",\n \"answer\": [\n {\n \"valueString\": \"\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_line3\",\n \"text\": \"Address Line 3\",\n \"answer\": [\n {\n \"valueString\": \"\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_city\",\n \"text\": \"Town / City\",\n \"answer\": [\n {\n \"valueString\": \"SCUNTHORPE\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_district\",\n \"text\": \"County\",\n \"answer\": [\n {\n \"valueString\": \"S HUMBERSIDE\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_postalCode\",\n \"text\": \"Postcode\",\n \"answer\": [\n {\n \"valueString\": \"DN17 2LN\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_liveAtSameAddress\",\n \"text\": \"Do the adult and child live at the same address?\",\n \"answer\": [\n {\n \"valueString\": \"Yes\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_canChildConsent\",\n \"text\": \"Can the child consent?\",\n \"answer\": [\n {\n \"valueString\": \"No\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_reasonNoChildConsent\",\n \"text\": \"Reason the child cannot consent\",\n \"answer\": [\n {\n \"valueString\": \"Child is too young\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient\",\n \"text\": \"patient\",\n \"item\": [\n {\n \"linkId\": \"patient_identifier\",\n \"text\": \"NHS Number\",\n \"answer\": [\n {\n \"valueString\": \"9736898245\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name\",\n \"text\": \"patient_name\",\n \"item\": [\n {\n \"linkId\": \"patient_name_first\",\n \"text\": \"First name.\",\n \"answer\": [\n {\n \"valueString\": \"Amber\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name_family\",\n \"text\": \"Family name (often called Surname).\",\n \"answer\": [\n {\n \"valueString\": \"TUCKER\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient_birthDate\",\n \"text\": \"Date of Birth\",\n \"answer\": [\n {\n \"valueDate\": \"2017-06-09\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess\",\n \"text\": \"requestedAccess\",\n \"item\": [\n {\n \"linkId\": \"requestedAccess_accessLevel\",\n \"text\": \"Requested access level\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"APPT\",\n \"display\": \"Appointment Booking\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccess\",\n \"text\": \"Reason for access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-ReasonForAccess\",\n \"code\": \"COMB\",\n \"display\": \"Communication Barriers\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccessMoreinfo\",\n \"text\": \"Reason for access - further information\",\n \"answer\": [\n {\n \"valueString\": \"No internet connection\"\n }\n ]\n }\n ]\n }\n ]\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/QuestionnaireResponse", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "QuestionnaireResponse" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Mon, 01 Dec 2025 16:11:33 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "186" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "4eba2237-3c13-4bab-afb1-1261b5ac6a19" - }, - { - "key": "x-amz-apigw-id", - "value": "U6qoVF-JLPEFXqQ=" - }, - { - "key": "location", - "value": "https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/QuestionnaireResponse/29a7f71a-2554-4e53-87de-07553d40d5ec" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-692dbe34-f306ba0e1a55aba127add964" - }, - { - "key": "X-Request-ID", - "value": "848e592d-a42e-4fee-b529-8ac484fd459c" - }, - { - "key": "X-Correlation-ID", - "value": "73de9aa5-5951-4d30-8f2d-e64482fb1990" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"OperationOutcome\",\n \"issue\": [\n {\n \"severity\": \"information\",\n \"code\": \"informational\",\n \"details\": {\n \"coding\": [\n {\n \"code\": \"19C01N8Q37\",\n \"display\": \"19C01N8Q37\"\n }\n ]\n }\n }\n ]\n}" - }, - { - "name": "A2C access request created - Verified relationship", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/fhir+json", - "type": "text" - }, - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Use-National-Proxy-Store", - "value": "False", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"resourceType\": \"QuestionnaireResponse\",\n \"status\": \"completed\",\n \"authored\": \"{{$isoTimestamp}}\",\n \"source\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9730675929\"\n }\n },\n \"subject\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9730675422\"\n }\n },\n \"questionnaire\": \"Questionnaire/01dc6813-3421-4d14-948d-a4888241add1\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson\",\n \"text\": \"relatedPerson\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_identifier\",\n \"text\": \"NHS Number\",\n \"answer\": [\n {\n \"valueString\": \"9730675929\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name\",\n \"text\": \"relatedPerson_name\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_name_first\",\n \"text\": \"First name.\",\n \"answer\": [\n {\n \"valueString\": \"Betty\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name_family\",\n \"text\": \"Family name (often called Surname).\",\n \"answer\": [\n {\n \"valueString\": \"MORLEY\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_birthDate\",\n \"text\": \"Date of Birth\",\n \"answer\": [\n {\n \"valueDate\": \"2005-01-20\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_basisForAccess\",\n \"text\": \"Basis For Access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_relationship\",\n \"text\": \"Relationship\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails\",\n \"text\": \"parentalApplicationSupplementaryDetails\",\n \"item\": [\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_evidenceOfResponsibility\",\n \"text\": \"Evidence of parental responsibility\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-EvidenceOfResponsibility\",\n \"code\": \"BRTH\",\n \"display\": \"Birth certificate\"\n }\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_evidenceOfResponsibilityMoreinfo\",\n \"text\": \"Evidence of responsibility - Further Information\",\n \"answer\": [\n {\n \"valueString\": \"Birth Certificate is original\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_isCurrentAddressConfirmed\",\n \"text\": \"Is current address confirmed?\",\n \"answer\": [\n {\n \"valueString\": \"Yes\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_newAddress\",\n \"text\": \"parentalApplicationSupplementaryDetails_newAddress\",\n \"item\": [\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_line1\",\n \"text\": \"Address Line 1\",\n \"answer\": [\n {\n \"valueString\": \"101 MESSINGHAM ROAD\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_line2\",\n \"text\": \"Address Line 2\",\n \"answer\": [\n {\n \"valueString\": \"\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_line3\",\n \"text\": \"Address Line 3\",\n \"answer\": [\n {\n \"valueString\": \"\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_city\",\n \"text\": \"Town / City\",\n \"answer\": [\n {\n \"valueString\": \"SCUNTHORPE\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_district\",\n \"text\": \"County\",\n \"answer\": [\n {\n \"valueString\": \"S HUMBERSIDE\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_postalCode\",\n \"text\": \"Postcode\",\n \"answer\": [\n {\n \"valueString\": \"DN17 2LN\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_liveAtSameAddress\",\n \"text\": \"Do the adult and child live at the same address?\",\n \"answer\": [\n {\n \"valueString\": \"Yes\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_canChildConsent\",\n \"text\": \"Can the child consent?\",\n \"answer\": [\n {\n \"valueString\": \"No\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_reasonNoChildConsent\",\n \"text\": \"Reason the child cannot consent\",\n \"answer\": [\n {\n \"valueString\": \"Child is too young\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient\",\n \"text\": \"patient\",\n \"item\": [\n {\n \"linkId\": \"patient_identifier\",\n \"text\": \"NHS Number\",\n \"answer\": [\n {\n \"valueString\": \"9730675422\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name\",\n \"text\": \"patient_name\",\n \"item\": [\n {\n \"linkId\": \"patient_name_first\",\n \"text\": \"First name.\",\n \"answer\": [\n {\n \"valueString\": \"Rowena\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name_family\",\n \"text\": \"Family name (often called Surname).\",\n \"answer\": [\n {\n \"valueString\": \"HIRST\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient_birthDate\",\n \"text\": \"Date of Birth\",\n \"answer\": [\n {\n \"valueDate\": \"2015-08-09\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess\",\n \"text\": \"requestedAccess\",\n \"item\": [\n {\n \"linkId\": \"requestedAccess_accessLevel\",\n \"text\": \"Requested access level\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"APPT\",\n \"display\": \"Appointment Booking\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccess\",\n \"text\": \"Reason for access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-ReasonForAccess\",\n \"code\": \"COMB\",\n \"display\": \"Communication Barriers\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccessMoreinfo\",\n \"text\": \"Reason for access - further information\",\n \"answer\": [\n {\n \"valueString\": \"No internet connection\"\n }\n ]\n }\n ]\n }\n ]\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/QuestionnaireResponse", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "QuestionnaireResponse" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Mon, 01 Dec 2025 16:11:33 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "186" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "4eba2237-3c13-4bab-afb1-1261b5ac6a19" - }, - { - "key": "x-amz-apigw-id", - "value": "U6qoVF-JLPEFXqQ=" - }, - { - "key": "location", - "value": "https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/QuestionnaireResponse/29a7f71a-2554-4e53-87de-07553d40d5ec" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-692dbe34-f306ba0e1a55aba127add964" - }, - { - "key": "X-Request-ID", - "value": "848e592d-a42e-4fee-b529-8ac484fd459c" - }, - { - "key": "X-Correlation-ID", - "value": "73de9aa5-5951-4d30-8f2d-e64482fb1990" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"OperationOutcome\",\n \"issue\": [\n {\n \"severity\": \"information\",\n \"code\": \"informational\",\n \"details\": {\n \"coding\": [\n {\n \"code\": \"19C01N8Q37\",\n \"display\": \"19C01N8Q37\"\n }\n ]\n }\n }\n ]\n}" - } - ] - }, - { - "name": "Invalid request body - New adult to adult access request", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/fhir+json", - "type": "text" - }, - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Use-National-Proxy-Store", - "value": "False", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/QuestionnaireResponse", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "QuestionnaireResponse" - ] - }, - "description": "## Example scenario\n\n**Given** no proxy role exists between two adults \n**When** a access request is sent with invalid body \n**Then** a 400 error response is returned with code 'INVALID_VALUE'" - }, - "response": [ - { - "name": "Invalid request body error response", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/fhir+json", - "type": "text" - }, - { - "key": "X-Request-ID", - "value": "94d7227f-f801-465f-b04c-8dd7494faf5f", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "7f829c8e-bec6-4cbe-8ed0-d71bf981095b", - "type": "text" - }, - { - "key": "X-Use-National-Proxy-Store", - "value": "False", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/QuestionnaireResponse", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "QuestionnaireResponse" - ] - } - }, - "status": "Bad Request", - "code": 400, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Mon, 01 Dec 2025 16:13:37 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "377" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "28073546-4513-47c5-9d2e-17caeb920a78" - }, - { - "key": "x-amz-apigw-id", - "value": "U6q7zHXFLPEF3Bg=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-692dbeb1-7dd1e1125d0b5422386cffe9" - }, - { - "key": "X-Request-ID", - "value": "d82f5db5-1c08-4251-a94b-50684ea1a06b" - }, - { - "key": "X-Correlation-ID", - "value": "7eeca365-bf2b-4859-9e2c-b5c7731bbe1b" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"issue\": [\n {\n \"code\": \"invalid\",\n \"details\": {\n \"coding\": [\n {\n \"code\": \"BAD_REQUEST\",\n \"display\": \"The request could not be processed.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"The supplied input is not a valid FHIR QuestionnaireResponse.\",\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" - } - ] - } - ], - "description": "## Allowed auth methods\n\n- NHS Login token - Auth with test user `9730675929`\n \n\nSee collection level documentation for info about how to get authorization tokens.", - "auth": { - "type": "bearer", - "bearer": [ - { - "key": "token", - "value": "{{login_token}}", - "type": "string" - } - ] - }, - "event": [ - { - "listen": "prerequest", - "script": { - "type": "text/javascript", - "packages": {}, - "requests": {}, - "exec": [ - "" - ] - } - }, - { - "listen": "test", - "script": { - "type": "text/javascript", - "packages": {}, - "requests": {}, - "exec": [ - "" - ] - } - } - ] - }, - { - "name": "Get access request (GET /QuestionnaireResponse/{id})", - "item": [ - { - "name": "Valid request - Get access request", - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/QuestionnaireResponse/:access_request_id", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "QuestionnaireResponse", - ":access_request_id" - ], - "variable": [ - { - "key": "access_request_id", - "value": "32a5cc78-eb64-4367-abea-cfdb6e9fa2e4" - } - ] - }, - "description": "## Example scenario\n\n**Given** a valid access request has been sent to VRS \n**When** a GET /QuestionnaireResponse/{id} request is sent with the access request UUID \n**Then** the access request is returned" - }, - "response": [] - }, - { - "name": "No access request found - Get access request", - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/QuestionnaireResponse/:access_request_id", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "QuestionnaireResponse", - ":access_request_id" - ], - "variable": [ - { - "key": "access_request_id", - "value": "32a5cc78-eb64-4367-abea-cfdb6e9fa2e4" - } - ] - }, - "description": "## Example scenario\n\n**Given** a valid access request has been sent to VRS \n**When** a GET /QuestionnaireResponse/{id} request is sent with a random UUID \n**Then** a 404 error is returned with message 'QUESTIONNAIRE_RESPONSE_NOT_FOUND'" - }, - "response": [ - { - "name": "No access request found error returned", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "074b07d8-104e-4574-abd7-bdc5181280da", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "f47a9a68-34a5-4a11-881b-8b45695f2e76", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/QuestionnaireResponse/:access_request_id", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "QuestionnaireResponse", - ":access_request_id" - ], - "variable": [ - { - "key": "access_request_id", - "value": "32a5cc78-eb64-4367-abea-cfdb6e9fa2e4" - } - ] - } - }, - "status": "Not Found", - "code": 404, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Mon, 01 Dec 2025 14:37:04 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "400" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "64959769-f136-4d27-9369-b4e01224c066" - }, - { - "key": "x-amz-apigw-id", - "value": "U6cyYE4brPEFXvw=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-692da80e-520fcf28565fe1ea77ceb7fc" - }, - { - "key": "X-Request-ID", - "value": "f6fe610a-d80b-4436-b727-67960c9687a1" - }, - { - "key": "X-Correlation-ID", - "value": "076421a4-1c56-43e4-95a9-6139434516a7" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"OperationOutcome\",\n \"issue\": [\n {\n \"severity\": \"error\",\n \"code\": \"not-found\",\n \"details\": {\n \"coding\": [\n {\n \"code\": \"QUESTIONNAIRE_RESPONSE_NOT_FOUND\",\n \"display\": \"Questionnaire response not found\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\"\n }\n ]\n },\n \"diagnostics\": \"The Questionnaire response could not be found using the provided access request ID.\"\n }\n ]\n}" - } - ] - }, - { - "name": "No access request UUID - Get access request", - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/QuestionnaireResponse/", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "QuestionnaireResponse", - "" - ] - }, - "description": "## Example scenario\n\n**Given** a valid access request has been sent to VRS \n**When** a GET /QuestionnaireResponse/{id} request is sent without a UUID \n**Then** a 400 error is returned with message 'METHOD_NOT_ALLOWED'" - }, - "response": [ - { - "name": "No access request UUID invalid response", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "6e763c1c-b24b-4ffe-8598-e2983ae5e3cf", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "87ed4d25-05d6-4ab6-985e-a254cdd26339", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/QuestionnaireResponse/", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "QuestionnaireResponse", - "" - ] - } - }, - "status": "Bad Request", - "code": 400, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Mon, 01 Dec 2025 15:15:37 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "370" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "42e98c18-f152-4e8f-8cd2-fc0ba2bcc590" - }, - { - "key": "x-amz-apigw-id", - "value": "U6ibrGjDrPEFgRQ=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-692db117-2a87f1ac0c50e6702fcbc5ce" - }, - { - "key": "X-Request-ID", - "value": "4270ae5f-3cc9-418e-a6f8-aab43372486a" - }, - { - "key": "X-Correlation-ID", - "value": "a23d9c20-bcf2-4e03-ba6b-092a703947f3" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"issue\": [\n {\n \"code\": \"not-supported\",\n \"details\": {\n \"coding\": [\n {\n \"code\": \"METHOD_NOT_ALLOWED\",\n \"display\": \"The method is not allowed.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"The method is not allowed for the requested resource.\",\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" - } - ] - }, - { - "name": "Invalid access request UUID - Get access request", - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/QuestionnaireResponse/invalid", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "QuestionnaireResponse", - "invalid" - ] - }, - "description": "## Example scenario\n\n**Given** a valid access request has been sent to VRS \n**When** a GET /QuestionnaireResponse/{id} request is sent with an invalid UUID \n**Then** a 400 error is returned with message 'INVALID_IDENTIFIER_VALUE'" - }, - "response": [ - { - "name": "Invalid access request UUID invalid response", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "30e863b4-b90b-439e-a757-06eadf3cae48", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "79bc7284-1f65-407a-bc5e-1e5bd8d0496b", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/QuestionnaireResponse/invalid", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "QuestionnaireResponse", - "invalid" - ] - } - }, - "status": "Bad Request", - "code": 400, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Mon, 01 Dec 2025 15:15:37 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "370" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "42e98c18-f152-4e8f-8cd2-fc0ba2bcc590" - }, - { - "key": "x-amz-apigw-id", - "value": "U6ibrGjDrPEFgRQ=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-692db117-2a87f1ac0c50e6702fcbc5ce" - }, - { - "key": "X-Request-ID", - "value": "4270ae5f-3cc9-418e-a6f8-aab43372486a" - }, - { - "key": "X-Correlation-ID", - "value": "a23d9c20-bcf2-4e03-ba6b-092a703947f3" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"OperationOutcome\",\n \"issue\": [\n {\n \"severity\": \"error\",\n \"code\": \"invalid\",\n \"details\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/STU3/CodeSystem/Spine-ErrorOrWarningCode-1\",\n \"code\": \"INVALID_IDENTIFIER_VALUE\",\n \"display\": \"Invalid identifier value\"\n }\n ]\n },\n \"diagnostics\": \"The specified access request ID is invalid. Access request IDs must be a valid UUID.\"\n }\n ]\n}" - } - ] - } - ], - "description": "## Allowed auth methods\n\n- CIS2 token - Auth with test user `656005750108`\n \n- NHS Login token - Auth with test user `9730675929`\n \n\nSee collection level documentation for info about how to get authorization tokens.", - "auth": { - "type": "bearer", - "bearer": [ - { - "key": "token", - "value": "{{cis2_token}}", - "type": "string" - } - ] - }, - "event": [ - { - "listen": "prerequest", - "script": { - "type": "text/javascript", - "packages": {}, - "requests": {}, - "exec": [ - "" - ] - } - }, - { - "listen": "test", - "script": { - "type": "text/javascript", - "packages": {}, - "requests": {}, - "exec": [ - "" - ] - } - } - ] - }, - { - "name": "Create a new proxy role (POST /Consent)", - "item": [ - { - "name": "Valid request - New proxy role", - "request": { - "auth": { - "type": "bearer", - "bearer": [ - { - "key": "token", - "value": "{{cis2_token}}", - "type": "string" - } - ] - }, - "method": "POST", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "Content-Type", - "value": "application/fhir+json", - "type": "text" - } - ], - "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 \t\"system\":\"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",\n \t\"code\":\"parental-responsibility\",\n \t\"display\":\"Parental responsibility\"\n }\n ]\n },\n \t\"reference\":{\"type\":\"RelatedPerson\",\"identifier\":{\"system\":\"https://fhir.nhs.uk/Id/nhs-number\",\"value\":\"9736898148\"}}\n }\n ]\n },\n \t\"extension\":[{\n\t\t\"url\":\"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n\t\t\"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" - } - } - }, - "url": { - "raw": "{{api_base_url}}/Consent", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ] - }, - "description": "## Important - duplicates\n\nWe cannot currently accept duplicate proxy role requests for testing purposes.\n\nThis may lead to you experiencing 409 errors on the 'valid request' scenarios if the same request has already been sent.\n\n## 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 \n**Then** a 201 success response is returned" - }, - "response": [ - { - "name": "Adult to child - New proxy role created", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "X-Request-ID", - "value": "df29a1cb-3861-4d7f-918d-3bcf6f5ef362", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "0b7ed233-3055-48ac-93ef-c71922ccc577", - "type": "text" - }, - { - "key": "Content-Type", - "value": "application/fhir+json", - "type": "text" - } - ], - "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", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/Consent", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Fri, 28 Nov 2025 15:14:39 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "101" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "bf6bc3d8-1829-4a81-9433-c0b1c21376d6" - }, - { - "key": "x-amz-apigw-id", - "value": "Uwpe7FCjrPEF5aQ=" - }, - { - "key": "location", - "value": "https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/4f15f399-d381-4949-a744-25f9cbfecfb3" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-6929bc5f-f6012c539553033b0859994a" - }, - { - "key": "X-Request-ID", - "value": "46baf4c8-5bb5-4a6e-9bd4-264452817dab" - }, - { - "key": "X-Correlation-ID", - "value": "65bdf903-1cb2-4722-a291-d5056c44e712" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"OperationOutcome\",\n \"issue\": [\n {\n \"severity\": \"information\",\n \"code\": \"informational\"\n }\n ]\n}" - }, - { - "name": "Adult to adult - New proxy role created", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "Content-Type", - "value": "application/fhir+json", - "type": "text" - } - ], - "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 \"performer\": [\n {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898164\"\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\": \"9736898164\"\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" - } - } - }, - "url": { - "raw": "{{api_base_url}}/Consent", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Fri, 28 Nov 2025 15:14:39 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "101" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "bf6bc3d8-1829-4a81-9433-c0b1c21376d6" - }, - { - "key": "x-amz-apigw-id", - "value": "Uwpe7FCjrPEF5aQ=" - }, - { - "key": "location", - "value": "https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/4f15f399-d381-4949-a744-25f9cbfecfb3" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-6929bc5f-f6012c539553033b0859994a" - }, - { - "key": "X-Request-ID", - "value": "46baf4c8-5bb5-4a6e-9bd4-264452817dab" - }, - { - "key": "X-Correlation-ID", - "value": "65bdf903-1cb2-4722-a291-d5056c44e712" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"OperationOutcome\",\n \"issue\": [\n {\n \"severity\": \"information\",\n \"code\": \"informational\"\n }\n ]\n}" - } - ] - }, - { - "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": {}, - "requests": {} - } - } - ], - "request": { - "auth": { - "type": "bearer", - "bearer": [ - { - "key": "token", - "value": "{{cis2_token}}", - "type": "string" - } - ] - }, - "method": "POST", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "Content-Type", - "value": "application/fhir+json", - "type": "text" - } - ], - "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 \"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.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" - } - } - }, - "url": { - "raw": "{{api_base_url}}/Consent", - "host": [ - "{{api_base_url}}" - ], - "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 identifier value error returned", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "X-Request-ID", - "value": "fa822d40-196d-4112-8c87-b46631ba7463", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "13f1ba14-20e9-48c8-b1ef-7f2c34d9bab3", - "type": "text" - }, - { - "key": "Content-Type", - "value": "application/fhir+json", - "type": "text" - } - ], - "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}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/Consent", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ] - } - }, - "status": "Unprocessable Entity (WebDAV) (RFC 4918)", - "code": 422, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Fri, 28 Nov 2025 12:46:09 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "402" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "369c4598-e093-44d1-8d27-015c1e1f8a40" - }, - { - "key": "x-amz-apigw-id", - "value": "UwTu1FORLPEFh3Q=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-69299991-27f38de5fa687e1e7d4659b3" - }, - { - "key": "X-Request-ID", - "value": "70591ef1-fbe0-442b-bd9a-545fb5713859" - }, - { - "key": "X-Correlation-ID", - "value": "037cf36b-1014-4177-bcc6-c1cd647aae42" - }, - { - "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_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}" - } - ] - }, - { - "name": "Duplicate role - New proxy role", - "request": { - "auth": { - "type": "bearer", - "bearer": [ - { - "key": "token", - "value": "{{cis2_token}}", - "type": "string" - } - ] - }, - "method": "POST", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "Content-Type", - "value": "application/fhir+json", - "type": "text" - } - ], - "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", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/Consent", - "host": [ - "{{api_base_url}}" - ], - "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", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "X-Request-ID", - "value": "8616edc0-f04b-4d56-ac54-4c5dd8930d87", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "42cf4c55-e180-4b8f-abe3-60acd1780311", - "type": "text" - }, - { - "key": "Content-Type", - "value": "application/fhir+json", - "type": "text" - } - ], - "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", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/Consent", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ] - } - }, - "status": "Conflict", - "code": 409, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Fri, 28 Nov 2025 12:41:31 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "352" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "de65a534-5cee-45c1-845e-023e9ffab375" - }, - { - "key": "x-amz-apigw-id", - "value": "UwTC8H42LPEFggg=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-69299878-54ea0e3b7bd5d7e836eaea8f" - }, - { - "key": "X-Request-ID", - "value": "dd90c863-82e3-4ef8-9568-3e68a64de1e0" - }, - { - "key": "X-Correlation-ID", - "value": "b08cd6b6-96fc-410c-84a9-e52732fcbc09" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "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}" - } - ] - }, - { - "name": "Missing scope - New proxy role", - "request": { - "method": "POST", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "Content-Type", - "value": "application/fhir+json", - "type": "text" - } - ], - "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}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/Consent", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ] - } - }, - "response": [ - { - "name": "Missing scope error returned", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "X-Request-ID", - "value": "2aa3293e-ad0e-4389-a466-d3209ebbfa4e", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "425ca0da-e10c-4010-86b4-93ca9bf737eb", - "type": "text" - }, - { - "key": "Content-Type", - "value": "application/fhir+json", - "type": "text" - } - ], - "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}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/Consent", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ] - } - }, - "status": "Bad Request", - "code": 400, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Fri, 28 Nov 2025 15:18:49 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "353" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "75bfd563-8f97-4b8a-8d50-a08643917d89" - }, - { - "key": "x-amz-apigw-id", - "value": "UwqGBE7MLPEFySQ=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-6929bd59-918cef993de61bcebe339d3e" - }, - { - "key": "X-Request-ID", - "value": "2ca06d13-2568-4f70-b06c-077af0f57137" - }, - { - "key": "X-Correlation-ID", - "value": "8c8ffb79-cc4c-4cb0-a62e-31dc1310a387" - }, - { - "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_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": "Invalid status - New proxy role", - "request": { - "method": "POST", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "Content-Type", - "value": "application/fhir+json", - "type": "text" - } - ], - "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}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/Consent", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ] - } - }, - "response": [ - { - "name": "Invalid status - New proxy role", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "X-Request-ID", - "value": "1e0a0136-6025-4190-8450-5676ada97c3c", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "bc404ec3-52fa-465c-9401-2b70484989bc", - "type": "text" - }, - { - "key": "Content-Type", - "value": "application/fhir+json", - "type": "text" - } - ], - "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}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/Consent", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ] - } - }, - "status": "Unprocessable Entity (WebDAV) (RFC 4918)", - "code": 422, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Fri, 28 Nov 2025 15:27:32 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "339" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "47dd1183-4b49-44f1-a524-79fe459589a9" - }, - { - "key": "x-amz-apigw-id", - "value": "UwrXkFOZrPEF1ZA=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-6929bf63-31132bda7b3f654ea3534f15" - }, - { - "key": "X-Request-ID", - "value": "e23fbdd1-027c-4281-b37d-094691df9fc7" - }, - { - "key": "X-Correlation-ID", - "value": "226277b1-9d7c-411a-b3fd-3a4a70a4d90e" - }, - { - "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_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": "Missing free text for Other", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "auth": { - "type": "bearer", - "bearer": [ - { - "key": "token", - "value": "{{cis2_token}}", - "type": "string" - } - ] - }, - "method": "POST", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "Content-Type", - "value": "application/fhir+json", - "type": "text" - } - ], - "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", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/Consent", - "host": [ - "{{api_base_url}}" - ], - "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": "Missing free text code error returned", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "Content-Type", - "value": "application/fhir+json", - "type": "text" - } - ], - "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", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/Consent", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ] - } - }, - "status": "Unprocessable Entity (WebDAV) (RFC 4918)", - "code": 422, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Fri, 28 Nov 2025 12:46:09 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "402" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "369c4598-e093-44d1-8d27-015c1e1f8a40" - }, - { - "key": "x-amz-apigw-id", - "value": "UwTu1FORLPEFh3Q=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-69299991-27f38de5fa687e1e7d4659b3" - }, - { - "key": "X-Request-ID", - "value": "70591ef1-fbe0-442b-bd9a-545fb5713859" - }, - { - "key": "X-Correlation-ID", - "value": "037cf36b-1014-4177-bcc6-c1cd647aae42" - }, - { - "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_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": "Invalid identifer system - New proxy role", - "request": { - "method": "POST", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "Content-Type", - "value": "application/fhir+json", - "type": "text" - } - ], - "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 \"performer\": [\n {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number/invalid\",\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" - } - } - }, - "url": { - "raw": "{{api_base_url}}/Consent", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ] - } - }, - "response": [ - { - "name": "Invalid status error returned", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "X-Request-ID", - "value": "004491e4-b270-4882-99c8-af4e387a505f", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "5f51e084-afd4-442b-b229-5470a750de52", - "type": "text" - }, - { - "key": "Content-Type", - "value": "application/fhir+json", - "type": "text" - } - ], - "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 \"performer\": [\n {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number/invalid\",\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" - } - } - }, - "url": { - "raw": "{{api_base_url}}/Consent", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ] - } - }, - "status": "Unprocessable Entity (WebDAV) (RFC 4918)", - "code": 422, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Fri, 28 Nov 2025 15:29:32 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "399" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "9ca19fe7-0a06-4da0-9b72-9e6135da40f1" - }, - { - "key": "x-amz-apigw-id", - "value": "UwrqcGPaLPEFWkg=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-6929bfdc-4e9f2ada8f5faf65f1630c1c" - }, - { - "key": "X-Request-ID", - "value": "21cc43ac-e531-477d-bc97-3e77e9657b52" - }, - { - "key": "X-Correlation-ID", - "value": "aeeaa71d-0a78-4e83-8c81-3b2884371ae9" - }, - { - "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_IDENTIFIER_SYSTEM\",\n \"display\": \"Invalid identifier system.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"Patient identifier system is invalid\",\n \"expression\": [\n \"patient.identifier.system\"\n ],\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" - } - ] - } - ], - "description": "## Allowed auth methods\n\n- CIS2 token - Auth with test user `656005750108`\n \n\nSee collection level documentation for info about how to get authorization tokens.", - "auth": { - "type": "bearer", - "bearer": [ - { - "key": "token", - "value": "{{cis2_token}}", - "type": "string" - } - ] - }, - "event": [ - { - "listen": "prerequest", - "script": { - "type": "text/javascript", - "packages": {}, - "requests": {}, - "exec": [ - "" - ] - } - }, - { - "listen": "test", - "script": { - "type": "text/javascript", - "packages": {}, - "requests": {}, - "exec": [ - "" - ] - } - } - ] - }, - { - "name": "Update proxy role (PATCH /Consent/{id})", - "item": [ - { - "name": "Valid request - Single update - Update proxy role", - "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 {\"op\": \"replace\", \"path\": \"/status\", \"value\": \"inactive\"},\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]\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": "Proxy role updated to 'inactive' status", - "originalRequest": { - "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 {\"op\": \"replace\", \"path\": \"/status\", \"value\": \"inactive\"},\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" - } - } - }, - "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" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Fri, 28 Nov 2025 16:23:31 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "101" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "5b03d759-c55a-462d-ba3c-e2dbf92d031a" - }, - { - "key": "x-amz-apigw-id", - "value": "UwzkUE0urPEFqHg=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-6929cc81-0d146fcdbc79baf5a5279c3d" - }, - { - "key": "X-Request-ID", - "value": "4555113e-aa4d-409d-bac0-41b0ed91cfc2" - }, - { - "key": "X-Correlation-ID", - "value": "b8c69a60-667d-4b0f-89c7-9de6d4e289a4" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"OperationOutcome\",\n \"issue\": [\n {\n \"severity\": \"information\",\n \"code\": \"informational\"\n }\n ]\n}" - }, - { - "name": "Proxy role end date updated", - "originalRequest": { - "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\": \"/provision/period/end\",\n \"value\": \"2026-12-31\"\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" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Date", - "value": "Thu, 04 Dec 2025 15:48:46 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "101" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "eb0a2130-76e5-41a0-9916-e7c8aa25a4ea" - }, - { - "key": "x-amz-apigw-id", - "value": "VEgG2Hh6LPEFXRQ=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-6931ad5e-d4506ade6d4f3410b20618b9" - }, - { - "key": "X-Request-ID", - "value": "90a9a964-db4c-4ec7-9498-76087f979bb5" - }, - { - "key": "X-Correlation-ID", - "value": "2aa6936b-c5ba-437d-898e-c58794601a01" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"OperationOutcome\",\n \"issue\": [\n {\n \"severity\": \"information\",\n \"code\": \"informational\"\n }\n ]\n}" - }, - { - "name": "Proxy role legal basis updated", - "originalRequest": { - "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\": \"/provision/actor\",\n \"value\": [\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]", - "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" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Date", - "value": "Thu, 04 Dec 2025 15:54:54 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "101" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "63072889-896c-43b1-aff1-0e4eceb2b4d4" - }, - { - "key": "x-amz-apigw-id", - "value": "VEg_9FQxLPEF1mA=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-6931aecc-d571f76cb8f3900088a01c45" - }, - { - "key": "X-Request-ID", - "value": "e436ebda-5011-431a-9de3-1d0749c6f45e" - }, - { - "key": "X-Correlation-ID", - "value": "930a58a1-7ca9-4a89-ac33-a24f5277b1d9" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"OperationOutcome\",\n \"issue\": [\n {\n \"severity\": \"information\",\n \"code\": \"informational\"\n }\n ]\n}" - } - ] - }, - { - "name": "Valid request - Multiple updates - Update proxy role", - "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 {\"op\": \"replace\", \"path\": \"/status\", \"value\": \"inactive\"},\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 {\n \"op\": \"replace\",\n \"path\": \"/provision/period/end\",\n \"value\": \"2026-12-31\"\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 with multiple updates for the proxy role \n**Then** a 200 response is returned and the role is updated" - }, - "response": [ - { - "name": "Proxy role status updated with end date", - "originalRequest": { - "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 {\"op\": \"replace\", \"path\": \"/status\", \"value\": \"inactive\"},\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 {\n \"op\": \"replace\",\n \"path\": \"/provision/period/end\",\n \"value\": \"2026-12-31\"\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" - } - ] - } - }, - "status": "Not Found", - "code": 404, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Date", - "value": "Thu, 04 Dec 2025 15:56:16 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "348" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "fbb23fc6-d143-4ad4-ab95-fef1276bf7d0" - }, - { - "key": "x-amz-apigw-id", - "value": "VEhNJE2VrPEFXkA=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-6931af20-0cc7e03b708f8949fc05bdfa" - }, - { - "key": "X-Request-ID", - "value": "0aa389b6-9542-428f-9e1c-b5411ff0a531" - }, - { - "key": "X-Correlation-ID", - "value": "e3845975-3d6b-4185-81cb-22a80f7ed0da" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"resourceType\": \"OperationOutcome\",\n \"issue\": [\n {\n \"severity\": \"information\",\n \"code\": \"informational\"\n }\n ]\n}" - } - ] - }, - { - "name": "Resource not found - Update proxy role", - "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 {\"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", - "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": "{{$randomUUID}}" - } - ] - }, - "description": "## Example scenario\n\n**Given** a proxy role exists in the National Proxy Store for a given UUID \n**When** a PATCH /Consent request is sent using the UUID \n**Then** a 404 error is returned with code 'RESOURCE_NOT_FOUND'" - }, - "response": [ - { - "name": "Resource not found error response", - "originalRequest": { - "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 {\"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", - "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": "{{$randomUUID}}" - } - ] - } - }, - "status": "Not Found", - "code": 404, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Fri, 28 Nov 2025 16:51:31 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "348" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "5940dd45-0b04-4e71-8fce-6a69665b256e" - }, - { - "key": "x-amz-apigw-id", - "value": "Uw3q4HTZrPEFxLQ=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-6929d312-f383a46c595faa9361bb8326" - }, - { - "key": "X-Request-ID", - "value": "4cfc1e62-1d97-47b2-825e-2f72eed5e29e" - }, - { - "key": "X-Correlation-ID", - "value": "db86232d-68a5-492d-96e3-02613a3cf6bf" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"issue\": [\n {\n \"code\": \"invalid\",\n \"diagnostics\": \"Proxy role not found.\",\n \"details\": {\n \"coding\": [\n {\n \"code\": \"RESOURCE_NOT_FOUND\",\n \"display\": \"Request must be for a existing proxy role.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" - } - ] - }, - { - "name": "Invalid status code - Update proxy role", - "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 {\"op\": \"replace\", \"path\": \"/status\", \"value\": \"invalid_status\"},\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", - "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 for a given UUID \n**When** a PATCH /Consent request is sent using the UUID \n**Then** a 404 error is returned with code 'RESOURCE_NOT_FOUND'" - }, - "response": [ - { - "name": "Invalid status code error returned", - "originalRequest": { - "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 {\"op\": \"replace\", \"path\": \"/status\", \"value\": \"invalid_status\"},\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", - "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": "aa58f9b7-2a02-45a2-9cb4-0d6fefe07a02" - } - ] - } - }, - "status": "Unprocessable Entity (WebDAV) (RFC 4918)", - "code": 422, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Fri, 28 Nov 2025 16:56:26 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "329" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "557c0652-9a38-434c-99c1-f979920055bf" - }, - { - "key": "x-amz-apigw-id", - "value": "Uw4ZOEOOLPEFggg=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-6929d43a-6c636f683c11b4ac83776aa6" - }, - { - "key": "X-Request-ID", - "value": "1a4ee8bf-0d2b-4398-950f-b3fd9332e7d3" - }, - { - "key": "X-Correlation-ID", - "value": "986fe591-c2f0-422d-9e1e-c99628e9a1df" - }, - { - "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_STATUS_CODE\",\n \"display\": \"Status code is invalid.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"Invalid status code.\",\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" - } - ] - }, - { - "name": "Invalid state transition - Update proxy role", - "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 {\"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]", - "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 for a given UUID \n**When** a PATCH /Consent request is sent using the UUID \n**Then** a 404 error is returned with code 'RESOURCE_NOT_FOUND'" - }, - "response": [ - { - "name": "Invalid status code error returned", - "originalRequest": { - "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\": \"someinvalidcode\"\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": "aa58f9b7-2a02-45a2-9cb4-0d6fefe07a02" - } - ] - } - }, - "status": "Unprocessable Entity (WebDAV) (RFC 4918)", - "code": 422, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Fri, 28 Nov 2025 16:56:26 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "329" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "557c0652-9a38-434c-99c1-f979920055bf" - }, - { - "key": "x-amz-apigw-id", - "value": "Uw4ZOEOOLPEFggg=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-6929d43a-6c636f683c11b4ac83776aa6" - }, - { - "key": "X-Request-ID", - "value": "1a4ee8bf-0d2b-4398-950f-b3fd9332e7d3" - }, - { - "key": "X-Correlation-ID", - "value": "986fe591-c2f0-422d-9e1e-c99628e9a1df" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"issue\": [\n {\n \"code\": \"invalid\",\n \"diagnostics\": \"Patch attempting invalid status change.\",\n \"details\": {\n \"coding\": [\n {\n \"code\": \"INVALID_STATE_TRANSITION\",\n \"display\": \"Status change is invalid.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" - } - ] - }, - { - "name": "Invalid path - Update proxy role", - "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\": \"/someotherpath\",\n \"value\": \"active\"\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 for a given UUID \n**When** a PATCH /Consent request with an invalid path is sent using the UUID \n**Then** a 400 error is returned with code 'INVALID_PATCH_PATH'" - }, - "response": [ - { - "name": "Invalid path error returned", - "originalRequest": { - "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\": \"/someotherpath\",\n \"value\": \"active\"\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": "aa58f9b7-2a02-45a2-9cb4-0d6fefe07a02" - } - ] - } - }, - "status": "Unprocessable Entity (WebDAV) (RFC 4918)", - "code": 422, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Fri, 28 Nov 2025 16:58:39 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "346" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "9c37f3a0-d1af-4a9d-8664-20edf45bd111" - }, - { - "key": "x-amz-apigw-id", - "value": "Uw4t7HzBrPEFTsw=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-6929d4bf-e038f4c128983e6e945b14ad" - }, - { - "key": "X-Request-ID", - "value": "3e5e943f-2647-4a09-b216-7d3551a637e7" - }, - { - "key": "X-Correlation-ID", - "value": "65dc6940-bcb3-466d-b25d-0a10ab98d7e6" - }, - { - "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_PATCH_PATH\",\n \"display\": \"Patch target is invalid.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"Patch targeting non-existent element.\",\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" - } - ] - }, - { - "name": "Missing free text for Other", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "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 {\"op\": \"replace\", \"path\": \"/status\", \"value\": \"inactive\"},\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\": \"OTHER\",\n \"display\": \"Other reason\"\n }\n ]\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 for a given UUID \n**When** a PATCH /Consent request with a missing free text and status reason of 'Other' is sent using the UUID \n**Then** a 400 error is returned with code 'MISSING_FREE_TEXT_FOR_OTHER'" - }, - "response": [ - { - "name": "Missing free text error", - "originalRequest": { - "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 {\"op\": \"replace\", \"path\": \"/status\", \"value\": \"inactive\"},\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\": \"OTHER\",\n \"display\": \"Other reason\"\n }\n ]\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" - } - ] - } - }, - "status": "Unprocessable Entity (WebDAV) (RFC 4918)", - "code": 422, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Fri, 28 Nov 2025 16:58:39 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "346" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "9c37f3a0-d1af-4a9d-8664-20edf45bd111" - }, - { - "key": "x-amz-apigw-id", - "value": "Uw4t7HzBrPEFTsw=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-6929d4bf-e038f4c128983e6e945b14ad" - }, - { - "key": "X-Request-ID", - "value": "3e5e943f-2647-4a09-b216-7d3551a637e7" - }, - { - "key": "X-Correlation-ID", - "value": "65dc6940-bcb3-466d-b25d-0a10ab98d7e6" - }, - { - "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_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}" - } - ] - } - ], - "description": "## Allowed auth methods\n\n- CIS2 token - Auth with test user `656005750108`\n \n- NHS Login token - Auth with test user `9730675929`\n \n\nSee collection level documentation for info about how to get authorization tokens." - }, - { - "name": "Get verified candidate relationships (GET /RelatedPerson)", - "item": [ - { - "name": "Valid request - Get verified candidate relationships", - "event": [ - { - "listen": "prerequest", - "script": { - "exec": [ - "" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/RelatedPerson?identifier=9736898121", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "RelatedPerson" - ], - "query": [ - { - "key": "identifier", - "value": "9736898121", - "description": "NHS number of the user to retrieve verified relationships for" - } - ] - }, - "description": "## Example scenario\n\n**Given** an NHS user has multiple related person relationships in PDS \n**When** a GET /RelatedPerson request is sent for the user \n**Then** the relationships are returned" - }, - "response": [ - { - "name": "Candidate relationship returned", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/RelatedPerson?identifier=9736898148", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "RelatedPerson" - ], - "query": [ - { - "key": "identifier", - "value": "9736898148", - "description": "NHS number of the user to retrieve verified relationships for" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Fri, 28 Nov 2025 17:10:29 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "927" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "3c77c3f5-2f94-4718-b4df-a994b49a9c8d" - }, - { - "key": "x-amz-apigw-id", - "value": "Uw6coGWKLPEFyvQ=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-6929d783-8368a433a0eae3395c7136cb" - }, - { - "key": "X-Request-ID", - "value": "e464b1c8-ad9b-41a2-9de3-2dd0e34d0fce" - }, - { - "key": "X-Correlation-ID", - "value": "056c8f1f-9d95-44b2-a4f7-582554f53387" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/IyKYB\",\n \"resource\": {\n \"id\": \"IyKYB\",\n \"birthDate\": \"2015-09-26\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n ],\n \"name\": [\n {\n \"family\": \"SHEPP\",\n \"given\": [\n \"Ashley\",\n \"Ellen\"\n ],\n \"period\": {\n \"start\": \"2025-08-06\"\n },\n \"prefix\": [\n \"MS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"MTH\",\n \"display\": \"mother\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n }\n ],\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson?identifier=9736898148\"\n }\n ],\n \"timestamp\": \"2025-11-28T17:10:29.231159+00:00\",\n \"total\": 1,\n \"type\": \"searchset\",\n \"resourceType\": \"Bundle\"\n}" - }, - { - "name": "Candidate relationship returned with patient details", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/RelatedPerson?identifier=9736898148&_include=RelatedPerson:patient", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "RelatedPerson" - ], - "query": [ - { - "key": "identifier", - "value": "9736898148", - "description": "NHS number of the user to retrieve verified relationships for" - }, - { - "key": "_include", - "value": "RelatedPerson:patient" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Date", - "value": "Fri, 28 Nov 2025 17:13:27 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "1395" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "a34914f5-c757-4a7c-b8e6-2061793de970" - }, - { - "key": "x-amz-apigw-id", - "value": "Uw63LFuCLPEFtfA=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-6929d82d-7210a91047b09608692e6ff6" - }, - { - "key": "X-Request-ID", - "value": "c46487fa-a7a9-4adb-82ec-dc7702fa66d4" - }, - { - "key": "X-Correlation-ID", - "value": "755116de-f4ef-406b-8088-1af14dd85c8d" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898644\",\n \"resource\": {\n \"id\": \"9736898644\",\n \"birthDate\": \"2015-09-26\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n ],\n \"name\": [\n {\n \"family\": \"SHEPP\",\n \"given\": [\n \"Ashley\",\n \"Ellen\"\n ],\n \"period\": {\n \"start\": \"2025-08-06\"\n },\n \"prefix\": [\n \"MS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/IyKYB\",\n \"resource\": {\n \"id\": \"IyKYB\",\n \"birthDate\": \"2015-09-26\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n ],\n \"name\": [\n {\n \"family\": \"SHEPP\",\n \"given\": [\n \"Ashley\",\n \"Ellen\"\n ],\n \"period\": {\n \"start\": \"2025-08-06\"\n },\n \"prefix\": [\n \"MS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"MTH\",\n \"display\": \"mother\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n }\n ],\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson?identifier=9736898148&_include=RelatedPerson%3Apatient\"\n }\n ],\n \"timestamp\": \"2025-11-28T17:13:27.630813+00:00\",\n \"total\": 1,\n \"type\": \"searchset\",\n \"resourceType\": \"Bundle\"\n}" - } - ] - }, - { - "name": "Valid request - No relationships returned - Get verified candidate relationships", - "event": [ - { - "listen": "prerequest", - "script": { - "exec": [ - "" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/RelatedPerson?identifier=9736898199", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "RelatedPerson" - ], - "query": [ - { - "key": "identifier", - "value": "9736898199", - "description": "NHS number of the user to retrieve verified relationships for" - } - ] - }, - "description": "## Example scenario\n\n**Given** an NHS user has no related person relationships in PDS \n**When** a GET /RelatedPerson request is sent for the user \n**Then** no relationships are returned" - }, - "response": [ - { - "name": "No relationships returned", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/RelatedPerson?identifier=9736898199", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "RelatedPerson" - ], - "query": [ - { - "key": "identifier", - "value": "9736898199", - "description": "NHS number of the user to retrieve verified relationships for" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Fri, 28 Nov 2025 17:15:06 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "249" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "9305e61b-2b8b-4a0c-84dd-0be9c4e1ce72" - }, - { - "key": "x-amz-apigw-id", - "value": "Uw7IDHSxrPEF7gg=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-6929d899-c345d4868005c5dc5999d598" - }, - { - "key": "X-Request-ID", - "value": "189b9dd8-722e-4e1b-b76b-75d2dd05fd00" - }, - { - "key": "X-Correlation-ID", - "value": "38045e59-8b2a-4f52-a1a5-834c91c25a9f" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson?identifier=9736898199\"\n }\n ],\n \"timestamp\": \"2025-11-28T17:15:05.994606+00:00\",\n \"total\": 0,\n \"type\": \"searchset\",\n \"resourceType\": \"Bundle\"\n}" - } - ] - }, - { - "name": "Valid request - Verify relationship - Get verified candidate relationships", - "event": [ - { - "listen": "prerequest", - "script": { - "exec": [ - "" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/RelatedPerson?identifier=9736898148&patient:identifier=9736898644", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "RelatedPerson" - ], - "query": [ - { - "key": "identifier", - "value": "9736898148", - "description": "NHS number of the user to retrieve verified relationships for" - }, - { - "key": "patient:identifier", - "value": "9736898644" - } - ] - }, - "description": "## Example scenario\n\n**Given** a proxy has a related person relationship in PDS \n**When** a GET /RelatedPerson request is sent for the proxy and the patient \n**Then** the relationship is returned" - }, - "response": [ - { - "name": "Verified relationship returned", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/RelatedPerson?identifier=9736898148&patient:identifier=9736898644", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "RelatedPerson" - ], - "query": [ - { - "key": "identifier", - "value": "9736898148", - "description": "NHS number of the user to retrieve verified relationships for" - }, - { - "key": "patient:identifier", - "value": "9736898644" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Fri, 28 Nov 2025 17:19:37 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "959" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "2ac409be-e9ce-4d73-a4b4-3c8a791aa51e" - }, - { - "key": "x-amz-apigw-id", - "value": "Uw7x4HIMrPEF-Fg=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-6929d9a5-d9df4059c3c602feabe873fc" - }, - { - "key": "X-Request-ID", - "value": "88367407-4953-4b64-9da0-6308c007b120" - }, - { - "key": "X-Correlation-ID", - "value": "8b55ca15-93fb-4ce9-be1b-eb0eb5e728fa" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/IyKYB\",\n \"resource\": {\n \"id\": \"IyKYB\",\n \"birthDate\": \"2015-09-26\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n ],\n \"name\": [\n {\n \"family\": \"SHEPP\",\n \"given\": [\n \"Ashley\",\n \"Ellen\"\n ],\n \"period\": {\n \"start\": \"2025-08-06\"\n },\n \"prefix\": [\n \"MS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"MTH\",\n \"display\": \"mother\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n }\n ],\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson?identifier=9736898148&patient%3Aidentifier=9736898644\"\n }\n ],\n \"timestamp\": \"2025-11-28T17:19:37.300736+00:00\",\n \"total\": 1,\n \"type\": \"searchset\",\n \"resourceType\": \"Bundle\"\n}" - }, - { - "name": "Verified relationship returned with patient details", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/RelatedPerson?identifier=9736898148&patient:identifier=9736898644&_include=RelatedPerson:patient", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "RelatedPerson" - ], - "query": [ - { - "key": "identifier", - "value": "9736898148", - "description": "NHS number of the user to retrieve verified relationships for" - }, - { - "key": "patient:identifier", - "value": "9736898644" - }, - { - "key": "_include", - "value": "RelatedPerson:patient" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Fri, 28 Nov 2025 17:19:37 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "959" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "2ac409be-e9ce-4d73-a4b4-3c8a791aa51e" - }, - { - "key": "x-amz-apigw-id", - "value": "Uw7x4HIMrPEF-Fg=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-6929d9a5-d9df4059c3c602feabe873fc" - }, - { - "key": "X-Request-ID", - "value": "88367407-4953-4b64-9da0-6308c007b120" - }, - { - "key": "X-Correlation-ID", - "value": "8b55ca15-93fb-4ce9-be1b-eb0eb5e728fa" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/IyKYB\",\n \"resource\": {\n \"id\": \"IyKYB\",\n \"birthDate\": \"2015-09-26\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n ],\n \"name\": [\n {\n \"family\": \"SHEPP\",\n \"given\": [\n \"Ashley\",\n \"Ellen\"\n ],\n \"period\": {\n \"start\": \"2025-08-06\"\n },\n \"prefix\": [\n \"MS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"MTH\",\n \"display\": \"mother\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n }\n ],\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson?identifier=9736898148&patient%3Aidentifier=9736898644\"\n }\n ],\n \"timestamp\": \"2025-11-28T17:19:37.300736+00:00\",\n \"total\": 1,\n \"type\": \"searchset\",\n \"resourceType\": \"Bundle\"\n}" - } - ] - }, - { - "name": "Missing identifier value - Get verified candidate relationships", - "event": [ - { - "listen": "prerequest", - "script": { - "exec": [ - "" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/RelatedPerson", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "RelatedPerson" - ] - }, - "description": "## Example scenario\n\n**Given** a proxy has a related person relationship in PDS \n**When** a GET /RelatedPerson request is sent with no identifier \n**Then** a 400 error is returned with code 'MISSING_IDENTIFIER_VALUE'" - }, - "response": [ - { - "name": "Missing identifier value error returned", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/RelatedPerson", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "RelatedPerson" - ] - } - }, - "status": "Bad Request", - "code": 400, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Fri, 28 Nov 2025 17:45:09 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "362" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "f524a29e-b0e9-45b0-af70-ad23fd87158c" - }, - { - "key": "x-amz-apigw-id", - "value": "Uw_h7GQFrPEF8xw=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-6929dfa5-ca879ed8f2a8b5c139182a8b" - }, - { - "key": "X-Request-ID", - "value": "28dbd904-517c-4e42-a3f6-37772b2da578" - }, - { - "key": "X-Correlation-ID", - "value": "e1229f7b-b14f-4858-b4fd-dcb3c9151a99" - }, - { - "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_IDENTIFIER_VALUE\",\n \"display\": \"Missing RelatedPerson NHS number.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"The 'identifier' parameter is required\",\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" - } - ] - }, - { - "name": "Invalid identifier value - Get verified candidate relationships", - "event": [ - { - "listen": "prerequest", - "script": { - "exec": [ - "" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/RelatedPerson?identifier=invalid", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "RelatedPerson" - ], - "query": [ - { - "key": "identifier", - "value": "invalid" - } - ] - }, - "description": "## Example scenario\n\n**Given** a proxy has a related person relationship in PDS \n**When** a GET /RelatedPerson request is sent with an invalid identifier \n**Then** a 400 error is returned with code 'INVALID_IDENTIFIER_VALUE'" - }, - "response": [ - { - "name": "Invalid identifier value error returned", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/RelatedPerson?identifier=invalid", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "RelatedPerson" - ], - "query": [ - { - "key": "identifier", - "value": "invalid" - } - ] - } - }, - "status": "Bad Request", - "code": 400, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Fri, 28 Nov 2025 17:47:15 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "422" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "7a627dc1-8fe7-4a07-9a17-5e8a7c77963b" - }, - { - "key": "x-amz-apigw-id", - "value": "Uw_1hFJWLPEFbKQ=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-6929e022-4dc5c06769a0b866a6456227" - }, - { - "key": "X-Request-ID", - "value": "c695d77b-b94e-4e04-9e2b-f7e34ef2e414" - }, - { - "key": "X-Correlation-ID", - "value": "46db2d38-e52b-4fcc-a8cf-2617fec4557a" - }, - { - "key": "Strict-Transport-Security", - "value": "max-age=31536000; includeSubDomains" - } - ], - "cookie": [], - "body": "{\n \"issue\": [\n {\n \"code\": \"invalid\",\n \"diagnostics\": \"Not a valid NHS Number provided for the 'identifier' parameter\",\n \"expression\": [\n \"RelatedPerson.identifier\"\n ],\n \"details\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\",\n \"code\": \"INVALID_IDENTIFIER_VALUE\",\n \"display\": \"Provided value is invalid\"\n }\n ]\n },\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" - } - ] - }, - { - "name": "Invalid identifier system - Get verified candidate relationships", - "event": [ - { - "listen": "prerequest", - "script": { - "exec": [ - "" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/RelatedPerson?identifier=https://fhir.nhs.uk/Id/nhs-number/invalid|730675929", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "RelatedPerson" - ], - "query": [ - { - "key": "identifier", - "value": "https://fhir.nhs.uk/Id/nhs-number/invalid|730675929" - } - ] - }, - "description": "## Example scenario\n\n**Given** a proxy has a related person relationship in PDS \n**When** a GET /RelatedPerson request is sent with an invalid identifier \n**Then** a 400 error is returned with code 'INVALID_IDENTIFIER_VALUE'" - }, - "response": [ - { - "name": "Invalid identifier value error returned", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "{{$guid}}", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "{{$guid}}", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/RelatedPerson?identifier=https://fhir.nhs.uk/Id/nhs-number/invalid|730675929", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "RelatedPerson" - ], - "query": [ - { - "key": "identifier", - "value": "https://fhir.nhs.uk/Id/nhs-number/invalid|730675929" - } - ] - } - }, - "status": "Bad Request", - "code": 400, - "_postman_previewlanguage": "Text", - "header": [ - { - "key": "Date", - "value": "Fri, 28 Nov 2025 17:48:42 GMT" - }, - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "Content-Length", - "value": "352" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "x-amzn-RequestId", - "value": "66e70023-f78b-48aa-a29f-3df08e3e895c" - }, - { - "key": "x-amz-apigw-id", - "value": "UxADKEqiLPEFbWw=" - }, - { - "key": "X-Amzn-Trace-Id", - "value": "Root=1-6929e07a-ade89162a2d0b573830554ca" - }, - { - "key": "X-Request-ID", - "value": "a6c275c6-3964-4d18-8860-fcf25e510f14" - }, - { - "key": "X-Correlation-ID", - "value": "1d7ecfb8-29fb-461a-9904-e28216b510f8" - }, - { - "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_IDENTIFIER_SYSTEM\",\n \"display\": \"Invalid identifier system\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"The identifier system is not valid.\",\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" - } - ] - } - ], - "description": "## Allowed auth methods\n\n- NHS Login token - Auth with test user `9730675929`\n \n- CIS2 token - Auth with test user `656005750108`\n \n\nSee collection level documentation for info about how to get authorization tokens.", - "auth": { - "type": "bearer", - "bearer": [ - { - "key": "token", - "value": "{{cis2_token}}", - "type": "string" - } - ] - }, - "event": [ - { - "listen": "prerequest", - "script": { - "type": "text/javascript", - "packages": {}, - "requests": {}, - "exec": [ - "" - ] - } - }, - { - "listen": "test", - "script": { - "type": "text/javascript", - "packages": {}, - "requests": {}, - "exec": [ - "" - ] - } - } - ] - } - ], - "auth": { - "type": "bearer", - "bearer": [ - { - "key": "token", - "value": "{{authorization_header_value}}", - "type": "string" - } - ] - }, - "event": [ - { - "listen": "prerequest", - "script": { - "type": "text/javascript", - "packages": {}, - "requests": {}, - "exec": [ - "" - ] - } - }, - { - "listen": "test", - "script": { - "type": "text/javascript", - "packages": {}, - "requests": {}, - "exec": [ - "" - ] - } - } - ], - "variable": [ - { - "key": "nps_enabled", - "value": "" - }, - { - "key": "nam_cache_enabled", - "value": "" - }, - { - "key": "nam_enabled", - "value": "" - }, - { - "key": "use_nam_mock", - "value": "" - } - ] + "info": { + "_postman_id": "78e44fe9-e7fc-4c60-a2d6-4a6c76745191", + "name": "Validated Relationship Service - Integration - 29/01/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 \n- App-restricted - for service-to-service authorization\n \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 \n- get_cis2_access_token_int.py - for CIS2 authorization\n \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\n \n2. Go to the Authorization tab for this Postman request\n \n3. Select 'Bearer token' from the drop-down\n \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 \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": "50770159" + }, + "item": [ + { + "name": "Get proxy roles (GET /Consent)", + "item": [ + { + "name": "Valid request - NPS - Get proxy roles for performer", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "" + ], + "type": "text/javascript", + "packages": {}, + "requests": {} + } + }, + { + "listen": "test", + "script": { + "exec": [ + "" + ], + "type": "text/javascript", + "packages": {}, + "requests": {} + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "SomeToken;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9736898148", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9736898148" + } + ] + }, + "description": "This request and its examples will only retrieve proxy roles from the National Proxy Store and not directly from GPIT suppliers via NAM.\n\nSee folder-level docs for more info.\n\n## Example scenario\n\n**Given** proxy roles exist for a performer (proxy) in the National Proxy Store (NPS) \n**When** a GET /Consent request is sent with the performer identifier \n**Then** the proxy roles in NPS are returned\n\n## Authorization\n\nPlease see the folder overview for details of how to generate tokens for this endpoint." + }, + "response": [ + { + "name": "Proxy roles returned - No patient or performer details", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "1c190795-98fc-40d0-b13d-4b566650950a", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "3bedabd0-b86f-4d7b-92d9-94f020b4a834", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "some_token;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9736898148", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9736898148" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Date", + "value": "Thu, 04 Dec 2025 10:48:19 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "3486" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "cf3a99a3-7592-4968-893c-e443d6cb27c8" + }, + { + "key": "x-amz-apigw-id", + "value": "VD0FoHiurPEFXqQ=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-693166f0-1bb8c61dd3aa101687d0b754" + }, + { + "key": "X-Request-ID", + "value": "d3ec5ec8-088f-4db6-8342-1a21d2a2af16" + }, + { + "key": "X-Correlation-ID", + "value": "656bfa49-711b-48c4-9427-1ed8fa34260f" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T10:48:19Z\",\n \"total\": 2,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9736898148\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"resource\": {\n \"id\": \"7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n },\n {\n \"url\": \"http://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 \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T10:46:27Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/b22d6068-fe78-40f4-b71a-b916dac48c0b\",\n \"resource\": {\n \"id\": \"b22d6068-fe78-40f4-b71a-b916dac48c0b\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n },\n {\n \"url\": \"http://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 \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T10:47:43Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n }\n ]\n}" + }, + { + "name": "Proxy roles returned - Include patient details", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "some_token;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9736898148&_include=Consent:patient", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9736898148" + }, + { + "key": "_include", + "value": "Consent:patient" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Date", + "value": "Thu, 04 Dec 2025 10:50:25 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "6923" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "edd035fd-2cdb-4c7a-a55c-a55e6faf5743" + }, + { + "key": "x-amz-apigw-id", + "value": "VD0ZXFA2LPEFYqg=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-6931676e-74035c00139aae000a60b5d7" + }, + { + "key": "X-Request-ID", + "value": "64b0f06f-a35e-44bb-baf4-33de94895236" + }, + { + "key": "X-Correlation-ID", + "value": "6a95b411-9936-49bb-bbcb-8e6776417762" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T10:50:25Z\",\n \"total\": 2,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9736898148&_include=Consent%3Apatient\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"resource\": {\n \"id\": \"7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n },\n {\n \"url\": \"http://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 \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T10:46:27Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/b22d6068-fe78-40f4-b71a-b916dac48c0b\",\n \"resource\": {\n \"id\": \"b22d6068-fe78-40f4-b71a-b916dac48c0b\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n },\n {\n \"url\": \"http://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 \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T10:47:43Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898644\",\n \"resource\": {\n \"id\": \"9736898644\",\n \"meta\": {\n \"security\": [\n {\n \"code\": \"U\",\n \"display\": \"unrestricted\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-Confidentiality\"\n },\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ],\n \"versionId\": \"4\"\n },\n \"address\": [\n {\n \"extension\": [\n {\n \"extension\": [\n {\n \"url\": \"type\",\n \"valueCoding\": {\n \"code\": \"PAF\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType\"\n }\n },\n {\n \"url\": \"value\",\n \"valueString\": \"29706100\"\n }\n ],\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey\"\n }\n ],\n \"id\": \"gDmhc\",\n \"line\": [\n \"BRAMBLE COTTAGE\",\n \"OLD VICARAGE PARK\",\n \"SCAWBY\",\n \"BRIGG\",\n \"S HUMBERSIDE\"\n ],\n \"period\": {\n \"start\": \"2021-09-10\"\n },\n \"postalCode\": \"DN20 9RL\",\n \"use\": \"home\"\n }\n ],\n \"birthDate\": \"2015-09-26\",\n \"gender\": \"female\",\n \"generalPractitioner\": [\n {\n \"id\": \"gDHTb\",\n \"identifier\": {\n \"period\": {\n \"start\": \"2018-08-22\"\n },\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A20047\"\n }\n }\n ],\n \"identifier\": [\n {\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"01\",\n \"display\": \"Number present and verified\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\n \"version\": \"1.0.0\"\n }\n ]\n }\n }\n ],\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n ],\n \"name\": [\n {\n \"family\": \"SHEPP\",\n \"given\": [\n \"Ashley\",\n \"Ellen\"\n ],\n \"period\": {\n \"start\": \"2025-08-06\"\n },\n \"prefix\": [\n \"MS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898717\",\n \"resource\": {\n \"id\": \"9736898717\",\n \"meta\": {\n \"security\": [\n {\n \"code\": \"U\",\n \"display\": \"unrestricted\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-Confidentiality\"\n },\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ],\n \"versionId\": \"4\"\n },\n \"address\": [\n {\n \"extension\": [\n {\n \"extension\": [\n {\n \"url\": \"type\",\n \"valueCoding\": {\n \"code\": \"PAF\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType\"\n }\n },\n {\n \"url\": \"value\",\n \"valueString\": \"16654057\"\n }\n ],\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey\"\n }\n ],\n \"id\": \"YoGEf\",\n \"line\": [\n \"GLENVILLE\",\n \"FERRY ROAD\",\n \"GOXHILL\",\n \"BARROW-UPON-HUMBER\",\n \"S HUMBERSIDE\"\n ],\n \"period\": {\n \"start\": \"2016-04-09\"\n },\n \"postalCode\": \"DN19 7JY\",\n \"use\": \"home\"\n }\n ],\n \"birthDate\": \"2010-05-31\",\n \"gender\": \"male\",\n \"generalPractitioner\": [\n {\n \"id\": \"bYoHa\",\n \"identifier\": {\n \"period\": {\n \"start\": \"2016-02-12\"\n },\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A20047\"\n }\n }\n ],\n \"identifier\": [\n {\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"01\",\n \"display\": \"Number present and verified\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\n \"version\": \"1.0.0\"\n }\n ]\n }\n }\n ],\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n ],\n \"name\": [\n {\n \"family\": \"CASH\",\n \"given\": [\n \"Jacob\",\n \"Chas\"\n ],\n \"period\": {\n \"start\": \"2025-07-22\"\n },\n \"prefix\": [\n \"MR\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" + }, + { + "name": "Proxy roles returned - Include performer details", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "some_token;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9736898148&_include=Consent:performer", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9736898148" + }, + { + "key": "_include", + "value": "Consent:performer" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Date", + "value": "Thu, 04 Dec 2025 10:50:45 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "5289" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "60649be0-6363-4601-b792-d631af45a966" + }, + { + "key": "x-amz-apigw-id", + "value": "VD0cyFTYLPEF-Fg=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-69316784-cee1c757e6d4e43fb4837684" + }, + { + "key": "X-Request-ID", + "value": "8a113b57-8af9-4d34-b300-100c84059319" + }, + { + "key": "X-Correlation-ID", + "value": "a3683a8c-6172-44a7-8410-0e78a705907b" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T10:50:45Z\",\n \"total\": 2,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9736898148&_include=Consent%3Aperformer\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"resource\": {\n \"id\": \"7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n },\n {\n \"url\": \"http://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 \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T10:46:27Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/b22d6068-fe78-40f4-b71a-b916dac48c0b\",\n \"resource\": {\n \"id\": \"b22d6068-fe78-40f4-b71a-b916dac48c0b\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n },\n {\n \"url\": \"http://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 \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T10:47:43Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/ZfgKO\",\n \"resource\": {\n \"id\": \"ZfgKO\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/UwTCq\",\n \"resource\": {\n \"id\": \"UwTCq\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" + }, + { + "name": "Proxy roles returned - Include patient and performer details", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "some_token;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9736898148&_include=Consent:performer&_include=Consent:patient", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9736898148" + }, + { + "key": "_include", + "value": "Consent:performer" + }, + { + "key": "_include", + "value": "Consent:patient" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Date", + "value": "Thu, 04 Dec 2025 10:51:06 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "8726" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "2b36e22f-2649-44c9-b3ce-929ea840df0f" + }, + { + "key": "x-amz-apigw-id", + "value": "VD0gJFjQLPEF_Ew=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-6931679a-aa7dfa232b694d8fdbd9823f" + }, + { + "key": "X-Request-ID", + "value": "d5743541-7330-4347-b9c7-9067feb4b144" + }, + { + "key": "X-Correlation-ID", + "value": "af030657-aad8-45f4-9c70-85e4755a189f" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T10:51:06Z\",\n \"total\": 2,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9736898148&_include=Consent%3Aperformer&_include=Consent%3Apatient\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"resource\": {\n \"id\": \"7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n },\n {\n \"url\": \"http://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 \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T10:46:27Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/b22d6068-fe78-40f4-b71a-b916dac48c0b\",\n \"resource\": {\n \"id\": \"b22d6068-fe78-40f4-b71a-b916dac48c0b\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n },\n {\n \"url\": \"http://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 \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T10:47:43Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898644\",\n \"resource\": {\n \"id\": \"9736898644\",\n \"meta\": {\n \"security\": [\n {\n \"code\": \"U\",\n \"display\": \"unrestricted\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-Confidentiality\"\n },\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ],\n \"versionId\": \"4\"\n },\n \"address\": [\n {\n \"extension\": [\n {\n \"extension\": [\n {\n \"url\": \"type\",\n \"valueCoding\": {\n \"code\": \"PAF\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType\"\n }\n },\n {\n \"url\": \"value\",\n \"valueString\": \"29706100\"\n }\n ],\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey\"\n }\n ],\n \"id\": \"gDmhc\",\n \"line\": [\n \"BRAMBLE COTTAGE\",\n \"OLD VICARAGE PARK\",\n \"SCAWBY\",\n \"BRIGG\",\n \"S HUMBERSIDE\"\n ],\n \"period\": {\n \"start\": \"2021-09-10\"\n },\n \"postalCode\": \"DN20 9RL\",\n \"use\": \"home\"\n }\n ],\n \"birthDate\": \"2015-09-26\",\n \"gender\": \"female\",\n \"generalPractitioner\": [\n {\n \"id\": \"gDHTb\",\n \"identifier\": {\n \"period\": {\n \"start\": \"2018-08-22\"\n },\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A20047\"\n }\n }\n ],\n \"identifier\": [\n {\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"01\",\n \"display\": \"Number present and verified\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\n \"version\": \"1.0.0\"\n }\n ]\n }\n }\n ],\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n ],\n \"name\": [\n {\n \"family\": \"SHEPP\",\n \"given\": [\n \"Ashley\",\n \"Ellen\"\n ],\n \"period\": {\n \"start\": \"2025-08-06\"\n },\n \"prefix\": [\n \"MS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898717\",\n \"resource\": {\n \"id\": \"9736898717\",\n \"meta\": {\n \"security\": [\n {\n \"code\": \"U\",\n \"display\": \"unrestricted\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-Confidentiality\"\n },\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ],\n \"versionId\": \"4\"\n },\n \"address\": [\n {\n \"extension\": [\n {\n \"extension\": [\n {\n \"url\": \"type\",\n \"valueCoding\": {\n \"code\": \"PAF\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType\"\n }\n },\n {\n \"url\": \"value\",\n \"valueString\": \"16654057\"\n }\n ],\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey\"\n }\n ],\n \"id\": \"YoGEf\",\n \"line\": [\n \"GLENVILLE\",\n \"FERRY ROAD\",\n \"GOXHILL\",\n \"BARROW-UPON-HUMBER\",\n \"S HUMBERSIDE\"\n ],\n \"period\": {\n \"start\": \"2016-04-09\"\n },\n \"postalCode\": \"DN19 7JY\",\n \"use\": \"home\"\n }\n ],\n \"birthDate\": \"2010-05-31\",\n \"gender\": \"male\",\n \"generalPractitioner\": [\n {\n \"id\": \"bYoHa\",\n \"identifier\": {\n \"period\": {\n \"start\": \"2016-02-12\"\n },\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A20047\"\n }\n }\n ],\n \"identifier\": [\n {\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"01\",\n \"display\": \"Number present and verified\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\n \"version\": \"1.0.0\"\n }\n ]\n }\n }\n ],\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n ],\n \"name\": [\n {\n \"family\": \"CASH\",\n \"given\": [\n \"Jacob\",\n \"Chas\"\n ],\n \"period\": {\n \"start\": \"2025-07-22\"\n },\n \"prefix\": [\n \"MR\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/ZfgKO\",\n \"resource\": {\n \"id\": \"ZfgKO\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/UwTCq\",\n \"resource\": {\n \"id\": \"UwTCq\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" + }, + { + "name": "Proxy roles returned - Filtered by status 'inactive'", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "some_token;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9736898156&status=inactive", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9736898156" + }, + { + "key": "status", + "value": "inactive" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Date", + "value": "Thu, 04 Dec 2025 11:09:14 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "1888" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "290a4ffd-6021-435c-af76-8d6c80492b72" + }, + { + "key": "x-amz-apigw-id", + "value": "VD3JoHOkrPEFSoA=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-69316bd6-5bd69e7021cf6e4e0696d153" + }, + { + "key": "X-Request-ID", + "value": "8b8298dc-a9a4-4257-a6b9-f99d5ff65983" + }, + { + "key": "X-Correlation-ID", + "value": "5af5dfe2-b247-4624-8268-bb4e78593eb3" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:09:14Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9736898156&status=inactive\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/750cb586-eb9b-46c7-a1a5-711307a087af\",\n \"resource\": {\n \"id\": \"750cb586-eb9b-46c7-a1a5-711307a087af\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T10:55:53Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898652\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2025-12-05\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"inactive\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n }\n ]\n}" + }, + { + "name": "Proxy roles returned - Filtered by status 'active' and include patient and performer details", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "some_token;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9736898156&status=active&_include=Consent:performer&_include=Consent:patient", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9736898156" + }, + { + "key": "status", + "value": "active" + }, + { + "key": "_include", + "value": "Consent:performer" + }, + { + "key": "_include", + "value": "Consent:patient" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Date", + "value": "Thu, 04 Dec 2025 11:09:41 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "4528" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "44c6f0cf-6bdb-4b96-8889-55ebe68b8c60" + }, + { + "key": "x-amz-apigw-id", + "value": "VD3M5FGYrPEFZVg=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-69316beb-f2f5e05791f831ed34fb0afa" + }, + { + "key": "X-Request-ID", + "value": "73bded49-9645-4418-bf08-ebd13d92c2a1" + }, + { + "key": "X-Correlation-ID", + "value": "15b5d9d5-9909-458a-91c5-64ee20e93a01" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:09:40Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9736898156&status=active&_include=Consent%3Aperformer&_include=Consent%3Apatient\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40\",\n \"resource\": {\n \"id\": \"4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:08:46Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898660\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-12-05\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898660\",\n \"resource\": {\n \"id\": \"9736898660\",\n \"meta\": {\n \"security\": [\n {\n \"code\": \"U\",\n \"display\": \"unrestricted\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-Confidentiality\"\n },\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ],\n \"versionId\": \"4\"\n },\n \"address\": [\n {\n \"extension\": [\n {\n \"extension\": [\n {\n \"url\": \"type\",\n \"valueCoding\": {\n \"code\": \"PAF\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType\"\n }\n },\n {\n \"url\": \"value\",\n \"valueString\": \"19976537\"\n }\n ],\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey\"\n }\n ],\n \"id\": \"pBQDr\",\n \"line\": [\n \"CARLTON\",\n \"VICARAGE LANE\",\n \"REDBOURNE\",\n \"GAINSBOROUGH\",\n \"LINCS\"\n ],\n \"period\": {\n \"start\": \"2025-07-15\"\n },\n \"postalCode\": \"DN21 4QW\",\n \"use\": \"home\"\n }\n ],\n \"birthDate\": \"2012-04-24\",\n \"gender\": \"female\",\n \"generalPractitioner\": [\n {\n \"id\": \"xSEnH\",\n \"identifier\": {\n \"period\": {\n \"start\": \"2024-11-06\"\n },\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A20047\"\n }\n }\n ],\n \"identifier\": [\n {\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"01\",\n \"display\": \"Number present and verified\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\n \"version\": \"1.0.0\"\n }\n ]\n }\n }\n ],\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898660\"\n }\n ],\n \"name\": [\n {\n \"family\": \"GODREY\",\n \"given\": [\n \"Davina\",\n \"Linda\"\n ],\n \"period\": {\n \"start\": \"2017-04-22\"\n },\n \"prefix\": [\n \"MISS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/nVLgl\",\n \"resource\": {\n \"id\": \"nVLgl\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898660\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" + } + ] + }, + { + "name": "Valid request - NPS - Get proxy roles for patient", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "" + ], + "type": "text/javascript", + "packages": {}, + "requests": {} + } + }, + { + "listen": "test", + "script": { + "exec": [ + "" + ], + "type": "text/javascript", + "packages": {}, + "requests": {} + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "SomeToken;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?patient:identifier=9736898644", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "patient:identifier", + "value": "9736898644" + } + ] + }, + "description": "This request and its examples will only retrieve proxy roles from the National Proxy Store and not directly from GPIT suppliers via NAM.\n\nSee folder level docs for more info.\n\n## Example scenario\n\n**Given** proxy roles exist for a patient in the National Proxy Store (NPS) \n**When** a GET /Consent request is sent with the patient identifier \n**Then** the proxy roles in NPS are returned\n\n## Authorization\n\nPlease see the folder overview for details of how to generate tokens for this endpoint." + }, + "response": [ + { + "name": "Proxy roles returned - No patient or performer details", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "a8fe6a8d-44c5-4451-b8e8-5cf5adc2db03", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "43c2ad8f-43a2-4cfc-8d3a-2b4298ab2b6d", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "some_token;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?patient:identifier=9736898644", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "patient:identifier", + "value": "9736898644" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Date", + "value": "Thu, 04 Dec 2025 11:17:19 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "3484" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "cd84643e-5789-445f-9d2f-eb53fe6b57c5" + }, + { + "key": "x-amz-apigw-id", + "value": "VD4VeEsnLPEFmxA=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-69316dbc-851b7fe822d672bb07d0be6d" + }, + { + "key": "X-Request-ID", + "value": "b7120974-233d-4634-80e2-f404e817f80b" + }, + { + "key": "X-Correlation-ID", + "value": "73e7ab39-f339-4f53-8090-d4320c6a1fc5" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:17:19Z\",\n \"total\": 2,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?patient%3Aidentifier=9736898644\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"resource\": {\n \"id\": \"7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n },\n {\n \"url\": \"http://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 \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T10:46:27Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"resource\": {\n \"id\": \"553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:15:26Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n }\n ]\n}" + }, + { + "name": "Proxy roles returned - Include performer details", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "some_token;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?patient:identifier=9736898644&_include=Consent:performer", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "patient:identifier", + "value": "9736898644" + }, + { + "key": "_include", + "value": "Consent:performer" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Date", + "value": "Thu, 04 Dec 2025 11:17:45 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "5287" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "d6ea589d-359b-43a5-ac3d-6b570eec9cac" + }, + { + "key": "x-amz-apigw-id", + "value": "VD4YuGlSLPEF7zw=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-69316dd1-47a064ac1a1d588355c13564" + }, + { + "key": "X-Request-ID", + "value": "eb00dad3-5e15-4ade-8ee9-f3597bfab4d3" + }, + { + "key": "X-Correlation-ID", + "value": "a496e8bd-c333-4e87-9927-bbe9ead436a4" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:17:45Z\",\n \"total\": 2,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?patient%3Aidentifier=9736898644&_include=Consent%3Aperformer\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"resource\": {\n \"id\": \"7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n },\n {\n \"url\": \"http://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 \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T10:46:27Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"resource\": {\n \"id\": \"553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:15:26Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/ZfgKO\",\n \"resource\": {\n \"id\": \"ZfgKO\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/EAONj\",\n \"resource\": {\n \"id\": \"EAONj\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" + }, + { + "name": "Proxy roles returned - Include patient details", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "some_token;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?patient:identifier=9736898644&_include=Consent:patient", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "patient:identifier", + "value": "9736898644" + }, + { + "key": "_include", + "value": "Consent:patient" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Date", + "value": "Thu, 04 Dec 2025 11:18:02 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "5218" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "3a81d012-80ef-4350-8d7b-1f8cda1ef809" + }, + { + "key": "x-amz-apigw-id", + "value": "VD4cPGnErPEFYsw=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-69316de7-bb724d308ffa3272269bfba9" + }, + { + "key": "X-Request-ID", + "value": "ada44c4a-9dcc-4666-a97e-72ebce5630a8" + }, + { + "key": "X-Correlation-ID", + "value": "cfa6112c-4235-41a4-9e58-f4f04d4f7614" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:18:02Z\",\n \"total\": 2,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?patient%3Aidentifier=9736898644&_include=Consent%3Apatient\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"resource\": {\n \"id\": \"7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n },\n {\n \"url\": \"http://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 \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T10:46:27Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"resource\": {\n \"id\": \"553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:15:26Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898644\",\n \"resource\": {\n \"id\": \"9736898644\",\n \"meta\": {\n \"security\": [\n {\n \"code\": \"U\",\n \"display\": \"unrestricted\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-Confidentiality\"\n },\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ],\n \"versionId\": \"4\"\n },\n \"address\": [\n {\n \"extension\": [\n {\n \"extension\": [\n {\n \"url\": \"type\",\n \"valueCoding\": {\n \"code\": \"PAF\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType\"\n }\n },\n {\n \"url\": \"value\",\n \"valueString\": \"29706100\"\n }\n ],\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey\"\n }\n ],\n \"id\": \"gDmhc\",\n \"line\": [\n \"BRAMBLE COTTAGE\",\n \"OLD VICARAGE PARK\",\n \"SCAWBY\",\n \"BRIGG\",\n \"S HUMBERSIDE\"\n ],\n \"period\": {\n \"start\": \"2021-09-10\"\n },\n \"postalCode\": \"DN20 9RL\",\n \"use\": \"home\"\n }\n ],\n \"birthDate\": \"2015-09-26\",\n \"gender\": \"female\",\n \"generalPractitioner\": [\n {\n \"id\": \"gDHTb\",\n \"identifier\": {\n \"period\": {\n \"start\": \"2018-08-22\"\n },\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A20047\"\n }\n }\n ],\n \"identifier\": [\n {\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"01\",\n \"display\": \"Number present and verified\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\n \"version\": \"1.0.0\"\n }\n ]\n }\n }\n ],\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n ],\n \"name\": [\n {\n \"family\": \"SHEPP\",\n \"given\": [\n \"Ashley\",\n \"Ellen\"\n ],\n \"period\": {\n \"start\": \"2025-08-06\"\n },\n \"prefix\": [\n \"MS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" + }, + { + "name": "Proxy roles returned - Include patient and performer details", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "some_token;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?patient:identifier=9736898644&_include=Consent:performer&_include=Consent:patient", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "patient:identifier", + "value": "9736898644" + }, + { + "key": "_include", + "value": "Consent:performer" + }, + { + "key": "_include", + "value": "Consent:patient" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Date", + "value": "Thu, 04 Dec 2025 11:18:17 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "7021" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "013f49d1-ffbe-4880-bfd6-1b92d13d08a3" + }, + { + "key": "x-amz-apigw-id", + "value": "VD4evE6yLPEFZZA=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-69316df7-175910d69cd894708a0921b9" + }, + { + "key": "X-Request-ID", + "value": "9ce9a6d5-2bd2-4d5e-a984-2c78a457f4d4" + }, + { + "key": "X-Correlation-ID", + "value": "02eabdf7-0a76-4fec-9c99-306273ea8da5" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:18:17Z\",\n \"total\": 2,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?patient%3Aidentifier=9736898644&_include=Consent%3Aperformer&_include=Consent%3Apatient\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"resource\": {\n \"id\": \"7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n },\n {\n \"url\": \"http://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 \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T10:46:27Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"resource\": {\n \"id\": \"553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:15:26Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898644\",\n \"resource\": {\n \"id\": \"9736898644\",\n \"meta\": {\n \"security\": [\n {\n \"code\": \"U\",\n \"display\": \"unrestricted\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-Confidentiality\"\n },\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ],\n \"versionId\": \"4\"\n },\n \"address\": [\n {\n \"extension\": [\n {\n \"extension\": [\n {\n \"url\": \"type\",\n \"valueCoding\": {\n \"code\": \"PAF\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType\"\n }\n },\n {\n \"url\": \"value\",\n \"valueString\": \"29706100\"\n }\n ],\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey\"\n }\n ],\n \"id\": \"gDmhc\",\n \"line\": [\n \"BRAMBLE COTTAGE\",\n \"OLD VICARAGE PARK\",\n \"SCAWBY\",\n \"BRIGG\",\n \"S HUMBERSIDE\"\n ],\n \"period\": {\n \"start\": \"2021-09-10\"\n },\n \"postalCode\": \"DN20 9RL\",\n \"use\": \"home\"\n }\n ],\n \"birthDate\": \"2015-09-26\",\n \"gender\": \"female\",\n \"generalPractitioner\": [\n {\n \"id\": \"gDHTb\",\n \"identifier\": {\n \"period\": {\n \"start\": \"2018-08-22\"\n },\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A20047\"\n }\n }\n ],\n \"identifier\": [\n {\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"01\",\n \"display\": \"Number present and verified\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\n \"version\": \"1.0.0\"\n }\n ]\n }\n }\n ],\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n ],\n \"name\": [\n {\n \"family\": \"SHEPP\",\n \"given\": [\n \"Ashley\",\n \"Ellen\"\n ],\n \"period\": {\n \"start\": \"2025-08-06\"\n },\n \"prefix\": [\n \"MS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/ZfgKO\",\n \"resource\": {\n \"id\": \"ZfgKO\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/EAONj\",\n \"resource\": {\n \"id\": \"EAONj\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" + }, + { + "name": "Proxy roles returned - Filtered by status 'inactive'", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "some_token;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?patient:identifier=9736898717&status=inactive", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "patient:identifier", + "value": "9736898717" + }, + { + "key": "status", + "value": "inactive" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Date", + "value": "Thu, 04 Dec 2025 11:18:37 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "1886" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "595418c1-5c22-46b6-907c-e799e9fdf609" + }, + { + "key": "x-amz-apigw-id", + "value": "VD4iFHTWLPEFnHA=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-69316e0c-b334c67c9e4d72fd5809672a" + }, + { + "key": "X-Request-ID", + "value": "e6ad06af-45a7-4f98-92c2-88300871c3bc" + }, + { + "key": "X-Correlation-ID", + "value": "8d75c837-bd9e-4784-ac40-84322ee4d188" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:18:37Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?patient%3Aidentifier=9736898717&status=inactive\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/cf7bc8e6-f8e0-41c5-8d08-1741eee5a256\",\n \"resource\": {\n \"id\": \"cf7bc8e6-f8e0-41c5-8d08-1741eee5a256\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:16:43Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"inactive\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n }\n ]\n}" + }, + { + "name": "Proxy roles returned - Filtered by status 'active' and include patient and performer details", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "some_token;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?patient:identifier=9736898717&status=active&_include=Consent:performer&_include=Consent:patient", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "patient:identifier", + "value": "9736898717" + }, + { + "key": "status", + "value": "active" + }, + { + "key": "_include", + "value": "Consent:performer" + }, + { + "key": "_include", + "value": "Consent:patient" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Date", + "value": "Thu, 04 Dec 2025 11:18:51 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "4528" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "bd5079fb-1fc3-428c-ab53-5ba1dfacc510" + }, + { + "key": "x-amz-apigw-id", + "value": "VD4kRHuoLPEF-DQ=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-69316e1a-0dc7c19d64d48ad8a86c4518" + }, + { + "key": "X-Request-ID", + "value": "8da5a25e-ef8b-4cec-84c0-81af22e5132f" + }, + { + "key": "X-Correlation-ID", + "value": "ce7840a8-db71-4897-9853-d06c699adca9" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:18:51Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?patient%3Aidentifier=9736898717&status=active&_include=Consent%3Aperformer&_include=Consent%3Apatient\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/b22d6068-fe78-40f4-b71a-b916dac48c0b\",\n \"resource\": {\n \"id\": \"b22d6068-fe78-40f4-b71a-b916dac48c0b\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n },\n {\n \"url\": \"http://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 \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T10:47:43Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898717\",\n \"resource\": {\n \"id\": \"9736898717\",\n \"meta\": {\n \"security\": [\n {\n \"code\": \"U\",\n \"display\": \"unrestricted\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-Confidentiality\"\n },\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ],\n \"versionId\": \"4\"\n },\n \"address\": [\n {\n \"extension\": [\n {\n \"extension\": [\n {\n \"url\": \"type\",\n \"valueCoding\": {\n \"code\": \"PAF\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType\"\n }\n },\n {\n \"url\": \"value\",\n \"valueString\": \"16654057\"\n }\n ],\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey\"\n }\n ],\n \"id\": \"YoGEf\",\n \"line\": [\n \"GLENVILLE\",\n \"FERRY ROAD\",\n \"GOXHILL\",\n \"BARROW-UPON-HUMBER\",\n \"S HUMBERSIDE\"\n ],\n \"period\": {\n \"start\": \"2016-04-09\"\n },\n \"postalCode\": \"DN19 7JY\",\n \"use\": \"home\"\n }\n ],\n \"birthDate\": \"2010-05-31\",\n \"gender\": \"male\",\n \"generalPractitioner\": [\n {\n \"id\": \"bYoHa\",\n \"identifier\": {\n \"period\": {\n \"start\": \"2016-02-12\"\n },\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A20047\"\n }\n }\n ],\n \"identifier\": [\n {\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"01\",\n \"display\": \"Number present and verified\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\n \"version\": \"1.0.0\"\n }\n ]\n }\n }\n ],\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n ],\n \"name\": [\n {\n \"family\": \"CASH\",\n \"given\": [\n \"Jacob\",\n \"Chas\"\n ],\n \"period\": {\n \"start\": \"2025-07-22\"\n },\n \"prefix\": [\n \"MR\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/UwTCq\",\n \"resource\": {\n \"id\": \"UwTCq\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" + } + ] + }, + { + "name": "Valid request - NPS - Get proxy roles for patient and proxy", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "" + ], + "type": "text/javascript", + "packages": {}, + "requests": {} + } + }, + { + "listen": "test", + "script": { + "exec": [ + "" + ], + "type": "text/javascript", + "packages": {}, + "requests": {} + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "SomeToken;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9736898121&patient:identifier=9736898644", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9736898121" + }, + { + "key": "patient:identifier", + "value": "9736898644" + } + ] + }, + "description": "This request and its examples will only retrieve proxy roles from the National Proxy Store and not directly from GPIT suppliers via NAM.\n\nSee folder level docs for more info.\n\n## Example scenario\n\n**Given** proxy roles exist for a patient in the National Proxy Store (NPS) \n**When** a GET /Consent request is sent with the performer and patient identifier \n**Then** a single proxy role from NPS is returned\n\n## Authorization\n\nPlease see the folder overview for details of how to generate tokens for this endpoint." + }, + "response": [ + { + "name": "Proxy roles returned - No patient or performer details", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "4d896833-170b-4dc9-a455-66db155cb5c1", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "1525b9dd-abde-44c0-a226-c93af7e47d8e", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "some_token;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9736898121&patient:identifier=9736898644", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9736898121" + }, + { + "key": "patient:identifier", + "value": "9736898644" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Date", + "value": "Thu, 04 Dec 2025 11:19:27 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "1902" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "3d56eb4c-4bc0-47d8-bc61-a55b098dfd9c" + }, + { + "key": "x-amz-apigw-id", + "value": "VD4p_GRgrPEFVPA=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-69316e3f-6ddd811fdb997165b9c6a0d5" + }, + { + "key": "X-Request-ID", + "value": "f8ac2f03-2a5f-4ff7-8ada-093f55fb9c38" + }, + { + "key": "X-Correlation-ID", + "value": "8fc4ed98-4b94-41e1-bff0-0065b6058201" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:19:27Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9736898121&patient%3Aidentifier=9736898644\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"resource\": {\n \"id\": \"553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:15:26Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n }\n ]\n}" + }, + { + "name": "Proxy roles returned - Include performer details", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "some_token;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9736898121&patient:identifier=9736898644&_include=Consent:performer", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9736898121" + }, + { + "key": "patient:identifier", + "value": "9736898644" + }, + { + "key": "_include", + "value": "Consent:performer" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Date", + "value": "Thu, 04 Dec 2025 11:19:44 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "2818" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "12da5c87-c8eb-4085-ad09-ab9df3923150" + }, + { + "key": "x-amz-apigw-id", + "value": "VD4slFJ5rPEF6Mg=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-69316e50-a15563e078d9633ab0d45fb6" + }, + { + "key": "X-Request-ID", + "value": "51afba5e-eea1-415e-a0c3-bc5d47e884fd" + }, + { + "key": "X-Correlation-ID", + "value": "c31bc807-8bc9-4aa5-b531-f44fbfeeef0c" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:19:44Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9736898121&patient%3Aidentifier=9736898644&_include=Consent%3Aperformer\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"resource\": {\n \"id\": \"553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:15:26Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/EAONj\",\n \"resource\": {\n \"id\": \"EAONj\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" + }, + { + "name": "Proxy roles returned - Include patient details", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "some_token;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9736898121&patient:identifier=9736898644&_include=Consent:patient", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9736898121" + }, + { + "key": "patient:identifier", + "value": "9736898644" + }, + { + "key": "_include", + "value": "Consent:patient" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Date", + "value": "Thu, 04 Dec 2025 11:19:57 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "3636" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "341e64dd-974f-4307-a16b-e775c0777fdd" + }, + { + "key": "x-amz-apigw-id", + "value": "VD4uhGhjLPEF8-A=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-69316e5c-16469b05761a5ee0d5ffe220" + }, + { + "key": "X-Request-ID", + "value": "2762b971-bfcc-42c6-be87-b2d2a98cf5b5" + }, + { + "key": "X-Correlation-ID", + "value": "94e42484-2c4d-46fc-8364-027c06a21798" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:19:56Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9736898121&patient%3Aidentifier=9736898644&_include=Consent%3Apatient\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"resource\": {\n \"id\": \"553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:15:26Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898644\",\n \"resource\": {\n \"id\": \"9736898644\",\n \"meta\": {\n \"security\": [\n {\n \"code\": \"U\",\n \"display\": \"unrestricted\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-Confidentiality\"\n },\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ],\n \"versionId\": \"4\"\n },\n \"address\": [\n {\n \"extension\": [\n {\n \"extension\": [\n {\n \"url\": \"type\",\n \"valueCoding\": {\n \"code\": \"PAF\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType\"\n }\n },\n {\n \"url\": \"value\",\n \"valueString\": \"29706100\"\n }\n ],\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey\"\n }\n ],\n \"id\": \"gDmhc\",\n \"line\": [\n \"BRAMBLE COTTAGE\",\n \"OLD VICARAGE PARK\",\n \"SCAWBY\",\n \"BRIGG\",\n \"S HUMBERSIDE\"\n ],\n \"period\": {\n \"start\": \"2021-09-10\"\n },\n \"postalCode\": \"DN20 9RL\",\n \"use\": \"home\"\n }\n ],\n \"birthDate\": \"2015-09-26\",\n \"gender\": \"female\",\n \"generalPractitioner\": [\n {\n \"id\": \"gDHTb\",\n \"identifier\": {\n \"period\": {\n \"start\": \"2018-08-22\"\n },\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A20047\"\n }\n }\n ],\n \"identifier\": [\n {\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"01\",\n \"display\": \"Number present and verified\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\n \"version\": \"1.0.0\"\n }\n ]\n }\n }\n ],\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n ],\n \"name\": [\n {\n \"family\": \"SHEPP\",\n \"given\": [\n \"Ashley\",\n \"Ellen\"\n ],\n \"period\": {\n \"start\": \"2025-08-06\"\n },\n \"prefix\": [\n \"MS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" + }, + { + "name": "Proxy roles returned - Include patient and performer details", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "some_token;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9736898121&patient:identifier=9736898644&_include=Consent:performer&_include=Consent:patient", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9736898121" + }, + { + "key": "patient:identifier", + "value": "9736898644" + }, + { + "key": "_include", + "value": "Consent:performer" + }, + { + "key": "_include", + "value": "Consent:patient" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Date", + "value": "Thu, 04 Dec 2025 11:20:24 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "4552" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "306d5243-752e-45e4-9c44-f175a008c1de" + }, + { + "key": "x-amz-apigw-id", + "value": "VD4y2Gg1rPEFcxQ=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-69316e78-df1338116d16a7272e1de2dc" + }, + { + "key": "X-Request-ID", + "value": "b05f7a59-c008-47d8-868c-011cbdf17500" + }, + { + "key": "X-Correlation-ID", + "value": "95f4ebb0-274e-4757-91f3-91a5fc0a3f0f" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:20:24Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9736898121&patient%3Aidentifier=9736898644&_include=Consent%3Aperformer&_include=Consent%3Apatient\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"resource\": {\n \"id\": \"553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:15:26Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898644\",\n \"resource\": {\n \"id\": \"9736898644\",\n \"meta\": {\n \"security\": [\n {\n \"code\": \"U\",\n \"display\": \"unrestricted\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-Confidentiality\"\n },\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ],\n \"versionId\": \"4\"\n },\n \"address\": [\n {\n \"extension\": [\n {\n \"extension\": [\n {\n \"url\": \"type\",\n \"valueCoding\": {\n \"code\": \"PAF\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType\"\n }\n },\n {\n \"url\": \"value\",\n \"valueString\": \"29706100\"\n }\n ],\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey\"\n }\n ],\n \"id\": \"gDmhc\",\n \"line\": [\n \"BRAMBLE COTTAGE\",\n \"OLD VICARAGE PARK\",\n \"SCAWBY\",\n \"BRIGG\",\n \"S HUMBERSIDE\"\n ],\n \"period\": {\n \"start\": \"2021-09-10\"\n },\n \"postalCode\": \"DN20 9RL\",\n \"use\": \"home\"\n }\n ],\n \"birthDate\": \"2015-09-26\",\n \"gender\": \"female\",\n \"generalPractitioner\": [\n {\n \"id\": \"gDHTb\",\n \"identifier\": {\n \"period\": {\n \"start\": \"2018-08-22\"\n },\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A20047\"\n }\n }\n ],\n \"identifier\": [\n {\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"01\",\n \"display\": \"Number present and verified\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\n \"version\": \"1.0.0\"\n }\n ]\n }\n }\n ],\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n ],\n \"name\": [\n {\n \"family\": \"SHEPP\",\n \"given\": [\n \"Ashley\",\n \"Ellen\"\n ],\n \"period\": {\n \"start\": \"2025-08-06\"\n },\n \"prefix\": [\n \"MS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/EAONj\",\n \"resource\": {\n \"id\": \"EAONj\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" + }, + { + "name": "Proxy roles returned - Filtered by status 'inactive'", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "some_token;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9736898156&patient:identifier=9736898652&status=inactive", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9736898156" + }, + { + "key": "patient:identifier", + "value": "9736898652" + }, + { + "key": "status", + "value": "inactive" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Date", + "value": "Thu, 04 Dec 2025 11:21:09 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "1920" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "24bfc7a0-5f30-47b4-a751-7534837f5224" + }, + { + "key": "x-amz-apigw-id", + "value": "VD455ErXrPEFuaQ=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-69316ea5-6c272d90a7d3656142da3073" + }, + { + "key": "X-Request-ID", + "value": "67a71930-24b3-4baa-8b13-65f27c413a41" + }, + { + "key": "X-Correlation-ID", + "value": "dd934795-88bf-44a3-a2c3-eff757413bfb" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:21:09Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9736898156&patient%3Aidentifier=9736898652&status=inactive\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/750cb586-eb9b-46c7-a1a5-711307a087af\",\n \"resource\": {\n \"id\": \"750cb586-eb9b-46c7-a1a5-711307a087af\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T10:55:53Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898652\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2025-12-05\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"inactive\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n }\n ]\n}" + }, + { + "name": "Proxy roles returned - Filtered by status 'active' and include patient and performer details", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "some_token;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9736898156&patient:identifier=9736898652&status=active&_include=Consent:performer&_include=Consent:patient", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9736898156" + }, + { + "key": "patient:identifier", + "value": "9736898652" + }, + { + "key": "status", + "value": "active" + }, + { + "key": "_include", + "value": "Consent:performer" + }, + { + "key": "_include", + "value": "Consent:patient" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Date", + "value": "Thu, 04 Dec 2025 11:21:28 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "2038" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "f44b69f0-f814-4e0f-89eb-349f1f7e143d" + }, + { + "key": "x-amz-apigw-id", + "value": "VD48uEKHLPEF67A=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-69316eb7-00b15aebe653e94192bc60ee" + }, + { + "key": "X-Request-ID", + "value": "8f40b74e-99fa-4401-bcf1-def08a63da50" + }, + { + "key": "X-Correlation-ID", + "value": "1460d166-ba8d-4d1c-8822-83394abe1169" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:21:27Z\",\n \"total\": 0,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9736898156&patient%3Aidentifier=9736898652&status=active&_include=Consent%3Aperformer&_include=Consent%3Apatient\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898652\",\n \"resource\": {\n \"id\": \"9736898652\",\n \"meta\": {\n \"security\": [\n {\n \"code\": \"U\",\n \"display\": \"unrestricted\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-Confidentiality\"\n },\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ],\n \"versionId\": \"4\"\n },\n \"address\": [\n {\n \"extension\": [\n {\n \"extension\": [\n {\n \"url\": \"type\",\n \"valueCoding\": {\n \"code\": \"PAF\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType\"\n }\n },\n {\n \"url\": \"value\",\n \"valueString\": \"6290975\"\n }\n ],\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey\"\n }\n ],\n \"id\": \"RPnzd\",\n \"line\": [\n \"77 ANGERSTEIN ROAD\",\n \"SCUNTHORPE\",\n \"S HUMBERSIDE\"\n ],\n \"period\": {\n \"start\": \"2019-11-10\"\n },\n \"postalCode\": \"DN17 2NB\",\n \"use\": \"home\"\n }\n ],\n \"birthDate\": \"2013-09-02\",\n \"gender\": \"female\",\n \"generalPractitioner\": [\n {\n \"id\": \"yIjPV\",\n \"identifier\": {\n \"period\": {\n \"start\": \"2021-01-07\"\n },\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A20047\"\n }\n }\n ],\n \"identifier\": [\n {\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"01\",\n \"display\": \"Number present and verified\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\n \"version\": \"1.0.0\"\n }\n ]\n }\n }\n ],\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898652\"\n }\n ],\n \"name\": [\n {\n \"family\": \"CLYDE\",\n \"given\": [\n \"Deanne\",\n \"Tara\"\n ],\n \"period\": {\n \"start\": \"2018-06-16\"\n },\n \"prefix\": [\n \"MS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" + } + ] + }, + { + "name": "Valid request - NAM - Get proxy roles", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "" + ], + "type": "text/javascript", + "packages": {}, + "requests": {} + } + }, + { + "listen": "test", + "script": { + "exec": [ + "" + ], + "type": "text/javascript", + "packages": {}, + "requests": {} + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "{{tpp_9674998535_access_token}};A82648", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=false;nam-cache-enabled=false;nam-enabled=true;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9674998535", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9674998535" + } + ] + }, + "description": "This request and its examples will only retrieve proxy roles directly from GPIT suppliers via NAM and not from the National Proxy Store.\n\nSee folder level docs for more info.\n\n## Example scenario\n\n**Given** proxy roles exist for a patient/performer in a GPIT system \n**And** no proxy roles exist in the National Proxy Store (NPS) for the patient/performer \n**When** a GET /Consent request is sent with the performer/patient identifier \n**Then** the proxy roles from GPIT are returned\n\n## Authorization\n\nPlease see the folder overview for details of how to generate tokens for this endpoint." + }, + "response": [ + { + "name": "No linked profiles returned from NAM - TPP user", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "83892b1a-6369-4657-a0c3-f6071a25e226", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "b496d552-f0c3-4e20-b362-cfc0c80724e3", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "{{tpp_9674998535_access_token}};A82648", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=false;nam-cache-enabled=false;nam-enabled=true;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9674998535&_include=Consent:performer&_include=Consent:patient", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9674998535" + }, + { + "key": "_include", + "value": "Consent:performer" + }, + { + "key": "_include", + "value": "Consent:patient" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Date", + "value": "Thu, 04 Dec 2025 11:22:00 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "5773" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "94465816-7aaa-4d03-81c9-e19156606316" + }, + { + "key": "x-amz-apigw-id", + "value": "VD5BAEGOLPEFVPA=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-69316ed8-af72bfe69942b25c155a4daa" + }, + { + "key": "X-Request-ID", + "value": "ed28025a-9c27-468c-85fd-9b1b8f794198" + }, + { + "key": "X-Correlation-ID", + "value": "fbd025d4-c7e1-4085-8bf8-d11b84652f8d" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:22:00Z\",\n \"total\": 2,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9674998535&_include=Consent%3Aperformer&_include=Consent%3Apatient\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/3a86ad92\",\n \"resource\": {\n \"id\": \"3a86ad92\",\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:21:58.915488+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9692113736\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998535\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998535\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/5c0c47d9\",\n \"resource\": {\n \"id\": \"5c0c47d9\",\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:21:58.915640+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998454\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998535\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998535\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/0b36c4e0\",\n \"resource\": {\n \"id\": \"0b36c4e0\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998535\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9692113736\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/bd6da0a0\",\n \"resource\": {\n \"id\": \"bd6da0a0\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998535\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998454\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/e41dfa63\",\n \"resource\": {\n \"id\": \"e41dfa63\",\n \"meta\": {\n \"profile\": [\n \"https://fhir.hl7.org.uk/StructureDefinition/UKCore-Patient\"\n ],\n \"security\": [\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ]\n },\n \"birthDate\": \"1985-05-29\",\n \"generalPractitioner\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A82648\"\n }\n }\n ],\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9692113736\"\n }\n ],\n \"name\": [\n {\n \"text\": \"Mr Kevin Barry\",\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/2d10a3d9\",\n \"resource\": {\n \"id\": \"2d10a3d9\",\n \"meta\": {\n \"profile\": [\n \"https://fhir.hl7.org.uk/StructureDefinition/UKCore-Patient\"\n ],\n \"security\": [\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ]\n },\n \"birthDate\": \"1921-10-17\",\n \"generalPractitioner\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A82648\"\n }\n }\n ],\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998454\"\n }\n ],\n \"name\": [\n {\n \"text\": \"Mr Landon Fahey\",\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" + }, + { + "name": "Linked profiles returned from NAM - TPP user", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "{{tpp_9674998454_access_token}};A82648", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=false;nam-cache-enabled=false;nam-enabled=true;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9674998454&_include=Consent:patient", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9674998454" + }, + { + "key": "_include", + "value": "Consent:patient" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Date", + "value": "Thu, 04 Dec 2025 11:22:15 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "4370" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "1b190446-e56f-4a64-8c54-25688af8f8f7" + }, + { + "key": "x-amz-apigw-id", + "value": "VD5EAFv1rPEF7zw=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-69316ee6-9925773ab605850282f2d18c" + }, + { + "key": "X-Request-ID", + "value": "dfa182c6-8f6a-46e9-bdc1-1ef5a00740c1" + }, + { + "key": "X-Correlation-ID", + "value": "d50ce1da-c025-451c-847e-c405c299115f" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:22:15Z\",\n \"total\": 2,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9674998454&_include=Consent%3Apatient\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/92a66114\",\n \"resource\": {\n \"id\": \"92a66114\",\n \"extension\": [\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998454\"\n }\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:22:15.290954+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998640\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998454\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/0b02be0a\",\n \"resource\": {\n \"id\": \"0b02be0a\",\n \"extension\": [\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998454\"\n }\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:22:15.290994+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998543\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998454\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/934bfd54\",\n \"resource\": {\n \"id\": \"934bfd54\",\n \"meta\": {\n \"profile\": [\n \"https://fhir.hl7.org.uk/StructureDefinition/UKCore-Patient\"\n ],\n \"security\": [\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ]\n },\n \"birthDate\": \"1998-11-14\",\n \"generalPractitioner\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A82648\"\n }\n }\n ],\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998640\"\n }\n ],\n \"name\": [\n {\n \"text\": \"Mr Harry Hood\",\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/29b6ab39\",\n \"resource\": {\n \"id\": \"29b6ab39\",\n \"meta\": {\n \"profile\": [\n \"https://fhir.hl7.org.uk/StructureDefinition/UKCore-Patient\"\n ],\n \"security\": [\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ]\n },\n \"birthDate\": \"1930-11-02\",\n \"generalPractitioner\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A82648\"\n }\n }\n ],\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998543\"\n }\n ],\n \"name\": [\n {\n \"text\": \"Miss Lisa Hankey\",\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" + }, + { + "name": "No linked profiles returned from NAM - EMIS user", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "{{emis_9692113612_access_token}};A29928", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=false;nam-cache-enabled=false;nam-enabled=true;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9692113612&_include=Consent:patient", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9692113612" + }, + { + "key": "_include", + "value": "Consent:patient" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Date", + "value": "Thu, 04 Dec 2025 11:22:37 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "283" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "15121c1a-99de-4830-86c7-00925d4faf3a" + }, + { + "key": "x-amz-apigw-id", + "value": "VD5HEE6MLPEFz5w=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-69316ef9-58a10d83bc130c381cdb0b44" + }, + { + "key": "X-Request-ID", + "value": "1828501c-86dc-4baf-9a13-e37a822e327f" + }, + { + "key": "X-Correlation-ID", + "value": "b891fe97-7778-4db5-be39-b23c03879d2d" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:22:36Z\",\n \"total\": 0,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9692113612&_include=Consent%3Apatient\"\n }\n ],\n \"entry\": []\n}" + }, + { + "name": "Linked profiles returned from NAM - EMIS user", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "{{emis_9692113698_access_token}};A00002", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=false;nam-cache-enabled=false;nam-enabled=true;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9692113698&_include=Consent:performer", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9692113698" + }, + { + "key": "_include", + "value": "Consent:patient", + "disabled": true + }, + { + "key": "_include", + "value": "Consent:performer" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Date", + "value": "Thu, 04 Dec 2025 11:24:08 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "17617" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "739313dc-9917-4df2-9b9d-e59bf36d8c4e" + }, + { + "key": "x-amz-apigw-id", + "value": "VD5U-FHkLPEF0fw=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-69316f52-1205235fe7d41983ba807831" + }, + { + "key": "X-Request-ID", + "value": "2eb98c87-f421-4902-a885-ecc408bd8d89" + }, + { + "key": "X-Correlation-ID", + "value": "4ac19b94-25d4-4de6-9be6-fe5a4a520d15" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:24:08Z\",\n \"total\": 9,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9692113698&_include=Consent%3Aperformer\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/2993b769\",\n \"resource\": {\n \"id\": \"2993b769\",\n \"extension\": [\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:24:07.874676+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9661034451\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/c0d48822\",\n \"resource\": {\n \"id\": \"c0d48822\",\n \"extension\": [\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:24:07.874715+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998403\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/75d0c9dc\",\n \"resource\": {\n \"id\": \"75d0c9dc\",\n \"extension\": [\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:24:07.874739+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9661034400\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/2bed6c1e\",\n \"resource\": {\n \"id\": \"2bed6c1e\",\n \"extension\": [\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:24:07.874762+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9661034168\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/ed77c791\",\n \"resource\": {\n \"id\": \"ed77c791\",\n \"extension\": [\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:24:07.874785+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9253046414\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/02e9fe06\",\n \"resource\": {\n \"id\": \"02e9fe06\",\n \"extension\": [\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:24:07.874807+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9930725970\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/70f274ba\",\n \"resource\": {\n \"id\": \"70f274ba\",\n \"extension\": [\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:24:07.874830+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9803007025\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/87501704\",\n \"resource\": {\n \"id\": \"87501704\",\n \"extension\": [\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:24:07.874852+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9734615173\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/022a7290\",\n \"resource\": {\n \"id\": \"022a7290\",\n \"extension\": [\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:24:07.874874+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9694154065\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/4931d7ae\",\n \"resource\": {\n \"id\": \"4931d7ae\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9661034451\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/34e6ba88\",\n \"resource\": {\n \"id\": \"34e6ba88\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998403\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/1b0f7204\",\n \"resource\": {\n \"id\": \"1b0f7204\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9661034400\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/7115d670\",\n \"resource\": {\n \"id\": \"7115d670\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9661034168\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/63bd0423\",\n \"resource\": {\n \"id\": \"63bd0423\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9253046414\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/04683858\",\n \"resource\": {\n \"id\": \"04683858\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9930725970\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/e0cff956\",\n \"resource\": {\n \"id\": \"e0cff956\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9803007025\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/a9f54c1c\",\n \"resource\": {\n \"id\": \"a9f54c1c\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9734615173\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/8b794ba5\",\n \"resource\": {\n \"id\": \"8b794ba5\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9694154065\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" + } + ] + }, + { + "name": "Valid request - No proxy roles returned - Get proxy roles", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "" + ], + "type": "text/javascript", + "packages": {}, + "requests": {} + } + }, + { + "listen": "prerequest", + "script": { + "exec": [ + "" + ], + "type": "text/javascript", + "packages": {}, + "requests": {} + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "SomeToken;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?patient:identifier=9736898199", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "patient:identifier", + "value": "9736898199" + } + ] + }, + "description": "## Example scenario\n\n**Given** no proxy roles exist for a patient/performer in NPS or GPIT systems \n**When** a GET /Consent request is sent with the performer/patient identifier \n**Then** no proxy roles are returned\n\n## Authorization\n\nPlease see the folder overview for details of how to generate tokens for this endpoint." + }, + "response": [ + { + "name": "No roles returned", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "b8b052ae-6841-4b64-bdf0-c969d32d94bd", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "e9920101-1ae7-4644-8ae9-5298f7bdda3b", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "SomeToken;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?patient:identifier=9736898199", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "patient:identifier", + "value": "9736898199" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Thu, 27 Nov 2025 15:20:11 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "254" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "62f7a9ef-477a-4a24-8bba-c3da1f684805" + }, + { + "key": "x-amz-apigw-id", + "value": "UtXWqH7MLPEFkaw=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-69286c2a-60c4f8c5c094e6753e2352ce" + }, + { + "key": "X-Request-ID", + "value": "31683198-4901-4516-8522-baf7a3de343a" + }, + { + "key": "X-Correlation-ID", + "value": "bdc29a81-c2c3-4622-b1cb-6b0d939ef622" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2025-11-27T15:20:11Z\",\n \"total\": 0,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?patient%3Aidentifier=9736898199\"\n }\n ],\n \"entry\": []\n}" + } + ] + }, + { + "name": "Invalid status parameter - Get proxy roles", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "" + ], + "type": "text/javascript", + "packages": {}, + "requests": {} + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "SomeToken;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?patient:identifier=9736898199&status=test", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "patient:identifier", + "value": "9736898199" + }, + { + "key": "status", + "value": "test" + } + ] + }, + "description": "## Example scenario\n\n**Given** proxy roles exist for a patient/performer in NPS or a GPIT system \n**When** a GET /Consent request is sent with an invalid status parameter \n**Then** a 422 error is returned with the detail 'Required parameter(s) are invalid.'\n\n## Authorization\n\nPlease see the folder overview for details of how to generate tokens for this endpoint." + }, + "response": [ + { + "name": "Invalid status parameter error returned", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "dcc26889-b2fe-4794-9531-88c887f7e134", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "91e70db5-6a5d-4382-bfc1-027d2b81bc3c", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "SomeToken;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?patient:identifier=9736898199&status=test", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "patient:identifier", + "value": "9736898199" + }, + { + "key": "status", + "value": "test" + } + ] + } + }, + "status": "Unprocessable Entity (WebDAV) (RFC 4918)", + "code": 422, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Thu, 27 Nov 2025 16:45:57 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "375" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "072d3fa4-9703-4b80-88ba-e679c01b3129" + }, + { + "key": "x-amz-apigw-id", + "value": "Utj6vHGjLPEFvyQ=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-69288044-9a8fa9560202aeb1b9390e51" + }, + { + "key": "X-Request-ID", + "value": "0437a831-fa18-43ca-a376-21b2a8f33900" + }, + { + "key": "X-Correlation-ID", + "value": "8cf2b8d1-d98e-4b93-bb62-34583b31f0ea" + }, + { + "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_PARAMETER\",\n \"display\": \"Required parameter(s) are invalid.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"Invalid request with error - status parameter is invalid.\",\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" + } + ] + }, + { + "name": "Invalid include parameter - Get proxy roles", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "" + ], + "type": "text/javascript", + "packages": {}, + "requests": {} + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "SomeToken;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9736898148&_include=Consent:test", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9736898148" + }, + { + "key": "_include", + "value": "Consent:test" + } + ] + }, + "description": "## Gherkin scenario\n\n**Given** proxy roles exist for a patient/performer in NPS or a GPIT system \n**When** a GET /Consent request is sent with an invalid include parameter \n**Then** a 422 error is returned with the detail 'Required parameter(s) are invalid.'\n\n## Authorization\n\nPlease see the folder overview for details of how to generate tokens for this endpoint." + }, + "response": [ + { + "name": "Invalid include parameter error returned", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "b14c0f0f-ad95-45e4-9b2a-9286fb050453", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "e7e0d226-d580-44a6-8688-2aeb0deedf00", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "SomeToken;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9736898148&_include=Consent:test", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9736898148" + }, + { + "key": "_include", + "value": "Consent:test" + } + ] + } + }, + "status": "Unprocessable Entity (WebDAV) (RFC 4918)", + "code": 422, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Thu, 27 Nov 2025 16:46:36 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "377" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "e9f62008-61ec-417a-8231-506b51d07844" + }, + { + "key": "x-amz-apigw-id", + "value": "UtkBAFkIrPEFuvQ=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-6928806c-3f5337b27e75f90c703fd6b0" + }, + { + "key": "X-Request-ID", + "value": "fb15a103-bf9a-499e-a7b1-24dc6563eb13" + }, + { + "key": "X-Correlation-ID", + "value": "f5ec5ae0-c762-4efb-95e3-317628c5cd80" + }, + { + "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_PARAMETER\",\n \"display\": \"Required parameter(s) are invalid.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"Invalid request with error - _include parameter is invalid.\",\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" + } + ] + }, + { + "name": "Invalid performer identifier - Get proxy roles", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "" + ], + "type": "text/javascript", + "packages": {}, + "requests": {} + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "SomeToken;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=90000000", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "90000000" + } + ] + }, + "description": "## Example scenario\n\n**Given** proxy roles exist for a patient/performer in NPS or a GPIT system \n**When** a GET /Consent request is sent with an invalid performer identifier \n**Then** a 422 error is returned with the detail 'Required parameter(s) are invalid.'\n\n## Authorization\n\nPlease see the folder overview for details of how to generate tokens for this endpoint." + }, + "response": [ + { + "name": "Invalid performer identifier returned", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "6e975672-d1b4-402c-b47d-0994d55e1517", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "268d0936-6ffb-474a-a7bf-f44d4214e36e", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "SomeToken;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=90000000", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "90000000" + } + ] + } + }, + "status": "Unprocessable Entity (WebDAV) (RFC 4918)", + "code": 422, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Thu, 27 Nov 2025 16:47:01 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "428" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "2c57ff69-fe19-498b-8163-00b392e47313" + }, + { + "key": "x-amz-apigw-id", + "value": "UtkE-EaXLPEFV9Q=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-69288085-dfbdd45a57543fb9bb4ebd8b" + }, + { + "key": "X-Request-ID", + "value": "2d274752-140d-49de-ab31-56012d28c2cb" + }, + { + "key": "X-Correlation-ID", + "value": "7187bca7-8d57-4561-b0f2-a5aba91ec94c" + }, + { + "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_IDENTIFIER_VALUE\",\n \"display\": \"Required parameter(s) are invalid.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"Invalid request with error - performer:identifier or patient:identifier parameter is invalid.\",\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" + } + ] + }, + { + "name": "Invalid performer identifier system - Get proxy roles", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "" + ], + "type": "text/javascript", + "packages": {}, + "requests": {} + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "SomeToken;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=invalid|9736898199", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "invalid|9736898199" + } + ] + }, + "description": "## Example scenario\n\n**Given** proxy roles exist for a patient/performer in NPS or a GPIT system \n**When** a GET /Consent request is sent with an invalid performer identifier system \n**Then** a 422 error is returned with the detail 'Required parameter(s) are invalid.'\n\n## Authorization\n\nPlease see the folder overview for details of how to generate tokens for this endpoint." + }, + "response": [ + { + "name": "Invalid performer identifier system error returned", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "995e5222-fce7-40e2-8424-1e920d920491", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "16ec5418-1591-45f7-a84c-e95cbcd5cd67", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "SomeToken;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=invalid|9736898199", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "invalid|9736898199" + } + ] + } + }, + "status": "Unprocessable Entity (WebDAV) (RFC 4918)", + "code": 422, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Thu, 27 Nov 2025 16:47:46 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "426" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "8a8529b6-34ac-46b1-8868-0a6ec0440151" + }, + { + "key": "x-amz-apigw-id", + "value": "UtkL-HDVLPEFVxg=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-692880b2-6286da8b511f08a6d7ccf9db" + }, + { + "key": "X-Request-ID", + "value": "9cc2d0ef-8f7a-46b7-89c9-c884bf61cc3a" + }, + { + "key": "X-Correlation-ID", + "value": "57948f02-5db0-4267-a6b7-cae30485e5eb" + }, + { + "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_IDENTIFIER_SYSTEM\",\n \"display\": \"Required parameter(s) are invalid.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"Invalid request with error - performer:identifier or patient:identifier system parameter is invalid.\",\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" + } + ] + }, + { + "name": "Missing performer identifier value - Get proxy roles", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "" + ], + "type": "text/javascript", + "packages": {}, + "requests": {} + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "SomeToken;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ] + }, + "description": "## Example scenario\n\n**Given** proxy roles exist for a patient/performer in NPS or a GPIT system \n**When** a GET /Consent request is sent with an missing performer identifier value \n**Then** a 400 error is returned with the detail 'Required parameter(s) are missing.'\n\n## Authorization\n\nPlease see the folder overview for details of how to generate tokens for this endpoint." + }, + "response": [ + { + "name": "Missing performer identifier value error returned", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "53b3ca95-ad9d-4cd5-a194-78a42daff0df", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "88aaae3f-7168-4f69-b71a-60641082ab4b", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "SomeToken;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=true;nam-cache-enabled=false;nam-enabled=false;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Thu, 27 Nov 2025 16:48:15 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "417" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "4984ba67-d994-4f08-910e-e25024a8ba57" + }, + { + "key": "x-amz-apigw-id", + "value": "UtkQdERvrPEFrBg=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-692880cf-614067cb88aa075eca482015" + }, + { + "key": "X-Request-ID", + "value": "f536a55f-7115-4ab4-a1c9-3049ca919351" + }, + { + "key": "X-Correlation-ID", + "value": "636e5f80-53b3-4bcf-9176-2967325a9e85" + }, + { + "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_IDENTIFIER_VALUE\",\n \"display\": \"Required parameter(s) are missing.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"Invalid request with error - performer:identifier or patient:identifier parameter not found.\",\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" + } + ] + }, + { + "name": "GP practice not found - Get proxy roles", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "" + ], + "type": "text/javascript", + "packages": {}, + "requests": {} + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "SomeToken;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=false;nam-cache-enabled=false;nam-enabled=true;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9736898229", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9736898229" + } + ] + }, + "description": "## Example scenario\n\n**Given** a performer/patient is not registered at a GP \n**And** the performer/patient has no proxy roles in the National Proxy Store \n**When** a GET /Consent request is sent for the performer/patient \n**Then** a 404 error is returned with the detail 'GP Practice could not be found - invalid resources cannot be retrieved'\n\n## Authorization\n\nPlease see the folder overview for details of how to generate tokens for this endpoint." + }, + "response": [ + { + "name": "GP practice not found error returned", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "7c22ece1-b0a0-4067-8ad7-56f8bceced93", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "f1b40261-0aa6-44de-8563-3bfcc5813510", + "type": "text" + }, + { + "key": "X-IM1-Connection-Params", + "value": "SomeToken;A20047", + "type": "text" + }, + { + "key": "X-Test-Routing-Flag", + "value": "nps-enabled=false;nam-cache-enabled=false;nam-enabled=true;use-nam-mock=false", + "description": "For pre-prod only - Used to control where data is gathered from to fulfill the request ", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9736898229", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9736898229" + } + ] + } + }, + "status": "Not Found", + "code": 404, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Thu, 27 Nov 2025 16:48:38 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "391" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "e0bae044-bde7-4def-a600-199f72ea2e50" + }, + { + "key": "x-amz-apigw-id", + "value": "UtkTcEIOLPEF5aQ=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-692880e2-7d058bc8fc71f9ee272f339d" + }, + { + "key": "X-Request-ID", + "value": "c1f8bed5-6729-4b9f-b20c-180b069809ed" + }, + { + "key": "X-Correlation-ID", + "value": "3132cc74-64ef-465d-aac9-502f27c6ac1d" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"issue\": [\n {\n \"code\": \"processing\",\n \"details\": {\n \"coding\": [\n {\n \"code\": \"GP_PRACTICE_NOT_FOUND\",\n \"display\": \"GP Practice could not be found - invalid resources cannot be retrieved\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"GP Practice could not be found\",\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" + } + ] + } + ], + "description": "## Authorization\n\n### Allowed auth methods\n\n- App restricted token\n \n- NHS Login token - Auth with test user `9730675929`\n \n- CIS2 token - Auth with test user `656005750108`\n \n\nSee collection level documentation for info about how to get authorization tokens.\n\n## NPS and NAM routing\n\nYou will notice that there are 'Valid request - NPS' and 'Valid request - NAM' requests and examples within this folder. These are set up to retrieve the proxy roles from different data sources:\n\n- **Valid request - NPS**: Retrieves the roles from the National Proxy Store (NPS) only. Following the eventual migration of all proxy and related person data from GPIT to NPS, this will become the only route for all requests.\n \n- **Valid request - NAM:** Retrives the roles as related person data from the GPIT suppliers via NAM without checking if any exist in NPS first. This requires specific connection parameters to authorise with the GPIT supplier systems\n \n\nThis routing is controlled in the requests by the `X-Test-Routing-Flag` header. This header is used in the VRS pre-prod environments to control where the proxy roles are retrieved from. It is intended to be used for testing purposes only. Omission of this header will cause the default routing settings for the given environment to be followed instead. This is typically for roles to be retrieved from NPS, with NAM used as a fallback if none are found.", + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{consent_app_auth_header_value}}", + "type": "string" + } + ] + }, + "event": [ + { + "listen": "prerequest", + "script": { + "type": "text/javascript", + "packages": {}, + "requests": {}, + "exec": [ + "var uuid = require('uuid');", + "", + "var privateKey = pm.environment.get('vrs_api_private_key') || '';", + "var api_key_value = pm.environment.get('nhs_developer_account_api_key') || '';", + "", + "if (!privateKey) {", + " throw new Error(\"Variable vrs_api_private_key must be set with your private key for signed JWT authentication.\");", + "}", + "", + "// Replace any '/n' new lines with actual new lines", + "privateKey = privateKey.replace(/\\\\n/g, '\\n');", + "", + "if (!api_key_value) {", + " throw new Error(\"Variable nhs_developer_account_app_key must be set with your integration testing application API key.\");", + "}", + "", + "var auth_url = 'https://int.api.service.nhs.uk/oauth2-mock/token';", + "var navigator = {};", + "var window = {};", + "const interval = setTimeout(() => {}, 2147483647);", + "", + "return new Promise((resolve, reject) => { ", + " if (pm.globals.has('jsrsasign-js') && pm.globals.get('jsrsasign-js') !== \"\") {", + " return resolve();", + " }", + "", + " pm.sendRequest(", + " {", + " url: 'https://kjur.github.io/jsrsasign/jsrsasign-all-min.js',", + " method: 'GET'", + " }, function (err, res) {", + " if (err) {", + " return reject(err);", + " }", + "", + " pm.globals.set('jsrsasign-js', res.text()); ", + " return resolve();", + " }", + " );", + "}).then(() => { ", + " eval(pm.globals.get(\"jsrsasign-js\")); ", + "", + " // Set headers for JWT", + " var header = {", + " 'typ': 'JWT',", + " 'alg': 'RS512',", + " 'kid': 'VRS-dev-12-nov-2025'", + " };", + "", + " // Prepare timestamp in seconds", + " var currentTimestamp = Math.floor(Date.now() / 1000)", + " var uuid = require('uuid');", + " var jti_value = uuid.v4();", + " var data = {", + " 'sub': api_key_value,", + " 'iss': api_key_value,", + " 'jti': jti_value,", + " 'aud': auth_url,", + " 'exp': currentTimestamp + 180, // expiry time is 180 seconds from time of creation", + " } ", + "", + " var sJWT = KJUR.jws.JWS.sign(header.alg, JSON.stringify(header), JSON.stringify(data), privateKey); ", + " return new Promise((resolve, reject) => { ", + " pm.sendRequest({", + " url: auth_url,", + " method: \"POST\",", + " header: {", + " \"Content-Type\": \"application/x-www-form-urlencoded\"", + " },", + " body: {", + " mode: \"urlencoded\",", + " urlencoded: [", + " {", + " key: \"grant_type\",", + " value: \"client_credentials\"", + " },", + " {", + " key: \"client_assertion_type\",", + " value: \"urn:ietf:params:oauth:client-assertion-type:jwt-bearer\",", + " },", + " {", + " key: \"client_assertion\",", + " value: sJWT", + " }", + " ]", + " }", + " }, function (err, res) { ", + " if (err) {", + " return reject(err);", + " }", + "", + " //assign the authorization header value", + " pm.environment.set('consent_app_auth_header_value', `${res.json().access_token}`);", + "", + " return resolve();", + " }); ", + " });", + "}).then(() => { ", + " clearTimeout(interval);", + "}).catch((err) => { ", + " console.error(err); ", + " clearTimeout(interval); ", + "});" + ] + } + }, + { + "listen": "test", + "script": { + "type": "text/javascript", + "packages": {}, + "requests": {}, + "exec": [ + "" + ] + } + } + ] + }, + { + "name": "Get proxy role (GET /Consent/{id})", + "item": [ + { + "name": "Valid request - Get proxy role", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "" + ], + "type": "text/javascript", + "packages": {}, + "requests": {} + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent/:consent_id", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent", + ":consent_id" + ], + "variable": [ + { + "key": "consent_id", + "value": "4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40" + } + ] + }, + "description": "## Example scenario\n\n**Given** a proxy role exists between a performer and a patient in the National Proxy Store \n**When** a GET /Consent/{id} request is sent with the consent id of the proxy role \n**Then** the proxy role is returned" + }, + "response": [ + { + "name": "Proxy role returned - No patient or performer details", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "4b1a8cf8-aa7e-4aa2-b465-44a5d25be876", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "b09740bc-b71f-4d04-a597-c89ab3804f90", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent/:consent_id", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent", + ":consent_id" + ], + "variable": [ + { + "key": "consent_id", + "value": "4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Date", + "value": "Thu, 04 Dec 2025 11:28:18 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "1873" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "23636f8d-f5ef-4050-8c67-51e393b47c87" + }, + { + "key": "x-amz-apigw-id", + "value": "VD581F_4LPEFyDg=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-69317051-6384bdf9e3106d26096daa32" + }, + { + "key": "X-Request-ID", + "value": "784fb8d0-37ff-4716-bf77-81a395fd20f8" + }, + { + "key": "X-Correlation-ID", + "value": "ec404ce9-1721-4158-91af-2064ad3e7ea4" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:28:18Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40\",\n \"resource\": {\n \"id\": \"4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:08:46Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898660\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-12-05\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n }\n ]\n}" + }, + { + "name": "Proxy role returned - Include performer details", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent/:consent_id?_include=Consent:performer", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent", + ":consent_id" + ], + "query": [ + { + "key": "_include", + "value": "Consent:performer" + } + ], + "variable": [ + { + "key": "consent_id", + "value": "4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Date", + "value": "Thu, 04 Dec 2025 11:28:48 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "2789" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "a1f034c1-6ee8-499e-aa60-eea157ad4bd9" + }, + { + "key": "x-amz-apigw-id", + "value": "VD6AYFQMrPEFgjw=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-69317068-3a18b175fb02b76c68acfce1" + }, + { + "key": "X-Request-ID", + "value": "e8a5dada-5577-4738-abd5-7a09251e8c3b" + }, + { + "key": "X-Correlation-ID", + "value": "5eeb9d78-133f-4132-b121-649162a6bc14" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:28:47Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40?_include=Consent%3Aperformer\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40\",\n \"resource\": {\n \"id\": \"4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:08:46Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898660\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-12-05\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/nVLgl\",\n \"resource\": {\n \"id\": \"nVLgl\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898660\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" + }, + { + "name": "Proxy role returned - Include patient details", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent/:consent_id?_include=Consent:patient", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent", + ":consent_id" + ], + "query": [ + { + "key": "_include", + "value": "Consent:patient" + } + ], + "variable": [ + { + "key": "consent_id", + "value": "4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Date", + "value": "Thu, 04 Dec 2025 11:29:08 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "3601" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "b6cb5439-d1a8-4f95-bd3e-9dca7bed9e88" + }, + { + "key": "x-amz-apigw-id", + "value": "VD6ErHoPLPEF1rg=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-69317083-b57a368a7776107b8b3e5f7a" + }, + { + "key": "X-Request-ID", + "value": "22ca0610-1b6e-4e3a-aa1a-ede697da4a1d" + }, + { + "key": "X-Correlation-ID", + "value": "71035b63-936a-4ce4-b036-3d592c764d88" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:29:08Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40?_include=Consent%3Apatient\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40\",\n \"resource\": {\n \"id\": \"4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:08:46Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898660\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-12-05\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898660\",\n \"resource\": {\n \"id\": \"9736898660\",\n \"meta\": {\n \"security\": [\n {\n \"code\": \"U\",\n \"display\": \"unrestricted\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-Confidentiality\"\n },\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ],\n \"versionId\": \"4\"\n },\n \"address\": [\n {\n \"extension\": [\n {\n \"extension\": [\n {\n \"url\": \"type\",\n \"valueCoding\": {\n \"code\": \"PAF\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType\"\n }\n },\n {\n \"url\": \"value\",\n \"valueString\": \"19976537\"\n }\n ],\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey\"\n }\n ],\n \"id\": \"pBQDr\",\n \"line\": [\n \"CARLTON\",\n \"VICARAGE LANE\",\n \"REDBOURNE\",\n \"GAINSBOROUGH\",\n \"LINCS\"\n ],\n \"period\": {\n \"start\": \"2025-07-15\"\n },\n \"postalCode\": \"DN21 4QW\",\n \"use\": \"home\"\n }\n ],\n \"birthDate\": \"2012-04-24\",\n \"gender\": \"female\",\n \"generalPractitioner\": [\n {\n \"id\": \"xSEnH\",\n \"identifier\": {\n \"period\": {\n \"start\": \"2024-11-06\"\n },\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A20047\"\n }\n }\n ],\n \"identifier\": [\n {\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"01\",\n \"display\": \"Number present and verified\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\n \"version\": \"1.0.0\"\n }\n ]\n }\n }\n ],\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898660\"\n }\n ],\n \"name\": [\n {\n \"family\": \"GODREY\",\n \"given\": [\n \"Davina\",\n \"Linda\"\n ],\n \"period\": {\n \"start\": \"2017-04-22\"\n },\n \"prefix\": [\n \"MISS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" + }, + { + "name": "Proxy role returned - Include performer and patient details", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent/:consent_id?_include=Consent:patient&_include=Consent:performer", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent", + ":consent_id" + ], + "query": [ + { + "key": "_include", + "value": "Consent:patient" + }, + { + "key": "_include", + "value": "Consent:performer" + } + ], + "variable": [ + { + "key": "consent_id", + "value": "4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Date", + "value": "Thu, 04 Dec 2025 11:29:26 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "4517" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "9db19dac-df92-4494-8f31-076621ab3d1a" + }, + { + "key": "x-amz-apigw-id", + "value": "VD6HkGFkrPEFxmw=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-69317096-6ad930e767f145f7dd07b977" + }, + { + "key": "X-Request-ID", + "value": "5fd5c3dc-1f5c-4ac5-a9b4-018fdd7f1a0b" + }, + { + "key": "X-Correlation-ID", + "value": "fd7368b4-0828-40b0-97fa-6d19fb51a9e0" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:29:26Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40?_include=Consent%3Apatient&_include=Consent%3Aperformer\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40\",\n \"resource\": {\n \"id\": \"4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:08:46Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898660\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-12-05\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898660\",\n \"resource\": {\n \"id\": \"9736898660\",\n \"meta\": {\n \"security\": [\n {\n \"code\": \"U\",\n \"display\": \"unrestricted\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-Confidentiality\"\n },\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ],\n \"versionId\": \"4\"\n },\n \"address\": [\n {\n \"extension\": [\n {\n \"extension\": [\n {\n \"url\": \"type\",\n \"valueCoding\": {\n \"code\": \"PAF\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType\"\n }\n },\n {\n \"url\": \"value\",\n \"valueString\": \"19976537\"\n }\n ],\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey\"\n }\n ],\n \"id\": \"pBQDr\",\n \"line\": [\n \"CARLTON\",\n \"VICARAGE LANE\",\n \"REDBOURNE\",\n \"GAINSBOROUGH\",\n \"LINCS\"\n ],\n \"period\": {\n \"start\": \"2025-07-15\"\n },\n \"postalCode\": \"DN21 4QW\",\n \"use\": \"home\"\n }\n ],\n \"birthDate\": \"2012-04-24\",\n \"gender\": \"female\",\n \"generalPractitioner\": [\n {\n \"id\": \"xSEnH\",\n \"identifier\": {\n \"period\": {\n \"start\": \"2024-11-06\"\n },\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A20047\"\n }\n }\n ],\n \"identifier\": [\n {\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"01\",\n \"display\": \"Number present and verified\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\n \"version\": \"1.0.0\"\n }\n ]\n }\n }\n ],\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898660\"\n }\n ],\n \"name\": [\n {\n \"family\": \"GODREY\",\n \"given\": [\n \"Davina\",\n \"Linda\"\n ],\n \"period\": {\n \"start\": \"2017-04-22\"\n },\n \"prefix\": [\n \"MISS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/nVLgl\",\n \"resource\": {\n \"id\": \"nVLgl\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898660\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" + } + ] + }, + { + "name": "Invalid consent id - Get proxy role", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "" + ], + "type": "text/javascript", + "packages": {}, + "requests": {} + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent/:consent_id", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent", + ":consent_id" + ], + "variable": [ + { + "key": "consent_id", + "value": "invalid" + } + ] + }, + "description": "## Example scenario\n\n**Given** a proxy role exists between a performer and a patient in the National Proxy Store \n**When** a GET /Consent/{id} request is sent where the ID is invalid \n**Then** a 400 error is returned with details including 'Required parameter(s) are invalid.'" + }, + "response": [ + { + "name": "Invalid consent id error returned", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "6ada3f0b-6520-4517-a71c-8ee93616f52b", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "ac9c9714-f361-44f2-92be-ea1eb00f9990", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent/:consent_id", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent", + ":consent_id" + ], + "variable": [ + { + "key": "consent_id", + "value": "invalid" + } + ] + } + }, + "status": "Unprocessable Entity (WebDAV) (RFC 4918)", + "code": 422, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Thu, 27 Nov 2025 16:49:51 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "370" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "8bae29b7-2cf9-4f6f-b054-0ff6133092b7" + }, + { + "key": "x-amz-apigw-id", + "value": "UtkfVE6VLPEFmDg=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-6928812e-f15d362bb65b30e32885ea32" + }, + { + "key": "X-Request-ID", + "value": "51f1c948-51e0-4719-8307-fd1f987809a1" + }, + { + "key": "X-Correlation-ID", + "value": "cf91adbc-f994-4a56-9d6b-2b324c0af196" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"issue\": [\n {\n \"code\": \"invalid\",\n \"diagnostics\": \"Invalid request with error - ID must be a valid UUID.\",\n \"details\": {\n \"coding\": [\n {\n \"code\": \"INVALID_ID_VALUE\",\n \"display\": \"Required parameter(s) are invalid.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" + } + ] + }, + { + "name": "Invalid include parameter - Get proxy role", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "" + ], + "type": "text/javascript", + "packages": {}, + "requests": {} + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent/:consent_id?_include=Consent:invalid", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent", + ":consent_id" + ], + "query": [ + { + "key": "_include", + "value": "Consent:invalid" + } + ], + "variable": [ + { + "key": "consent_id", + "value": "77363c92-8c33-490f-b5c9-9ef81c2cf16f" + } + ] + }, + "description": "## Example scenario\n\n**Given** a proxy role exists between a performer and a patient in the National Proxy Store \n**When** a GET /Consent/{id} request is sent with an invalid include parameter \n**Then** a 422 error is returned with details including 'Required parameter(s) are invalid.'" + }, + "response": [ + { + "name": "Invalid include parameter error returned", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "b6656a79-4fde-4def-b9ae-5cb1d5667d8f", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "7ae117a4-5b43-4aac-aa00-5fcc0c460fac", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent/:consent_id?_include=Consent:invalid", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent", + ":consent_id" + ], + "query": [ + { + "key": "_include", + "value": "Consent:invalid" + } + ], + "variable": [ + { + "key": "consent_id", + "value": "77363c92-8c33-490f-b5c9-9ef81c2cf16f" + } + ] + } + }, + "status": "Unprocessable Entity (WebDAV) (RFC 4918)", + "code": 422, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Thu, 27 Nov 2025 16:50:07 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "377" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "6da48428-7512-4d8b-9856-b2cc37713381" + }, + { + "key": "x-amz-apigw-id", + "value": "Utkh9GPDLPEF3pw=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-6928813f-6ca71472e425ed45ed5bd0a5" + }, + { + "key": "X-Request-ID", + "value": "2dbb0b8c-a6c8-4bf2-9005-ec19ff68f5b2" + }, + { + "key": "X-Correlation-ID", + "value": "ec9a3692-5922-491d-8df1-da17fe8e473b" + }, + { + "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_PARAMETER\",\n \"display\": \"Required parameter(s) are invalid.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"Invalid request with error - _include parameter is invalid.\",\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" + } + ] + }, + { + "name": "Proxy role not found - Get proxy role", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "" + ], + "type": "text/javascript", + "packages": {}, + "requests": {} + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent/:consent_id", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent", + ":consent_id" + ], + "variable": [ + { + "key": "consent_id", + "value": "4cfccac1-673c-4fea-9b73-54b1a605c9a0" + } + ] + }, + "description": "## Example scenario\n\n**Given** a proxy role does not exist between a performer and a patient in the National Proxy Store \n**When** a GET /Consent/{id} request is sent \n**Then** a 404 error is returned with details including 'Resource that has been marked as invalid was requested - invalid resources cannot be retrieved'" + }, + "response": [ + { + "name": "Proxy role not found error response", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "ed862755-76fc-47b5-9381-9578062418e3", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "5095096c-4f78-4544-b812-ba9a4b21d08d", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent/:consent_id", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent", + ":consent_id" + ], + "variable": [ + { + "key": "consent_id", + "value": "4cfccac1-673c-4fea-9b73-54b1a605c9a0" + } + ] + } + }, + "status": "Not Found", + "code": 404, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Thu, 27 Nov 2025 16:50:22 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "478" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "ece32b72-4d4a-43c9-b42a-e47b729e04da" + }, + { + "key": "x-amz-apigw-id", + "value": "UtkkIHJprPEFiYw=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-6928814d-5023dcb7c8009889ccde4f3d" + }, + { + "key": "X-Request-ID", + "value": "3ec49ee6-c56c-4df9-aa7a-f54bb6b3e795" + }, + { + "key": "X-Correlation-ID", + "value": "74eb5dd5-2d74-4b3a-a482-5480e1ad6464" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"issue\": [\n {\n \"code\": \"processing\",\n \"details\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\",\n \"code\": \"INVALIDATED_RESOURCE\",\n \"display\": \"Resource that has been marked as invalid was requested - invalid resources cannot be retrieved\"\n }\n ]\n },\n \"diagnostics\": \"Resource that has been marked as invalid was requested - invalid resources cannot be retrieved\",\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" + } + ] + }, + { + "name": "Missing consent id value - Get proxy role", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "" + ], + "type": "text/javascript", + "packages": {}, + "requests": {} + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent/", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent", + "" + ] + }, + "description": "## Example scenario\n\n**Given** a proxy role exists between a performer and a patient in the National Proxy Store \n**When** a GET /Consent/{id} request is sent with the ID value missing \n**Then** a 400 error is returned with details including 'Required parameter(s) are missing.'" + }, + "response": [ + { + "name": "Missing consent id value error returned", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "7c50dc2d-fc25-4bed-8ce8-d58b4811f58c", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "210ede12-efec-4195-b2cd-1a04d1827a81", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/Consent/", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent", + "" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Thu, 27 Nov 2025 16:51:00 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "417" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "c4a3d99b-0ea1-40de-82bf-5cd2fa60afd6" + }, + { + "key": "x-amz-apigw-id", + "value": "UtkqLGF_rPEFcMw=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-69288173-c5d997b9110a61bf7b655fe7" + }, + { + "key": "X-Request-ID", + "value": "de0e2e5b-1f1b-4448-a7ee-42d0236b88a6" + }, + { + "key": "X-Correlation-ID", + "value": "6f458de2-64c6-4764-9044-34a5617d3d43" + }, + { + "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_IDENTIFIER_VALUE\",\n \"display\": \"Required parameter(s) are missing.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"Invalid request with error - performer:identifier or patient:identifier parameter not found.\",\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" + } + ] + } + ], + "description": "## Allowed auth methods\n\n- NHS Login token - Auth with test user `9730675929`\n \n- CIS2 token - Auth with test user `656005750108`\n \n\nSee collection level documentation for info about how to get authorization tokens.", + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{cis2_token}}", + "type": "string" + } + ] + }, + "event": [ + { + "listen": "prerequest", + "script": { + "type": "text/javascript", + "packages": {}, + "requests": {}, + "exec": [ + "" + ] + } + }, + { + "listen": "test", + "script": { + "type": "text/javascript", + "packages": {}, + "requests": {}, + "exec": [ + "" + ] + } + } + ] + }, + { + "name": "Create a new access request (POST /QuestionnaireResponse)", + "item": [ + { + "name": "Valid request - Proxy applicant - New adult to adult access request", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/fhir+json", + "type": "text" + }, + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Use-National-Proxy-Store", + "value": "False", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"resourceType\": \"QuestionnaireResponse\",\n \"status\": \"completed\",\n \"authored\": \"{{$isoTimestamp}}\",\n \"source\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9730675929\"\n }\n },\n \"subject\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898202\"\n }\n },\n \"questionnaire\": \"Questionnaire/{{$randomUUID}}\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson\",\n \"text\": \"relatedPerson\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_identifier\",\n \"text\": \"NHS Number\",\n \"answer\": [\n {\n \"valueString\": \"9730675929\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name\",\n \"text\": \"relatedPerson_name\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_name_first\",\n \"text\": \"First name.\",\n \"answer\": [\n {\n \"valueString\": \"Betty\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name_family\",\n \"text\": \"Family name (often called Surname).\",\n \"answer\": [\n {\n \"valueString\": \"MORLEY\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_birthDate\",\n \"text\": \"Date of Birth\",\n \"answer\": [\n {\n \"valueDate\": \"2005-01-20\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_basisForAccess\",\n \"text\": \"Basis For Access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_relationship\",\n \"text\": \"Relationship\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient\",\n \"text\": \"patient\",\n \"item\": [\n {\n \"linkId\": \"patient_identifier\",\n \"text\": \"NHS Number\",\n \"answer\": [\n {\n \"valueString\": \"9736898202\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name\",\n \"text\": \"patient_name\",\n \"item\": [\n {\n \"linkId\": \"patient_name_first\",\n \"text\": \"First name.\",\n \"answer\": [\n {\n \"valueString\": \"URIEL\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name_family\",\n \"text\": \"Family name (often called Surname).\",\n \"answer\": [\n {\n \"valueString\": \"ROTH\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient_birthDate\",\n \"text\": \"Date of Birth\",\n \"answer\": [\n {\n \"valueDate\": \"1988-11-10\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess\",\n \"text\": \"requestedAccess\",\n \"item\": [\n {\n \"linkId\": \"requestedAccess_accessLevel\",\n \"text\": \"Requested access level\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"APPT\",\n \"display\": \"Appointment Booking\"\n }\n },\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"VACC\",\n \"display\": \"Vaccination Records\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccess\",\n \"text\": \"Reason for access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-ReasonForAccess\",\n \"code\": \"COMB\",\n \"display\": \"Communication Barriers\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccessMoreinfo\",\n \"text\": \"Reason for access - further information\",\n \"answer\": [\n {\n \"valueString\": \"No internet connection\"\n }\n ]\n }\n ]\n }\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{api_base_url}}/QuestionnaireResponse", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "QuestionnaireResponse" + ] + }, + "description": "## Example scenario\n\n**Given** no proxy role exists between two adults \n**When** a valid access request is sent with the proxy as the applicant \n**Then** a 201 response is returned" + }, + "response": [ + { + "name": "A2A proxy applicant access request created", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/fhir+json", + "type": "text" + }, + { + "key": "X-Request-ID", + "value": "5ef96245-493a-468c-9936-06fb46e387af", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "15ace5c8-dc43-435f-baf8-3437b76ffdbf", + "type": "text" + }, + { + "key": "X-Use-National-Proxy-Store", + "value": "False", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"resourceType\": \"QuestionnaireResponse\",\n \"status\": \"completed\",\n \"authored\": \"2026-01-12T15:09:45.790Z\",\n \"source\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9730675929\"\n }\n },\n \"subject\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898202\"\n }\n },\n \"questionnaire\": \"Questionnaire/2e61ba16-f2ee-4e16-8526-194873d63f24\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson\",\n \"text\": \"relatedPerson\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_identifier\",\n \"text\": \"NHS Number\",\n \"answer\": [\n {\n \"valueString\": \"9730675929\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name\",\n \"text\": \"relatedPerson_name\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_name_first\",\n \"text\": \"First name.\",\n \"answer\": [\n {\n \"valueString\": \"Betty\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name_family\",\n \"text\": \"Family name (often called Surname).\",\n \"answer\": [\n {\n \"valueString\": \"MORLEY\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_birthDate\",\n \"text\": \"Date of Birth\",\n \"answer\": [\n {\n \"valueDate\": \"2005-01-20\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_basisForAccess\",\n \"text\": \"Basis For Access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_relationship\",\n \"text\": \"Relationship\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient\",\n \"text\": \"patient\",\n \"item\": [\n {\n \"linkId\": \"patient_identifier\",\n \"text\": \"NHS Number\",\n \"answer\": [\n {\n \"valueString\": \"9736898202\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name\",\n \"text\": \"patient_name\",\n \"item\": [\n {\n \"linkId\": \"patient_name_first\",\n \"text\": \"First name.\",\n \"answer\": [\n {\n \"valueString\": \"URIEL\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name_family\",\n \"text\": \"Family name (often called Surname).\",\n \"answer\": [\n {\n \"valueString\": \"ROTH\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient_birthDate\",\n \"text\": \"Date of Birth\",\n \"answer\": [\n {\n \"valueDate\": \"1988-11-10\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess\",\n \"text\": \"requestedAccess\",\n \"item\": [\n {\n \"linkId\": \"requestedAccess_accessLevel\",\n \"text\": \"Requested access level\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"APPT\",\n \"display\": \"Appointment Booking\"\n }\n },\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"VACC\",\n \"display\": \"Vaccination Records\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccess\",\n \"text\": \"Reason for access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-ReasonForAccess\",\n \"code\": \"COMB\",\n \"display\": \"Communication Barriers\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccessMoreinfo\",\n \"text\": \"Reason for access - further information\",\n \"answer\": [\n {\n \"valueString\": \"No internet connection\"\n }\n ]\n }\n ]\n }\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{api_base_url}}/QuestionnaireResponse", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "QuestionnaireResponse" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Mon, 01 Dec 2025 16:09:01 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "186" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "720499ae-68fe-495a-8485-862105f276a9" + }, + { + "key": "x-amz-apigw-id", + "value": "U6qQkGxVrPEFeoA=" + }, + { + "key": "location", + "value": "https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/QuestionnaireResponse/e185e5e3-901e-4b6a-bfe2-f9adb0b311a4" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-692dbd9c-999e6478f9613be345a68c77" + }, + { + "key": "X-Request-ID", + "value": "687bfc1b-b7a7-4681-a7bf-01ac6e7dd97a" + }, + { + "key": "X-Correlation-ID", + "value": "6adda3bb-aacf-4e4f-a459-a2a0fe6d34be" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"OperationOutcome\",\n \"issue\": [\n {\n \"severity\": \"information\",\n \"code\": \"informational\",\n \"details\": {\n \"coding\": [\n {\n \"code\": \"19C01XB6WC\",\n \"display\": \"19C01XB6WC\"\n }\n ]\n }\n }\n ]\n}" + } + ] + }, + { + "name": "Valid request - Patient applicant - New adult to adult access request", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/fhir+json", + "type": "text" + }, + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Use-National-Proxy-Store", + "value": "False", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"resourceType\": \"QuestionnaireResponse\",\n \"status\": \"completed\",\n \"authored\": \"{{$isoTimestamp}}\",\n \"source\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9730675929\"\n }\n },\n \"subject\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9730675929\"\n }\n },\n \"questionnaire\": \"Questionnaire/{{$randomUUID}}\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson\",\n \"text\": \"relatedPerson\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_identifier\",\n \"text\": \"NHS Number\",\n \"answer\": [\n {\n \"valueString\": \"9736898164\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name\",\n \"text\": \"relatedPerson_name\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_name_first\",\n \"text\": \"First name.\",\n \"answer\": [\n {\n \"valueString\": \"Heidi\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name_family\",\n \"text\": \"Family name (often called Surname).\",\n \"answer\": [\n {\n \"valueString\": \"LAW\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_birthDate\",\n \"text\": \"Date of Birth\",\n \"answer\": [\n {\n \"valueDate\": \"1997-09-15\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_basisForAccess\",\n \"text\": \"Basis For Access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_relationship\",\n \"text\": \"Relationship\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient\",\n \"text\": \"patient\",\n \"item\": [\n {\n \"linkId\": \"patient_identifier\",\n \"text\": \"NHS Number\",\n \"answer\": [\n {\n \"valueString\": \"9730675929\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name\",\n \"text\": \"patient_name\",\n \"item\": [\n {\n \"linkId\": \"patient_name_first\",\n \"text\": \"First name.\",\n \"answer\": [\n {\n \"valueString\": \"Betty\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name_family\",\n \"text\": \"Family name (often called Surname).\",\n \"answer\": [\n {\n \"valueString\": \"MORLEY\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient_birthDate\",\n \"text\": \"Date of Birth\",\n \"answer\": [\n {\n \"valueDate\": \"2005-01-20\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess\",\n \"text\": \"requestedAccess\",\n \"item\": [\n {\n \"linkId\": \"requestedAccess_accessLevel\",\n \"text\": \"Requested access level\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"APPT\",\n \"display\": \"Appointment Booking\"\n }\n },\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"VACC\",\n \"display\": \"Vaccination Records\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccess\",\n \"text\": \"Reason for access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-ReasonForAccess\",\n \"code\": \"COMB\",\n \"display\": \"Communication Barriers\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccessMoreinfo\",\n \"text\": \"Reason for access - further information\",\n \"answer\": [\n {\n \"valueString\": \"No internet connection\"\n }\n ]\n }\n ]\n }\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{api_base_url}}/QuestionnaireResponse", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "QuestionnaireResponse" + ] + }, + "description": "## Example scenario\n\n**Given** no proxy role exists between two adults \n**When** a valid access request is sent with the patient as the applicant \n**Then** a 201 response is returned" + }, + "response": [ + { + "name": "A2A patient applicant access request created", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/fhir+json", + "type": "text" + }, + { + "key": "X-Request-ID", + "value": "8af428cd-7e1e-4ed3-b127-0b751d6ae98d", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "e5cc0a6d-ea0d-433b-9307-30c988926969", + "type": "text" + }, + { + "key": "X-Use-National-Proxy-Store", + "value": "False", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"resourceType\": \"QuestionnaireResponse\",\n \"status\": \"completed\",\n \"authored\": \"2026-01-12T15:09:46.233Z\",\n \"source\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9730675929\"\n }\n },\n \"subject\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9730675929\"\n }\n },\n \"questionnaire\": \"Questionnaire/aa952e3f-3657-4ec3-bec0-25d881ed2e20\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson\",\n \"text\": \"relatedPerson\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_identifier\",\n \"text\": \"NHS Number\",\n \"answer\": [\n {\n \"valueString\": \"9736898164\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name\",\n \"text\": \"relatedPerson_name\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_name_first\",\n \"text\": \"First name.\",\n \"answer\": [\n {\n \"valueString\": \"Heidi\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name_family\",\n \"text\": \"Family name (often called Surname).\",\n \"answer\": [\n {\n \"valueString\": \"LAW\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_birthDate\",\n \"text\": \"Date of Birth\",\n \"answer\": [\n {\n \"valueDate\": \"1997-09-15\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_basisForAccess\",\n \"text\": \"Basis For Access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_relationship\",\n \"text\": \"Relationship\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient\",\n \"text\": \"patient\",\n \"item\": [\n {\n \"linkId\": \"patient_identifier\",\n \"text\": \"NHS Number\",\n \"answer\": [\n {\n \"valueString\": \"9730675929\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name\",\n \"text\": \"patient_name\",\n \"item\": [\n {\n \"linkId\": \"patient_name_first\",\n \"text\": \"First name.\",\n \"answer\": [\n {\n \"valueString\": \"Betty\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name_family\",\n \"text\": \"Family name (often called Surname).\",\n \"answer\": [\n {\n \"valueString\": \"MORLEY\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient_birthDate\",\n \"text\": \"Date of Birth\",\n \"answer\": [\n {\n \"valueDate\": \"2005-01-20\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess\",\n \"text\": \"requestedAccess\",\n \"item\": [\n {\n \"linkId\": \"requestedAccess_accessLevel\",\n \"text\": \"Requested access level\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"APPT\",\n \"display\": \"Appointment Booking\"\n }\n },\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"VACC\",\n \"display\": \"Vaccination Records\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccess\",\n \"text\": \"Reason for access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-ReasonForAccess\",\n \"code\": \"COMB\",\n \"display\": \"Communication Barriers\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccessMoreinfo\",\n \"text\": \"Reason for access - further information\",\n \"answer\": [\n {\n \"valueString\": \"No internet connection\"\n }\n ]\n }\n ]\n }\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{api_base_url}}/QuestionnaireResponse", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "QuestionnaireResponse" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Mon, 01 Dec 2025 16:10:22 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "186" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "d15e2ba0-3698-4fcf-80fe-d73279dd89a8" + }, + { + "key": "x-amz-apigw-id", + "value": "U6qdWHFfLPEFoUA=" + }, + { + "key": "location", + "value": "https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/QuestionnaireResponse/bdbba534-6e11-4491-aa3a-1631b0009628" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-692dbdee-08b18875f6f85ab2a7353bd4" + }, + { + "key": "X-Request-ID", + "value": "82cb14a5-09d0-41d4-8f73-2936794c32de" + }, + { + "key": "X-Correlation-ID", + "value": "73873b5d-1e2e-4a42-9dc3-83f1292f944b" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"OperationOutcome\",\n \"issue\": [\n {\n \"severity\": \"information\",\n \"code\": \"informational\",\n \"details\": {\n \"coding\": [\n {\n \"code\": \"19C0177GRI\",\n \"display\": \"19C0177GRI\"\n }\n ]\n }\n }\n ]\n}" + } + ] + }, + { + "name": "Valid request - New adult to child access request", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/fhir+json", + "type": "text" + }, + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Use-National-Proxy-Store", + "value": "False", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"resourceType\": \"QuestionnaireResponse\",\n \"status\": \"completed\",\n \"authored\": \"{{$isoTimestamp}}\",\n \"source\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9730675929\"\n }\n },\n \"subject\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898245\"\n }\n },\n \"questionnaire\": \"Questionnaire/01dc6813-3421-4d14-948d-a4888241add1\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson\",\n \"text\": \"relatedPerson\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_identifier\",\n \"text\": \"NHS Number\",\n \"answer\": [\n {\n \"valueString\": \"9730675929\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name\",\n \"text\": \"relatedPerson_name\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_name_first\",\n \"text\": \"First name.\",\n \"answer\": [\n {\n \"valueString\": \"Betty\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name_family\",\n \"text\": \"Family name (often called Surname).\",\n \"answer\": [\n {\n \"valueString\": \"MORLEY\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_birthDate\",\n \"text\": \"Date of Birth\",\n \"answer\": [\n {\n \"valueDate\": \"2005-01-20\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_basisForAccess\",\n \"text\": \"Basis For Access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_relationship\",\n \"text\": \"Relationship\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails\",\n \"text\": \"parentalApplicationSupplementaryDetails\",\n \"item\": [\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_evidenceOfResponsibility\",\n \"text\": \"Evidence of parental responsibility\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-EvidenceOfResponsibility\",\n \"code\": \"BRTH\",\n \"display\": \"Birth certificate\"\n }\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_evidenceOfResponsibilityMoreinfo\",\n \"text\": \"Evidence of responsibility - Further Information\",\n \"answer\": [\n {\n \"valueString\": \"Birth Certificate is original\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_isCurrentAddressConfirmed\",\n \"text\": \"Is current address confirmed?\",\n \"answer\": [\n {\n \"valueString\": \"Yes\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_newAddress\",\n \"text\": \"parentalApplicationSupplementaryDetails_newAddress\",\n \"item\": [\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_line1\",\n \"text\": \"Address Line 1\",\n \"answer\": [\n {\n \"valueString\": \"101 MESSINGHAM ROAD\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_line2\",\n \"text\": \"Address Line 2\",\n \"answer\": [\n {\n \"valueString\": \"\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_line3\",\n \"text\": \"Address Line 3\",\n \"answer\": [\n {\n \"valueString\": \"\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_city\",\n \"text\": \"Town / City\",\n \"answer\": [\n {\n \"valueString\": \"SCUNTHORPE\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_district\",\n \"text\": \"County\",\n \"answer\": [\n {\n \"valueString\": \"S HUMBERSIDE\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_postalCode\",\n \"text\": \"Postcode\",\n \"answer\": [\n {\n \"valueString\": \"DN17 2LN\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_liveAtSameAddress\",\n \"text\": \"Do the adult and child live at the same address?\",\n \"answer\": [\n {\n \"valueString\": \"Yes\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_canChildConsent\",\n \"text\": \"Can the child consent?\",\n \"answer\": [\n {\n \"valueString\": \"No\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_reasonNoChildConsent\",\n \"text\": \"Reason the child cannot consent\",\n \"answer\": [\n {\n \"valueString\": \"Child is too young\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient\",\n \"text\": \"patient\",\n \"item\": [\n {\n \"linkId\": \"patient_identifier\",\n \"text\": \"NHS Number\",\n \"answer\": [\n {\n \"valueString\": \"9736898245\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name\",\n \"text\": \"patient_name\",\n \"item\": [\n {\n \"linkId\": \"patient_name_first\",\n \"text\": \"First name.\",\n \"answer\": [\n {\n \"valueString\": \"Amber\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name_family\",\n \"text\": \"Family name (often called Surname).\",\n \"answer\": [\n {\n \"valueString\": \"TUCKER\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient_birthDate\",\n \"text\": \"Date of Birth\",\n \"answer\": [\n {\n \"valueDate\": \"2017-06-09\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess\",\n \"text\": \"requestedAccess\",\n \"item\": [\n {\n \"linkId\": \"requestedAccess_accessLevel\",\n \"text\": \"Requested access level\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"APPT\",\n \"display\": \"Appointment Booking\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccess\",\n \"text\": \"Reason for access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-ReasonForAccess\",\n \"code\": \"COMB\",\n \"display\": \"Communication Barriers\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccessMoreinfo\",\n \"text\": \"Reason for access - further information\",\n \"answer\": [\n {\n \"valueString\": \"No internet connection\"\n }\n ]\n }\n ]\n }\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{api_base_url}}/QuestionnaireResponse", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "QuestionnaireResponse" + ] + }, + "description": "## Example scenario\n\n**Given** no proxy role exists between an adult and child \n**When** a valid access request is sent with the proxy as the applicant \n**Then** a 201 response is returned" + }, + "response": [ + { + "name": "A2C access request created", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/fhir+json", + "type": "text" + }, + { + "key": "X-Request-ID", + "value": "d6f3b8fe-0041-4c34-aeb4-eac71020170d", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "46efa85e-d5c4-403b-a38a-1945f33bac2c", + "type": "text" + }, + { + "key": "X-Use-National-Proxy-Store", + "value": "False", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"resourceType\": \"QuestionnaireResponse\",\n \"status\": \"completed\",\n \"authored\": \"2026-01-12T15:09:46.453Z\",\n \"source\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9730675929\"\n }\n },\n \"subject\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898245\"\n }\n },\n \"questionnaire\": \"Questionnaire/01dc6813-3421-4d14-948d-a4888241add1\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson\",\n \"text\": \"relatedPerson\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_identifier\",\n \"text\": \"NHS Number\",\n \"answer\": [\n {\n \"valueString\": \"9730675929\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name\",\n \"text\": \"relatedPerson_name\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_name_first\",\n \"text\": \"First name.\",\n \"answer\": [\n {\n \"valueString\": \"Betty\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name_family\",\n \"text\": \"Family name (often called Surname).\",\n \"answer\": [\n {\n \"valueString\": \"MORLEY\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_birthDate\",\n \"text\": \"Date of Birth\",\n \"answer\": [\n {\n \"valueDate\": \"2005-01-20\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_basisForAccess\",\n \"text\": \"Basis For Access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_relationship\",\n \"text\": \"Relationship\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails\",\n \"text\": \"parentalApplicationSupplementaryDetails\",\n \"item\": [\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_evidenceOfResponsibility\",\n \"text\": \"Evidence of parental responsibility\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-EvidenceOfResponsibility\",\n \"code\": \"BRTH\",\n \"display\": \"Birth certificate\"\n }\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_evidenceOfResponsibilityMoreinfo\",\n \"text\": \"Evidence of responsibility - Further Information\",\n \"answer\": [\n {\n \"valueString\": \"Birth Certificate is original\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_isCurrentAddressConfirmed\",\n \"text\": \"Is current address confirmed?\",\n \"answer\": [\n {\n \"valueString\": \"Yes\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_newAddress\",\n \"text\": \"parentalApplicationSupplementaryDetails_newAddress\",\n \"item\": [\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_line1\",\n \"text\": \"Address Line 1\",\n \"answer\": [\n {\n \"valueString\": \"101 MESSINGHAM ROAD\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_line2\",\n \"text\": \"Address Line 2\",\n \"answer\": [\n {\n \"valueString\": \"\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_line3\",\n \"text\": \"Address Line 3\",\n \"answer\": [\n {\n \"valueString\": \"\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_city\",\n \"text\": \"Town / City\",\n \"answer\": [\n {\n \"valueString\": \"SCUNTHORPE\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_district\",\n \"text\": \"County\",\n \"answer\": [\n {\n \"valueString\": \"S HUMBERSIDE\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_postalCode\",\n \"text\": \"Postcode\",\n \"answer\": [\n {\n \"valueString\": \"DN17 2LN\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_liveAtSameAddress\",\n \"text\": \"Do the adult and child live at the same address?\",\n \"answer\": [\n {\n \"valueString\": \"Yes\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_canChildConsent\",\n \"text\": \"Can the child consent?\",\n \"answer\": [\n {\n \"valueString\": \"No\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_reasonNoChildConsent\",\n \"text\": \"Reason the child cannot consent\",\n \"answer\": [\n {\n \"valueString\": \"Child is too young\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient\",\n \"text\": \"patient\",\n \"item\": [\n {\n \"linkId\": \"patient_identifier\",\n \"text\": \"NHS Number\",\n \"answer\": [\n {\n \"valueString\": \"9736898245\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name\",\n \"text\": \"patient_name\",\n \"item\": [\n {\n \"linkId\": \"patient_name_first\",\n \"text\": \"First name.\",\n \"answer\": [\n {\n \"valueString\": \"Amber\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name_family\",\n \"text\": \"Family name (often called Surname).\",\n \"answer\": [\n {\n \"valueString\": \"TUCKER\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient_birthDate\",\n \"text\": \"Date of Birth\",\n \"answer\": [\n {\n \"valueDate\": \"2017-06-09\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess\",\n \"text\": \"requestedAccess\",\n \"item\": [\n {\n \"linkId\": \"requestedAccess_accessLevel\",\n \"text\": \"Requested access level\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"APPT\",\n \"display\": \"Appointment Booking\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccess\",\n \"text\": \"Reason for access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-ReasonForAccess\",\n \"code\": \"COMB\",\n \"display\": \"Communication Barriers\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccessMoreinfo\",\n \"text\": \"Reason for access - further information\",\n \"answer\": [\n {\n \"valueString\": \"No internet connection\"\n }\n ]\n }\n ]\n }\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{api_base_url}}/QuestionnaireResponse", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "QuestionnaireResponse" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Mon, 01 Dec 2025 16:11:33 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "186" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "4eba2237-3c13-4bab-afb1-1261b5ac6a19" + }, + { + "key": "x-amz-apigw-id", + "value": "U6qoVF-JLPEFXqQ=" + }, + { + "key": "location", + "value": "https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/QuestionnaireResponse/29a7f71a-2554-4e53-87de-07553d40d5ec" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-692dbe34-f306ba0e1a55aba127add964" + }, + { + "key": "X-Request-ID", + "value": "848e592d-a42e-4fee-b529-8ac484fd459c" + }, + { + "key": "X-Correlation-ID", + "value": "73de9aa5-5951-4d30-8f2d-e64482fb1990" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"OperationOutcome\",\n \"issue\": [\n {\n \"severity\": \"information\",\n \"code\": \"informational\",\n \"details\": {\n \"coding\": [\n {\n \"code\": \"19C01N8Q37\",\n \"display\": \"19C01N8Q37\"\n }\n ]\n }\n }\n ]\n}" + }, + { + "name": "A2C access request created - Verified relationship", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/fhir+json", + "type": "text" + }, + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Use-National-Proxy-Store", + "value": "False", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"resourceType\": \"QuestionnaireResponse\",\n \"status\": \"completed\",\n \"authored\": \"{{$isoTimestamp}}\",\n \"source\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9730675929\"\n }\n },\n \"subject\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9730675422\"\n }\n },\n \"questionnaire\": \"Questionnaire/01dc6813-3421-4d14-948d-a4888241add1\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson\",\n \"text\": \"relatedPerson\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_identifier\",\n \"text\": \"NHS Number\",\n \"answer\": [\n {\n \"valueString\": \"9730675929\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name\",\n \"text\": \"relatedPerson_name\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_name_first\",\n \"text\": \"First name.\",\n \"answer\": [\n {\n \"valueString\": \"Betty\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name_family\",\n \"text\": \"Family name (often called Surname).\",\n \"answer\": [\n {\n \"valueString\": \"MORLEY\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_birthDate\",\n \"text\": \"Date of Birth\",\n \"answer\": [\n {\n \"valueDate\": \"2005-01-20\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_basisForAccess\",\n \"text\": \"Basis For Access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_relationship\",\n \"text\": \"Relationship\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails\",\n \"text\": \"parentalApplicationSupplementaryDetails\",\n \"item\": [\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_evidenceOfResponsibility\",\n \"text\": \"Evidence of parental responsibility\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-EvidenceOfResponsibility\",\n \"code\": \"BRTH\",\n \"display\": \"Birth certificate\"\n }\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_evidenceOfResponsibilityMoreinfo\",\n \"text\": \"Evidence of responsibility - Further Information\",\n \"answer\": [\n {\n \"valueString\": \"Birth Certificate is original\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_isCurrentAddressConfirmed\",\n \"text\": \"Is current address confirmed?\",\n \"answer\": [\n {\n \"valueString\": \"Yes\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_newAddress\",\n \"text\": \"parentalApplicationSupplementaryDetails_newAddress\",\n \"item\": [\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_line1\",\n \"text\": \"Address Line 1\",\n \"answer\": [\n {\n \"valueString\": \"101 MESSINGHAM ROAD\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_line2\",\n \"text\": \"Address Line 2\",\n \"answer\": [\n {\n \"valueString\": \"\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_line3\",\n \"text\": \"Address Line 3\",\n \"answer\": [\n {\n \"valueString\": \"\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_city\",\n \"text\": \"Town / City\",\n \"answer\": [\n {\n \"valueString\": \"SCUNTHORPE\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_district\",\n \"text\": \"County\",\n \"answer\": [\n {\n \"valueString\": \"S HUMBERSIDE\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_postalCode\",\n \"text\": \"Postcode\",\n \"answer\": [\n {\n \"valueString\": \"DN17 2LN\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_liveAtSameAddress\",\n \"text\": \"Do the adult and child live at the same address?\",\n \"answer\": [\n {\n \"valueString\": \"Yes\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_canChildConsent\",\n \"text\": \"Can the child consent?\",\n \"answer\": [\n {\n \"valueString\": \"No\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_reasonNoChildConsent\",\n \"text\": \"Reason the child cannot consent\",\n \"answer\": [\n {\n \"valueString\": \"Child is too young\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient\",\n \"text\": \"patient\",\n \"item\": [\n {\n \"linkId\": \"patient_identifier\",\n \"text\": \"NHS Number\",\n \"answer\": [\n {\n \"valueString\": \"9730675422\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name\",\n \"text\": \"patient_name\",\n \"item\": [\n {\n \"linkId\": \"patient_name_first\",\n \"text\": \"First name.\",\n \"answer\": [\n {\n \"valueString\": \"Rowena\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name_family\",\n \"text\": \"Family name (often called Surname).\",\n \"answer\": [\n {\n \"valueString\": \"HIRST\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient_birthDate\",\n \"text\": \"Date of Birth\",\n \"answer\": [\n {\n \"valueDate\": \"2015-08-09\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess\",\n \"text\": \"requestedAccess\",\n \"item\": [\n {\n \"linkId\": \"requestedAccess_accessLevel\",\n \"text\": \"Requested access level\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"APPT\",\n \"display\": \"Appointment Booking\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccess\",\n \"text\": \"Reason for access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-ReasonForAccess\",\n \"code\": \"COMB\",\n \"display\": \"Communication Barriers\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccessMoreinfo\",\n \"text\": \"Reason for access - further information\",\n \"answer\": [\n {\n \"valueString\": \"No internet connection\"\n }\n ]\n }\n ]\n }\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{api_base_url}}/QuestionnaireResponse", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "QuestionnaireResponse" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Mon, 01 Dec 2025 16:11:33 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "186" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "4eba2237-3c13-4bab-afb1-1261b5ac6a19" + }, + { + "key": "x-amz-apigw-id", + "value": "U6qoVF-JLPEFXqQ=" + }, + { + "key": "location", + "value": "https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/QuestionnaireResponse/29a7f71a-2554-4e53-87de-07553d40d5ec" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-692dbe34-f306ba0e1a55aba127add964" + }, + { + "key": "X-Request-ID", + "value": "848e592d-a42e-4fee-b529-8ac484fd459c" + }, + { + "key": "X-Correlation-ID", + "value": "73de9aa5-5951-4d30-8f2d-e64482fb1990" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"OperationOutcome\",\n \"issue\": [\n {\n \"severity\": \"information\",\n \"code\": \"informational\",\n \"details\": {\n \"coding\": [\n {\n \"code\": \"19C01N8Q37\",\n \"display\": \"19C01N8Q37\"\n }\n ]\n }\n }\n ]\n}" + } + ] + }, + { + "name": "Invalid request body - New adult to adult access request", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/fhir+json", + "type": "text" + }, + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Use-National-Proxy-Store", + "value": "False", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{api_base_url}}/QuestionnaireResponse", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "QuestionnaireResponse" + ] + }, + "description": "## Example scenario\n\n**Given** no proxy role exists between two adults \n**When** a access request is sent with invalid body \n**Then** a 400 error response is returned with code 'INVALID_VALUE'" + }, + "response": [ + { + "name": "Invalid request body error response", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/fhir+json", + "type": "text" + }, + { + "key": "X-Request-ID", + "value": "94d7227f-f801-465f-b04c-8dd7494faf5f", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "7f829c8e-bec6-4cbe-8ed0-d71bf981095b", + "type": "text" + }, + { + "key": "X-Use-National-Proxy-Store", + "value": "False", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{api_base_url}}/QuestionnaireResponse", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "QuestionnaireResponse" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Mon, 01 Dec 2025 16:13:37 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "377" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "28073546-4513-47c5-9d2e-17caeb920a78" + }, + { + "key": "x-amz-apigw-id", + "value": "U6q7zHXFLPEF3Bg=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-692dbeb1-7dd1e1125d0b5422386cffe9" + }, + { + "key": "X-Request-ID", + "value": "d82f5db5-1c08-4251-a94b-50684ea1a06b" + }, + { + "key": "X-Correlation-ID", + "value": "7eeca365-bf2b-4859-9e2c-b5c7731bbe1b" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"issue\": [\n {\n \"code\": \"invalid\",\n \"details\": {\n \"coding\": [\n {\n \"code\": \"BAD_REQUEST\",\n \"display\": \"The request could not be processed.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"The supplied input is not a valid FHIR QuestionnaireResponse.\",\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" + } + ] + } + ], + "description": "## Allowed auth methods\n\n- NHS Login token - Auth with test user `9730675929`\n \n\nSee collection level documentation for info about how to get authorization tokens.", + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{login_token}}", + "type": "string" + } + ] + }, + "event": [ + { + "listen": "prerequest", + "script": { + "type": "text/javascript", + "packages": {}, + "requests": {}, + "exec": [ + "" + ] + } + }, + { + "listen": "test", + "script": { + "type": "text/javascript", + "packages": {}, + "requests": {}, + "exec": [ + "" + ] + } + } + ] + }, + { + "name": "Get access request (GET /QuestionnaireResponse/{id})", + "item": [ + { + "name": "Valid request - Get access request", + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/QuestionnaireResponse/:access_request_id", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "QuestionnaireResponse", + ":access_request_id" + ], + "variable": [ + { + "key": "access_request_id", + "value": "32a5cc78-eb64-4367-abea-cfdb6e9fa2e4" + } + ] + }, + "description": "## Example scenario\n\n**Given** a valid access request has been sent to VRS \n**When** a GET /QuestionnaireResponse/{id} request is sent with the access request UUID \n**Then** the access request is returned" + }, + "response": [] + }, + { + "name": "No access request found - Get access request", + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/QuestionnaireResponse/:access_request_id", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "QuestionnaireResponse", + ":access_request_id" + ], + "variable": [ + { + "key": "access_request_id", + "value": "32a5cc78-eb64-4367-abea-cfdb6e9fa2e4" + } + ] + }, + "description": "## Example scenario\n\n**Given** a valid access request has been sent to VRS \n**When** a GET /QuestionnaireResponse/{id} request is sent with a random UUID \n**Then** a 404 error is returned with message 'QUESTIONNAIRE_RESPONSE_NOT_FOUND'" + }, + "response": [ + { + "name": "No access request found error returned", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "074b07d8-104e-4574-abd7-bdc5181280da", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "f47a9a68-34a5-4a11-881b-8b45695f2e76", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/QuestionnaireResponse/:access_request_id", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "QuestionnaireResponse", + ":access_request_id" + ], + "variable": [ + { + "key": "access_request_id", + "value": "32a5cc78-eb64-4367-abea-cfdb6e9fa2e4" + } + ] + } + }, + "status": "Not Found", + "code": 404, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Mon, 01 Dec 2025 14:37:04 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "400" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "64959769-f136-4d27-9369-b4e01224c066" + }, + { + "key": "x-amz-apigw-id", + "value": "U6cyYE4brPEFXvw=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-692da80e-520fcf28565fe1ea77ceb7fc" + }, + { + "key": "X-Request-ID", + "value": "f6fe610a-d80b-4436-b727-67960c9687a1" + }, + { + "key": "X-Correlation-ID", + "value": "076421a4-1c56-43e4-95a9-6139434516a7" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"OperationOutcome\",\n \"issue\": [\n {\n \"severity\": \"error\",\n \"code\": \"not-found\",\n \"details\": {\n \"coding\": [\n {\n \"code\": \"QUESTIONNAIRE_RESPONSE_NOT_FOUND\",\n \"display\": \"Questionnaire response not found\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\"\n }\n ]\n },\n \"diagnostics\": \"The Questionnaire response could not be found using the provided access request ID.\"\n }\n ]\n}" + } + ] + }, + { + "name": "No access request UUID - Get access request", + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/QuestionnaireResponse/", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "QuestionnaireResponse", + "" + ] + }, + "description": "## Example scenario\n\n**Given** a valid access request has been sent to VRS \n**When** a GET /QuestionnaireResponse/{id} request is sent without a UUID \n**Then** a 400 error is returned with message 'METHOD_NOT_ALLOWED'" + }, + "response": [ + { + "name": "No access request UUID invalid response", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "6e763c1c-b24b-4ffe-8598-e2983ae5e3cf", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "87ed4d25-05d6-4ab6-985e-a254cdd26339", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/QuestionnaireResponse/", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "QuestionnaireResponse", + "" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Mon, 01 Dec 2025 15:15:37 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "370" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "42e98c18-f152-4e8f-8cd2-fc0ba2bcc590" + }, + { + "key": "x-amz-apigw-id", + "value": "U6ibrGjDrPEFgRQ=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-692db117-2a87f1ac0c50e6702fcbc5ce" + }, + { + "key": "X-Request-ID", + "value": "4270ae5f-3cc9-418e-a6f8-aab43372486a" + }, + { + "key": "X-Correlation-ID", + "value": "a23d9c20-bcf2-4e03-ba6b-092a703947f3" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"issue\": [\n {\n \"code\": \"not-supported\",\n \"details\": {\n \"coding\": [\n {\n \"code\": \"METHOD_NOT_ALLOWED\",\n \"display\": \"The method is not allowed.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"The method is not allowed for the requested resource.\",\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" + } + ] + }, + { + "name": "Invalid access request UUID - Get access request", + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/QuestionnaireResponse/invalid", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "QuestionnaireResponse", + "invalid" + ] + }, + "description": "## Example scenario\n\n**Given** a valid access request has been sent to VRS \n**When** a GET /QuestionnaireResponse/{id} request is sent with an invalid UUID \n**Then** a 400 error is returned with message 'INVALID_IDENTIFIER_VALUE'" + }, + "response": [ + { + "name": "Invalid access request UUID invalid response", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "30e863b4-b90b-439e-a757-06eadf3cae48", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "79bc7284-1f65-407a-bc5e-1e5bd8d0496b", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/QuestionnaireResponse/invalid", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "QuestionnaireResponse", + "invalid" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Mon, 01 Dec 2025 15:15:37 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "370" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "42e98c18-f152-4e8f-8cd2-fc0ba2bcc590" + }, + { + "key": "x-amz-apigw-id", + "value": "U6ibrGjDrPEFgRQ=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-692db117-2a87f1ac0c50e6702fcbc5ce" + }, + { + "key": "X-Request-ID", + "value": "4270ae5f-3cc9-418e-a6f8-aab43372486a" + }, + { + "key": "X-Correlation-ID", + "value": "a23d9c20-bcf2-4e03-ba6b-092a703947f3" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"OperationOutcome\",\n \"issue\": [\n {\n \"severity\": \"error\",\n \"code\": \"invalid\",\n \"details\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/STU3/CodeSystem/Spine-ErrorOrWarningCode-1\",\n \"code\": \"INVALID_IDENTIFIER_VALUE\",\n \"display\": \"Invalid identifier value\"\n }\n ]\n },\n \"diagnostics\": \"The specified access request ID is invalid. Access request IDs must be a valid UUID.\"\n }\n ]\n}" + } + ] + } + ], + "description": "## Allowed auth methods\n\n- CIS2 token - Auth with test user `656005750108`\n \n- NHS Login token - Auth with test user `9730675929`\n \n\nSee collection level documentation for info about how to get authorization tokens.", + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{cis2_token}}", + "type": "string" + } + ] + }, + "event": [ + { + "listen": "prerequest", + "script": { + "type": "text/javascript", + "packages": {}, + "requests": {}, + "exec": [ + "" + ] + } + }, + { + "listen": "test", + "script": { + "type": "text/javascript", + "packages": {}, + "requests": {}, + "exec": [ + "" + ] + } + } + ] + }, + { + "name": "Create a new proxy role (POST /Consent)", + "item": [ + { + "name": "Valid request - New proxy role", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{cis2_token}}", + "type": "string" + } + ] + }, + "method": "POST", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "Content-Type", + "value": "application/fhir+json", + "type": "text" + } + ], + "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 \t\"system\":\"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",\n \t\"code\":\"parental-responsibility\",\n \t\"display\":\"Parental responsibility\"\n }\n ]\n },\n \t\"reference\":{\"type\":\"RelatedPerson\",\"identifier\":{\"system\":\"https://fhir.nhs.uk/Id/nhs-number\",\"value\":\"9736898148\"}}\n }\n ]\n },\n \t\"extension\":[{\n\t\t\"url\":\"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n\t\t\"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" + } + } + }, + "url": { + "raw": "{{api_base_url}}/Consent", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ] + }, + "description": "## Important - duplicates\n\nWe cannot currently accept duplicate proxy role requests for testing purposes.\n\nThis may lead to you experiencing 409 errors on the 'valid request' scenarios if the same request has already been sent.\n\n## 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 \n**Then** a 201 success response is returned" + }, + "response": [ + { + "name": "Adult to child - New proxy role created", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "X-Request-ID", + "value": "df29a1cb-3861-4d7f-918d-3bcf6f5ef362", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "0b7ed233-3055-48ac-93ef-c71922ccc577", + "type": "text" + }, + { + "key": "Content-Type", + "value": "application/fhir+json", + "type": "text" + } + ], + "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.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" + } + } + }, + "url": { + "raw": "{{api_base_url}}/Consent", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Fri, 28 Nov 2025 15:14:39 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "101" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "bf6bc3d8-1829-4a81-9433-c0b1c21376d6" + }, + { + "key": "x-amz-apigw-id", + "value": "Uwpe7FCjrPEF5aQ=" + }, + { + "key": "location", + "value": "https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/4f15f399-d381-4949-a744-25f9cbfecfb3" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-6929bc5f-f6012c539553033b0859994a" + }, + { + "key": "X-Request-ID", + "value": "46baf4c8-5bb5-4a6e-9bd4-264452817dab" + }, + { + "key": "X-Correlation-ID", + "value": "65bdf903-1cb2-4722-a291-d5056c44e712" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"OperationOutcome\",\n \"issue\": [\n {\n \"severity\": \"information\",\n \"code\": \"informational\"\n }\n ]\n}" + }, + { + "name": "Adult to adult - New proxy role created", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "Content-Type", + "value": "application/fhir+json", + "type": "text" + } + ], + "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.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.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898164\"\n }\n }\n }\n ]\n}\n", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{api_base_url}}/Consent", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Fri, 28 Nov 2025 15:14:39 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "101" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "bf6bc3d8-1829-4a81-9433-c0b1c21376d6" + }, + { + "key": "x-amz-apigw-id", + "value": "Uwpe7FCjrPEF5aQ=" + }, + { + "key": "location", + "value": "https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/4f15f399-d381-4949-a744-25f9cbfecfb3" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-6929bc5f-f6012c539553033b0859994a" + }, + { + "key": "X-Request-ID", + "value": "46baf4c8-5bb5-4a6e-9bd4-264452817dab" + }, + { + "key": "X-Correlation-ID", + "value": "65bdf903-1cb2-4722-a291-d5056c44e712" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"OperationOutcome\",\n \"issue\": [\n {\n \"severity\": \"information\",\n \"code\": \"informational\"\n }\n ]\n}" + } + ] + }, + { + "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": {}, + "requests": {} + } + } + ], + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{cis2_token}}", + "type": "string" + } + ] + }, + "method": "POST", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "Content-Type", + "value": "application/fhir+json", + "type": "text" + } + ], + "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 \"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.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" + } + } + }, + "url": { + "raw": "{{api_base_url}}/Consent", + "host": [ + "{{api_base_url}}" + ], + "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 identifier value error returned", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "X-Request-ID", + "value": "fa822d40-196d-4112-8c87-b46631ba7463", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "13f1ba14-20e9-48c8-b1ef-7f2c34d9bab3", + "type": "text" + }, + { + "key": "Content-Type", + "value": "application/fhir+json", + "type": "text" + } + ], + "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}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{api_base_url}}/Consent", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ] + } + }, + "status": "Unprocessable Entity (WebDAV) (RFC 4918)", + "code": 422, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Fri, 28 Nov 2025 12:46:09 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "402" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "369c4598-e093-44d1-8d27-015c1e1f8a40" + }, + { + "key": "x-amz-apigw-id", + "value": "UwTu1FORLPEFh3Q=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-69299991-27f38de5fa687e1e7d4659b3" + }, + { + "key": "X-Request-ID", + "value": "70591ef1-fbe0-442b-bd9a-545fb5713859" + }, + { + "key": "X-Correlation-ID", + "value": "037cf36b-1014-4177-bcc6-c1cd647aae42" + }, + { + "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_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}" + } + ] + }, + { + "name": "Duplicate role - New proxy role", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{cis2_token}}", + "type": "string" + } + ] + }, + "method": "POST", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "Content-Type", + "value": "application/fhir+json", + "type": "text" + } + ], + "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", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{api_base_url}}/Consent", + "host": [ + "{{api_base_url}}" + ], + "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", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "X-Request-ID", + "value": "8616edc0-f04b-4d56-ac54-4c5dd8930d87", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "42cf4c55-e180-4b8f-abe3-60acd1780311", + "type": "text" + }, + { + "key": "Content-Type", + "value": "application/fhir+json", + "type": "text" + } + ], + "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", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{api_base_url}}/Consent", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ] + } + }, + "status": "Conflict", + "code": 409, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Fri, 28 Nov 2025 12:41:31 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "352" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "de65a534-5cee-45c1-845e-023e9ffab375" + }, + { + "key": "x-amz-apigw-id", + "value": "UwTC8H42LPEFggg=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-69299878-54ea0e3b7bd5d7e836eaea8f" + }, + { + "key": "X-Request-ID", + "value": "dd90c863-82e3-4ef8-9568-3e68a64de1e0" + }, + { + "key": "X-Correlation-ID", + "value": "b08cd6b6-96fc-410c-84a9-e52732fcbc09" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "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}" + } + ] + }, + { + "name": "Missing scope - New proxy role", + "request": { + "method": "POST", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "Content-Type", + "value": "application/fhir+json", + "type": "text" + } + ], + "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}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{api_base_url}}/Consent", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ] + } + }, + "response": [ + { + "name": "Missing scope error returned", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "X-Request-ID", + "value": "2aa3293e-ad0e-4389-a466-d3209ebbfa4e", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "425ca0da-e10c-4010-86b4-93ca9bf737eb", + "type": "text" + }, + { + "key": "Content-Type", + "value": "application/fhir+json", + "type": "text" + } + ], + "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}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{api_base_url}}/Consent", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Fri, 28 Nov 2025 15:18:49 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "353" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "75bfd563-8f97-4b8a-8d50-a08643917d89" + }, + { + "key": "x-amz-apigw-id", + "value": "UwqGBE7MLPEFySQ=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-6929bd59-918cef993de61bcebe339d3e" + }, + { + "key": "X-Request-ID", + "value": "2ca06d13-2568-4f70-b06c-077af0f57137" + }, + { + "key": "X-Correlation-ID", + "value": "8c8ffb79-cc4c-4cb0-a62e-31dc1310a387" + }, + { + "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_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": "Invalid status - New proxy role", + "request": { + "method": "POST", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "Content-Type", + "value": "application/fhir+json", + "type": "text" + } + ], + "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}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{api_base_url}}/Consent", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ] + } + }, + "response": [ + { + "name": "Invalid status - New proxy role", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "X-Request-ID", + "value": "1e0a0136-6025-4190-8450-5676ada97c3c", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "bc404ec3-52fa-465c-9401-2b70484989bc", + "type": "text" + }, + { + "key": "Content-Type", + "value": "application/fhir+json", + "type": "text" + } + ], + "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}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{api_base_url}}/Consent", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ] + } + }, + "status": "Unprocessable Entity (WebDAV) (RFC 4918)", + "code": 422, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Fri, 28 Nov 2025 15:27:32 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "339" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "47dd1183-4b49-44f1-a524-79fe459589a9" + }, + { + "key": "x-amz-apigw-id", + "value": "UwrXkFOZrPEF1ZA=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-6929bf63-31132bda7b3f654ea3534f15" + }, + { + "key": "X-Request-ID", + "value": "e23fbdd1-027c-4281-b37d-094691df9fc7" + }, + { + "key": "X-Correlation-ID", + "value": "226277b1-9d7c-411a-b3fd-3a4a70a4d90e" + }, + { + "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_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": "Missing free text for Other", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "" + ], + "type": "text/javascript", + "packages": {}, + "requests": {} + } + } + ], + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{cis2_token}}", + "type": "string" + } + ] + }, + "method": "POST", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "Content-Type", + "value": "application/fhir+json", + "type": "text" + } + ], + "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", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{api_base_url}}/Consent", + "host": [ + "{{api_base_url}}" + ], + "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": "Missing free text code error returned", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "Content-Type", + "value": "application/fhir+json", + "type": "text" + } + ], + "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", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{api_base_url}}/Consent", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ] + } + }, + "status": "Unprocessable Entity (WebDAV) (RFC 4918)", + "code": 422, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Fri, 28 Nov 2025 12:46:09 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "402" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "369c4598-e093-44d1-8d27-015c1e1f8a40" + }, + { + "key": "x-amz-apigw-id", + "value": "UwTu1FORLPEFh3Q=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-69299991-27f38de5fa687e1e7d4659b3" + }, + { + "key": "X-Request-ID", + "value": "70591ef1-fbe0-442b-bd9a-545fb5713859" + }, + { + "key": "X-Correlation-ID", + "value": "037cf36b-1014-4177-bcc6-c1cd647aae42" + }, + { + "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_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": "Invalid identifer system - New proxy role", + "request": { + "method": "POST", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "Content-Type", + "value": "application/fhir+json", + "type": "text" + } + ], + "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 \"performer\": [\n {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number/invalid\",\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" + } + } + }, + "url": { + "raw": "{{api_base_url}}/Consent", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ] + } + }, + "response": [ + { + "name": "Invalid status error returned", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "X-Request-ID", + "value": "004491e4-b270-4882-99c8-af4e387a505f", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "5f51e084-afd4-442b-b229-5470a750de52", + "type": "text" + }, + { + "key": "Content-Type", + "value": "application/fhir+json", + "type": "text" + } + ], + "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 \"performer\": [\n {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number/invalid\",\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" + } + } + }, + "url": { + "raw": "{{api_base_url}}/Consent", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ] + } + }, + "status": "Unprocessable Entity (WebDAV) (RFC 4918)", + "code": 422, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Fri, 28 Nov 2025 15:29:32 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "399" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "9ca19fe7-0a06-4da0-9b72-9e6135da40f1" + }, + { + "key": "x-amz-apigw-id", + "value": "UwrqcGPaLPEFWkg=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-6929bfdc-4e9f2ada8f5faf65f1630c1c" + }, + { + "key": "X-Request-ID", + "value": "21cc43ac-e531-477d-bc97-3e77e9657b52" + }, + { + "key": "X-Correlation-ID", + "value": "aeeaa71d-0a78-4e83-8c81-3b2884371ae9" + }, + { + "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_IDENTIFIER_SYSTEM\",\n \"display\": \"Invalid identifier system.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"Patient identifier system is invalid\",\n \"expression\": [\n \"patient.identifier.system\"\n ],\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" + } + ] + } + ], + "description": "## Allowed auth methods\n\n- CIS2 token - Auth with test user `656005750108`\n \n\nSee collection level documentation for info about how to get authorization tokens.", + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{cis2_token}}", + "type": "string" + } + ] + }, + "event": [ + { + "listen": "prerequest", + "script": { + "type": "text/javascript", + "packages": {}, + "requests": {}, + "exec": [ + "" + ] + } + }, + { + "listen": "test", + "script": { + "type": "text/javascript", + "packages": {}, + "requests": {}, + "exec": [ + "" + ] + } + } + ] + }, + { + "name": "Update proxy role (PATCH /Consent/{id})", + "item": [ + { + "name": "Valid request - Single update - Update proxy role", + "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 {\"op\": \"replace\", \"path\": \"/status\", \"value\": \"inactive\"},\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]\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": "Proxy role updated to 'inactive' status", + "originalRequest": { + "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 {\"op\": \"replace\", \"path\": \"/status\", \"value\": \"inactive\"},\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" + } + } + }, + "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" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Fri, 28 Nov 2025 16:23:31 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "101" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "5b03d759-c55a-462d-ba3c-e2dbf92d031a" + }, + { + "key": "x-amz-apigw-id", + "value": "UwzkUE0urPEFqHg=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-6929cc81-0d146fcdbc79baf5a5279c3d" + }, + { + "key": "X-Request-ID", + "value": "4555113e-aa4d-409d-bac0-41b0ed91cfc2" + }, + { + "key": "X-Correlation-ID", + "value": "b8c69a60-667d-4b0f-89c7-9de6d4e289a4" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"OperationOutcome\",\n \"issue\": [\n {\n \"severity\": \"information\",\n \"code\": \"informational\"\n }\n ]\n}" + }, + { + "name": "Proxy role end date updated", + "originalRequest": { + "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\": \"/provision/period/end\",\n \"value\": \"2026-12-31\"\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" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Date", + "value": "Thu, 04 Dec 2025 15:48:46 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "101" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "eb0a2130-76e5-41a0-9916-e7c8aa25a4ea" + }, + { + "key": "x-amz-apigw-id", + "value": "VEgG2Hh6LPEFXRQ=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-6931ad5e-d4506ade6d4f3410b20618b9" + }, + { + "key": "X-Request-ID", + "value": "90a9a964-db4c-4ec7-9498-76087f979bb5" + }, + { + "key": "X-Correlation-ID", + "value": "2aa6936b-c5ba-437d-898e-c58794601a01" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"OperationOutcome\",\n \"issue\": [\n {\n \"severity\": \"information\",\n \"code\": \"informational\"\n }\n ]\n}" + }, + { + "name": "Proxy role legal basis updated", + "originalRequest": { + "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\": \"/provision/actor\",\n \"value\": [\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]", + "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" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Date", + "value": "Thu, 04 Dec 2025 15:54:54 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "101" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "63072889-896c-43b1-aff1-0e4eceb2b4d4" + }, + { + "key": "x-amz-apigw-id", + "value": "VEg_9FQxLPEF1mA=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-6931aecc-d571f76cb8f3900088a01c45" + }, + { + "key": "X-Request-ID", + "value": "e436ebda-5011-431a-9de3-1d0749c6f45e" + }, + { + "key": "X-Correlation-ID", + "value": "930a58a1-7ca9-4a89-ac33-a24f5277b1d9" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"OperationOutcome\",\n \"issue\": [\n {\n \"severity\": \"information\",\n \"code\": \"informational\"\n }\n ]\n}" + } + ] + }, + { + "name": "Valid request - Multiple updates - Update proxy role", + "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 {\"op\": \"replace\", \"path\": \"/status\", \"value\": \"inactive\"},\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 {\n \"op\": \"replace\",\n \"path\": \"/provision/period/end\",\n \"value\": \"2026-12-31\"\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 with multiple updates for the proxy role \n**Then** a 200 response is returned and the role is updated" + }, + "response": [ + { + "name": "Proxy role status updated with end date", + "originalRequest": { + "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 {\"op\": \"replace\", \"path\": \"/status\", \"value\": \"inactive\"},\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 {\n \"op\": \"replace\",\n \"path\": \"/provision/period/end\",\n \"value\": \"2026-12-31\"\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" + } + ] + } + }, + "status": "Not Found", + "code": 404, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Date", + "value": "Thu, 04 Dec 2025 15:56:16 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "348" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "fbb23fc6-d143-4ad4-ab95-fef1276bf7d0" + }, + { + "key": "x-amz-apigw-id", + "value": "VEhNJE2VrPEFXkA=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-6931af20-0cc7e03b708f8949fc05bdfa" + }, + { + "key": "X-Request-ID", + "value": "0aa389b6-9542-428f-9e1c-b5411ff0a531" + }, + { + "key": "X-Correlation-ID", + "value": "e3845975-3d6b-4185-81cb-22a80f7ed0da" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"OperationOutcome\",\n \"issue\": [\n {\n \"severity\": \"information\",\n \"code\": \"informational\"\n }\n ]\n}" + } + ] + }, + { + "name": "Resource not found - Update proxy role", + "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 {\"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", + "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": "{{$randomUUID}}" + } + ] + }, + "description": "## Example scenario\n\n**Given** a proxy role exists in the National Proxy Store for a given UUID \n**When** a PATCH /Consent request is sent using the UUID \n**Then** a 404 error is returned with code 'RESOURCE_NOT_FOUND'" + }, + "response": [ + { + "name": "Resource not found error response", + "originalRequest": { + "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 {\"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", + "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": "{{$randomUUID}}" + } + ] + } + }, + "status": "Not Found", + "code": 404, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Fri, 28 Nov 2025 16:51:31 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "348" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "5940dd45-0b04-4e71-8fce-6a69665b256e" + }, + { + "key": "x-amz-apigw-id", + "value": "Uw3q4HTZrPEFxLQ=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-6929d312-f383a46c595faa9361bb8326" + }, + { + "key": "X-Request-ID", + "value": "4cfc1e62-1d97-47b2-825e-2f72eed5e29e" + }, + { + "key": "X-Correlation-ID", + "value": "db86232d-68a5-492d-96e3-02613a3cf6bf" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"issue\": [\n {\n \"code\": \"invalid\",\n \"diagnostics\": \"Proxy role not found.\",\n \"details\": {\n \"coding\": [\n {\n \"code\": \"RESOURCE_NOT_FOUND\",\n \"display\": \"Request must be for a existing proxy role.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" + } + ] + }, + { + "name": "Invalid status code - Update proxy role", + "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 {\"op\": \"replace\", \"path\": \"/status\", \"value\": \"invalid_status\"},\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", + "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 for a given UUID \n**When** a PATCH /Consent request is sent using the UUID \n**Then** a 404 error is returned with code 'RESOURCE_NOT_FOUND'" + }, + "response": [ + { + "name": "Invalid status code error returned", + "originalRequest": { + "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 {\"op\": \"replace\", \"path\": \"/status\", \"value\": \"invalid_status\"},\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", + "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": "aa58f9b7-2a02-45a2-9cb4-0d6fefe07a02" + } + ] + } + }, + "status": "Unprocessable Entity (WebDAV) (RFC 4918)", + "code": 422, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Fri, 28 Nov 2025 16:56:26 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "329" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "557c0652-9a38-434c-99c1-f979920055bf" + }, + { + "key": "x-amz-apigw-id", + "value": "Uw4ZOEOOLPEFggg=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-6929d43a-6c636f683c11b4ac83776aa6" + }, + { + "key": "X-Request-ID", + "value": "1a4ee8bf-0d2b-4398-950f-b3fd9332e7d3" + }, + { + "key": "X-Correlation-ID", + "value": "986fe591-c2f0-422d-9e1e-c99628e9a1df" + }, + { + "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_STATUS_CODE\",\n \"display\": \"Status code is invalid.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"Invalid status code.\",\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" + } + ] + }, + { + "name": "Invalid state transition - Update proxy role", + "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 {\"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]", + "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 for a given UUID \n**When** a PATCH /Consent request is sent using the UUID \n**Then** a 404 error is returned with code 'RESOURCE_NOT_FOUND'" + }, + "response": [ + { + "name": "Invalid status code error returned", + "originalRequest": { + "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\": \"someinvalidcode\"\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": "aa58f9b7-2a02-45a2-9cb4-0d6fefe07a02" + } + ] + } + }, + "status": "Unprocessable Entity (WebDAV) (RFC 4918)", + "code": 422, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Fri, 28 Nov 2025 16:56:26 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "329" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "557c0652-9a38-434c-99c1-f979920055bf" + }, + { + "key": "x-amz-apigw-id", + "value": "Uw4ZOEOOLPEFggg=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-6929d43a-6c636f683c11b4ac83776aa6" + }, + { + "key": "X-Request-ID", + "value": "1a4ee8bf-0d2b-4398-950f-b3fd9332e7d3" + }, + { + "key": "X-Correlation-ID", + "value": "986fe591-c2f0-422d-9e1e-c99628e9a1df" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"issue\": [\n {\n \"code\": \"invalid\",\n \"diagnostics\": \"Patch attempting invalid status change.\",\n \"details\": {\n \"coding\": [\n {\n \"code\": \"INVALID_STATE_TRANSITION\",\n \"display\": \"Status change is invalid.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" + } + ] + }, + { + "name": "Invalid path - Update proxy role", + "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\": \"/someotherpath\",\n \"value\": \"active\"\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 for a given UUID \n**When** a PATCH /Consent request with an invalid path is sent using the UUID \n**Then** a 400 error is returned with code 'INVALID_PATCH_PATH'" + }, + "response": [ + { + "name": "Invalid path error returned", + "originalRequest": { + "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\": \"/someotherpath\",\n \"value\": \"active\"\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": "aa58f9b7-2a02-45a2-9cb4-0d6fefe07a02" + } + ] + } + }, + "status": "Unprocessable Entity (WebDAV) (RFC 4918)", + "code": 422, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Fri, 28 Nov 2025 16:58:39 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "346" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "9c37f3a0-d1af-4a9d-8664-20edf45bd111" + }, + { + "key": "x-amz-apigw-id", + "value": "Uw4t7HzBrPEFTsw=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-6929d4bf-e038f4c128983e6e945b14ad" + }, + { + "key": "X-Request-ID", + "value": "3e5e943f-2647-4a09-b216-7d3551a637e7" + }, + { + "key": "X-Correlation-ID", + "value": "65dc6940-bcb3-466d-b25d-0a10ab98d7e6" + }, + { + "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_PATCH_PATH\",\n \"display\": \"Patch target is invalid.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"Patch targeting non-existent element.\",\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" + } + ] + }, + { + "name": "Missing free text for Other", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "" + ], + "type": "text/javascript", + "packages": {}, + "requests": {} + } + } + ], + "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 {\"op\": \"replace\", \"path\": \"/status\", \"value\": \"inactive\"},\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\": \"OTHER\",\n \"display\": \"Other reason\"\n }\n ]\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 for a given UUID \n**When** a PATCH /Consent request with a missing free text and status reason of 'Other' is sent using the UUID \n**Then** a 400 error is returned with code 'MISSING_FREE_TEXT_FOR_OTHER'" + }, + "response": [ + { + "name": "Missing free text error", + "originalRequest": { + "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 {\"op\": \"replace\", \"path\": \"/status\", \"value\": \"inactive\"},\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\": \"OTHER\",\n \"display\": \"Other reason\"\n }\n ]\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" + } + ] + } + }, + "status": "Unprocessable Entity (WebDAV) (RFC 4918)", + "code": 422, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Fri, 28 Nov 2025 16:58:39 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "346" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "9c37f3a0-d1af-4a9d-8664-20edf45bd111" + }, + { + "key": "x-amz-apigw-id", + "value": "Uw4t7HzBrPEFTsw=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-6929d4bf-e038f4c128983e6e945b14ad" + }, + { + "key": "X-Request-ID", + "value": "3e5e943f-2647-4a09-b216-7d3551a637e7" + }, + { + "key": "X-Correlation-ID", + "value": "65dc6940-bcb3-466d-b25d-0a10ab98d7e6" + }, + { + "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_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}" + } + ] + } + ], + "description": "## Allowed auth methods\n\n- CIS2 token - Auth with test user `656005750108`\n \n- NHS Login token - Auth with test user `9730675929`\n \n\nSee collection level documentation for info about how to get authorization tokens." + }, + { + "name": "Get verified candidate relationships (GET /RelatedPerson)", + "item": [ + { + "name": "Valid request - Get verified candidate relationships", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "" + ], + "type": "text/javascript", + "packages": {}, + "requests": {} + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/RelatedPerson?identifier=9736898121", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "RelatedPerson" + ], + "query": [ + { + "key": "identifier", + "value": "9736898121", + "description": "NHS number of the user to retrieve verified relationships for" + } + ] + }, + "description": "## Example scenario\n\n**Given** an NHS user has multiple related person relationships in PDS \n**When** a GET /RelatedPerson request is sent for the user \n**Then** the relationships are returned" + }, + "response": [ + { + "name": "Candidate relationship returned", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/RelatedPerson?identifier=9736898148", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "RelatedPerson" + ], + "query": [ + { + "key": "identifier", + "value": "9736898148", + "description": "NHS number of the user to retrieve verified relationships for" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Fri, 28 Nov 2025 17:10:29 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "927" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "3c77c3f5-2f94-4718-b4df-a994b49a9c8d" + }, + { + "key": "x-amz-apigw-id", + "value": "Uw6coGWKLPEFyvQ=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-6929d783-8368a433a0eae3395c7136cb" + }, + { + "key": "X-Request-ID", + "value": "e464b1c8-ad9b-41a2-9de3-2dd0e34d0fce" + }, + { + "key": "X-Correlation-ID", + "value": "056c8f1f-9d95-44b2-a4f7-582554f53387" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/IyKYB\",\n \"resource\": {\n \"id\": \"IyKYB\",\n \"birthDate\": \"2015-09-26\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n ],\n \"name\": [\n {\n \"family\": \"SHEPP\",\n \"given\": [\n \"Ashley\",\n \"Ellen\"\n ],\n \"period\": {\n \"start\": \"2025-08-06\"\n },\n \"prefix\": [\n \"MS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"MTH\",\n \"display\": \"mother\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n }\n ],\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson?identifier=9736898148\"\n }\n ],\n \"timestamp\": \"2025-11-28T17:10:29.231159+00:00\",\n \"total\": 1,\n \"type\": \"searchset\",\n \"resourceType\": \"Bundle\"\n}" + }, + { + "name": "Candidate relationship returned with patient details", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/RelatedPerson?identifier=9736898148&_include=RelatedPerson:patient", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "RelatedPerson" + ], + "query": [ + { + "key": "identifier", + "value": "9736898148", + "description": "NHS number of the user to retrieve verified relationships for" + }, + { + "key": "_include", + "value": "RelatedPerson:patient" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Date", + "value": "Fri, 28 Nov 2025 17:13:27 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "1395" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "a34914f5-c757-4a7c-b8e6-2061793de970" + }, + { + "key": "x-amz-apigw-id", + "value": "Uw63LFuCLPEFtfA=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-6929d82d-7210a91047b09608692e6ff6" + }, + { + "key": "X-Request-ID", + "value": "c46487fa-a7a9-4adb-82ec-dc7702fa66d4" + }, + { + "key": "X-Correlation-ID", + "value": "755116de-f4ef-406b-8088-1af14dd85c8d" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898644\",\n \"resource\": {\n \"id\": \"9736898644\",\n \"birthDate\": \"2015-09-26\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n ],\n \"name\": [\n {\n \"family\": \"SHEPP\",\n \"given\": [\n \"Ashley\",\n \"Ellen\"\n ],\n \"period\": {\n \"start\": \"2025-08-06\"\n },\n \"prefix\": [\n \"MS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/IyKYB\",\n \"resource\": {\n \"id\": \"IyKYB\",\n \"birthDate\": \"2015-09-26\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n ],\n \"name\": [\n {\n \"family\": \"SHEPP\",\n \"given\": [\n \"Ashley\",\n \"Ellen\"\n ],\n \"period\": {\n \"start\": \"2025-08-06\"\n },\n \"prefix\": [\n \"MS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"MTH\",\n \"display\": \"mother\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n }\n ],\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson?identifier=9736898148&_include=RelatedPerson%3Apatient\"\n }\n ],\n \"timestamp\": \"2025-11-28T17:13:27.630813+00:00\",\n \"total\": 1,\n \"type\": \"searchset\",\n \"resourceType\": \"Bundle\"\n}" + } + ] + }, + { + "name": "Valid request - No relationships returned - Get verified candidate relationships", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "" + ], + "type": "text/javascript", + "packages": {}, + "requests": {} + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/RelatedPerson?identifier=9736898199", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "RelatedPerson" + ], + "query": [ + { + "key": "identifier", + "value": "9736898199", + "description": "NHS number of the user to retrieve verified relationships for" + } + ] + }, + "description": "## Example scenario\n\n**Given** an NHS user has no related person relationships in PDS \n**When** a GET /RelatedPerson request is sent for the user \n**Then** no relationships are returned" + }, + "response": [ + { + "name": "No relationships returned", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/RelatedPerson?identifier=9736898199", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "RelatedPerson" + ], + "query": [ + { + "key": "identifier", + "value": "9736898199", + "description": "NHS number of the user to retrieve verified relationships for" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Fri, 28 Nov 2025 17:15:06 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "249" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "9305e61b-2b8b-4a0c-84dd-0be9c4e1ce72" + }, + { + "key": "x-amz-apigw-id", + "value": "Uw7IDHSxrPEF7gg=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-6929d899-c345d4868005c5dc5999d598" + }, + { + "key": "X-Request-ID", + "value": "189b9dd8-722e-4e1b-b76b-75d2dd05fd00" + }, + { + "key": "X-Correlation-ID", + "value": "38045e59-8b2a-4f52-a1a5-834c91c25a9f" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson?identifier=9736898199\"\n }\n ],\n \"timestamp\": \"2025-11-28T17:15:05.994606+00:00\",\n \"total\": 0,\n \"type\": \"searchset\",\n \"resourceType\": \"Bundle\"\n}" + } + ] + }, + { + "name": "Valid request - Verify relationship - Get verified candidate relationships", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "" + ], + "type": "text/javascript", + "packages": {}, + "requests": {} + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/RelatedPerson?identifier=9736898148&patient:identifier=9736898644", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "RelatedPerson" + ], + "query": [ + { + "key": "identifier", + "value": "9736898148", + "description": "NHS number of the user to retrieve verified relationships for" + }, + { + "key": "patient:identifier", + "value": "9736898644" + } + ] + }, + "description": "## Example scenario\n\n**Given** a proxy has a related person relationship in PDS \n**When** a GET /RelatedPerson request is sent for the proxy and the patient \n**Then** the relationship is returned" + }, + "response": [ + { + "name": "Verified relationship returned", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/RelatedPerson?identifier=9736898148&patient:identifier=9736898644", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "RelatedPerson" + ], + "query": [ + { + "key": "identifier", + "value": "9736898148", + "description": "NHS number of the user to retrieve verified relationships for" + }, + { + "key": "patient:identifier", + "value": "9736898644" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Fri, 28 Nov 2025 17:19:37 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "959" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "2ac409be-e9ce-4d73-a4b4-3c8a791aa51e" + }, + { + "key": "x-amz-apigw-id", + "value": "Uw7x4HIMrPEF-Fg=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-6929d9a5-d9df4059c3c602feabe873fc" + }, + { + "key": "X-Request-ID", + "value": "88367407-4953-4b64-9da0-6308c007b120" + }, + { + "key": "X-Correlation-ID", + "value": "8b55ca15-93fb-4ce9-be1b-eb0eb5e728fa" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/IyKYB\",\n \"resource\": {\n \"id\": \"IyKYB\",\n \"birthDate\": \"2015-09-26\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n ],\n \"name\": [\n {\n \"family\": \"SHEPP\",\n \"given\": [\n \"Ashley\",\n \"Ellen\"\n ],\n \"period\": {\n \"start\": \"2025-08-06\"\n },\n \"prefix\": [\n \"MS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"MTH\",\n \"display\": \"mother\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n }\n ],\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson?identifier=9736898148&patient%3Aidentifier=9736898644\"\n }\n ],\n \"timestamp\": \"2025-11-28T17:19:37.300736+00:00\",\n \"total\": 1,\n \"type\": \"searchset\",\n \"resourceType\": \"Bundle\"\n}" + }, + { + "name": "Verified relationship returned with patient details", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/RelatedPerson?identifier=9736898148&patient:identifier=9736898644&_include=RelatedPerson:patient", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "RelatedPerson" + ], + "query": [ + { + "key": "identifier", + "value": "9736898148", + "description": "NHS number of the user to retrieve verified relationships for" + }, + { + "key": "patient:identifier", + "value": "9736898644" + }, + { + "key": "_include", + "value": "RelatedPerson:patient" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Fri, 28 Nov 2025 17:19:37 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "959" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "2ac409be-e9ce-4d73-a4b4-3c8a791aa51e" + }, + { + "key": "x-amz-apigw-id", + "value": "Uw7x4HIMrPEF-Fg=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-6929d9a5-d9df4059c3c602feabe873fc" + }, + { + "key": "X-Request-ID", + "value": "88367407-4953-4b64-9da0-6308c007b120" + }, + { + "key": "X-Correlation-ID", + "value": "8b55ca15-93fb-4ce9-be1b-eb0eb5e728fa" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/IyKYB\",\n \"resource\": {\n \"id\": \"IyKYB\",\n \"birthDate\": \"2015-09-26\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n ],\n \"name\": [\n {\n \"family\": \"SHEPP\",\n \"given\": [\n \"Ashley\",\n \"Ellen\"\n ],\n \"period\": {\n \"start\": \"2025-08-06\"\n },\n \"prefix\": [\n \"MS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"MTH\",\n \"display\": \"mother\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n }\n ],\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson?identifier=9736898148&patient%3Aidentifier=9736898644\"\n }\n ],\n \"timestamp\": \"2025-11-28T17:19:37.300736+00:00\",\n \"total\": 1,\n \"type\": \"searchset\",\n \"resourceType\": \"Bundle\"\n}" + } + ] + }, + { + "name": "Missing identifier value - Get verified candidate relationships", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "" + ], + "type": "text/javascript", + "packages": {}, + "requests": {} + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/RelatedPerson", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "RelatedPerson" + ] + }, + "description": "## Example scenario\n\n**Given** a proxy has a related person relationship in PDS \n**When** a GET /RelatedPerson request is sent with no identifier \n**Then** a 400 error is returned with code 'MISSING_IDENTIFIER_VALUE'" + }, + "response": [ + { + "name": "Missing identifier value error returned", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/RelatedPerson", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "RelatedPerson" + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Fri, 28 Nov 2025 17:45:09 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "362" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "f524a29e-b0e9-45b0-af70-ad23fd87158c" + }, + { + "key": "x-amz-apigw-id", + "value": "Uw_h7GQFrPEF8xw=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-6929dfa5-ca879ed8f2a8b5c139182a8b" + }, + { + "key": "X-Request-ID", + "value": "28dbd904-517c-4e42-a3f6-37772b2da578" + }, + { + "key": "X-Correlation-ID", + "value": "e1229f7b-b14f-4858-b4fd-dcb3c9151a99" + }, + { + "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_IDENTIFIER_VALUE\",\n \"display\": \"Missing RelatedPerson NHS number.\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"The 'identifier' parameter is required\",\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" + } + ] + }, + { + "name": "Invalid identifier value - Get verified candidate relationships", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "" + ], + "type": "text/javascript", + "packages": {}, + "requests": {} + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/RelatedPerson?identifier=invalid", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "RelatedPerson" + ], + "query": [ + { + "key": "identifier", + "value": "invalid" + } + ] + }, + "description": "## Example scenario\n\n**Given** a proxy has a related person relationship in PDS \n**When** a GET /RelatedPerson request is sent with an invalid identifier \n**Then** a 400 error is returned with code 'INVALID_IDENTIFIER_VALUE'" + }, + "response": [ + { + "name": "Invalid identifier value error returned", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/RelatedPerson?identifier=invalid", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "RelatedPerson" + ], + "query": [ + { + "key": "identifier", + "value": "invalid" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Fri, 28 Nov 2025 17:47:15 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "422" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "7a627dc1-8fe7-4a07-9a17-5e8a7c77963b" + }, + { + "key": "x-amz-apigw-id", + "value": "Uw_1hFJWLPEFbKQ=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-6929e022-4dc5c06769a0b866a6456227" + }, + { + "key": "X-Request-ID", + "value": "c695d77b-b94e-4e04-9e2b-f7e34ef2e414" + }, + { + "key": "X-Correlation-ID", + "value": "46db2d38-e52b-4fcc-a8cf-2617fec4557a" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=31536000; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"issue\": [\n {\n \"code\": \"invalid\",\n \"diagnostics\": \"Not a valid NHS Number provided for the 'identifier' parameter\",\n \"expression\": [\n \"RelatedPerson.identifier\"\n ],\n \"details\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\",\n \"code\": \"INVALID_IDENTIFIER_VALUE\",\n \"display\": \"Provided value is invalid\"\n }\n ]\n },\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" + } + ] + }, + { + "name": "Invalid identifier system - Get verified candidate relationships", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "" + ], + "type": "text/javascript", + "packages": {}, + "requests": {} + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/RelatedPerson?identifier=https://fhir.nhs.uk/Id/nhs-number/invalid|730675929", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "RelatedPerson" + ], + "query": [ + { + "key": "identifier", + "value": "https://fhir.nhs.uk/Id/nhs-number/invalid|730675929" + } + ] + }, + "description": "## Example scenario\n\n**Given** a proxy has a related person relationship in PDS \n**When** a GET /RelatedPerson request is sent with an invalid identifier \n**Then** a 400 error is returned with code 'INVALID_IDENTIFIER_VALUE'" + }, + "response": [ + { + "name": "Invalid identifier value error returned", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "{{$guid}}", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "{{$guid}}", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/RelatedPerson?identifier=https://fhir.nhs.uk/Id/nhs-number/invalid|730675929", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "RelatedPerson" + ], + "query": [ + { + "key": "identifier", + "value": "https://fhir.nhs.uk/Id/nhs-number/invalid|730675929" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "Text", + "header": [ + { + "key": "Date", + "value": "Fri, 28 Nov 2025 17:48:42 GMT" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Content-Length", + "value": "352" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-amzn-RequestId", + "value": "66e70023-f78b-48aa-a29f-3df08e3e895c" + }, + { + "key": "x-amz-apigw-id", + "value": "UxADKEqiLPEFbWw=" + }, + { + "key": "X-Amzn-Trace-Id", + "value": "Root=1-6929e07a-ade89162a2d0b573830554ca" + }, + { + "key": "X-Request-ID", + "value": "a6c275c6-3964-4d18-8860-fcf25e510f14" + }, + { + "key": "X-Correlation-ID", + "value": "1d7ecfb8-29fb-461a-9904-e28216b510f8" + }, + { + "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_IDENTIFIER_SYSTEM\",\n \"display\": \"Invalid identifier system\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",\n \"version\": \"1\"\n }\n ]\n },\n \"diagnostics\": \"The identifier system is not valid.\",\n \"severity\": \"error\"\n }\n ],\n \"resourceType\": \"OperationOutcome\"\n}" + } + ] + } + ], + "description": "## Allowed auth methods\n\n- NHS Login token - Auth with test user `9730675929`\n \n- CIS2 token - Auth with test user `656005750108`\n \n\nSee collection level documentation for info about how to get authorization tokens.", + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{cis2_token}}", + "type": "string" + } + ] + }, + "event": [ + { + "listen": "prerequest", + "script": { + "type": "text/javascript", + "packages": {}, + "requests": {}, + "exec": [ + "" + ] + } + }, + { + "listen": "test", + "script": { + "type": "text/javascript", + "packages": {}, + "requests": {}, + "exec": [ + "" + ] + } + } + ] + } + ], + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{authorization_header_value}}", + "type": "string" + } + ] + }, + "event": [ + { + "listen": "prerequest", + "script": { + "type": "text/javascript", + "packages": {}, + "requests": {}, + "exec": [ + "" + ] + } + }, + { + "listen": "test", + "script": { + "type": "text/javascript", + "packages": {}, + "requests": {}, + "exec": [ + "" + ] + } + } + ], + "variable": [ + { + "key": "nps_enabled", + "value": "" + }, + { + "key": "nam_cache_enabled", + "value": "" + }, + { + "key": "nam_enabled", + "value": "" + }, + { + "key": "use_nam_mock", + "value": "" + } + ] } \ No newline at end of file diff --git a/postman/validated_relationship_service.sandbox.postman_collection.json b/postman/validated_relationship_service.sandbox.postman_collection.json index 85fa9f33..0a034e3d 100644 --- a/postman/validated_relationship_service.sandbox.postman_collection.json +++ b/postman/validated_relationship_service.sandbox.postman_collection.json @@ -1,11165 +1,10919 @@ { - "info": { - "_postman_id": "76b8235d-7f30-43d3-a767-38e1c39061cf", - "name": "Validated Relationship Service Sandbox 21/01/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": "18067099" - }, - "item": [ - { - "name": "Get a proxy access request (Questionnaire Response)", - "item": [ - { - "name": "Adult to adult with capacity", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"QuestionnaireResponse\",", - " \"status\": \"completed\",", - " \"authored\": \"2024-07-15T09:43:03.280Z\",", - " \"id\": \"156e1560-e532-4e2a-85ad-5aeff03dc43e\",", - " \"identifier\": {", - " \"value\": \"19318ZGLAB\"", - " },", - " \"source\": {", - " \"type\": \"RelatedPerson\",", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000005\"", - " }", - " },", - " \"subject\": {", - " \"type\": \"Patient\",", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000006\"", - " }", - " },", - " \"questionnaire\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Questionnaire/01dc6813-3421-4d14-948d-a4888241add1\",", - " \"item\": [", - " {", - " \"linkId\": \"relatedPerson\",", - " \"text\": \"Proxy details\",", - " \"item\": [", - " {", - " \"linkId\": \"relatedPerson_identifier\",", - " \"text\": \"NHS number\",", - " \"answer\": [", - " {", - " \"valueString\": \"9000000005\"", - " }", - " ]", - " },", - " {", - " \"linkId\": \"relatedPerson_name\",", - " \"text\": \"Name\",", - " \"item\": [", - " {", - " \"linkId\": \"relatedPerson_name_first\",", - " \"text\": \"First name\",", - " \"answer\": [", - " {", - " \"valueString\": \"Jack\"", - " }", - " ]", - " },", - " {", - " \"linkId\": \"relatedPerson_name_family\",", - " \"text\": \"Last name\",", - " \"answer\": [", - " {", - " \"valueString\": \"Jones\"", - " }", - " ]", - " }", - " ]", - " },", - " {", - " \"linkId\": \"relatedPerson_birthDate\",", - " \"text\": \"Date of birth\",", - " \"answer\": [", - " {", - " \"valueDate\": \"1970-02-15\"", - " }", - " ]", - " },", - " {", - " \"linkId\": \"relatedPerson_basisForAccess\",", - " \"text\": \"Basis for Access\",", - " \"answer\": [", - " {", - " \"valueCoding\": {", - " \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\",", - " \"code\": \"PRN\",", - " \"display\": \"Parent\"", - " }", - " }", - " ]", - " },", - " {", - " \"linkId\": \"relatedPerson_relationship\",", - " \"text\": \"Relationship\",", - " \"answer\": [", - " {", - " \"valueCoding\": {", - " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", - " \"code\": \"PRN\",", - " \"display\": \"Parent\"", - " }", - " }", - " ]", - " }", - " ]", - " },", - " {", - " \"linkId\": \"patient\",", - " \"text\": \"Patient details\",", - " \"item\": [", - " {", - " \"linkId\": \"patient_identifier\",", - " \"text\": \"NHS number\",", - " \"answer\": [", - " {", - " \"valueString\": \"9000000006\"", - " }", - " ]", - " },", - " {", - " \"linkId\": \"patient_name\",", - " \"text\": \"Name\",", - " \"item\": [", - " {", - " \"linkId\": \"patient_name_first\",", - " \"text\": \"First name\",", - " \"answer\": [", - " {", - " \"valueString\": \"Jill\"", - " }", - " ]", - " },", - " {", - " \"linkId\": \"patient_name_family\",", - " \"text\": \"Last name\",", - " \"answer\": [", - " {", - " \"valueString\": \"Jones\"", - " }", - " ]", - " }", - " ]", - " },", - " {", - " \"linkId\": \"patient_birthDate\",", - " \"text\": \"Date of birth\",", - " \"answer\": [", - " {", - " \"valueDate\": \"1965-01-01\"", - " }", - " ]", - " }", - " ]", - " },", - " {", - " \"linkId\": \"requestedAccess\",", - " \"text\": \"Requested access\",", - " \"item\": [", - " {", - " \"linkId\": \"requestedAccess_accessLevel\",", - " \"text\": \"Requested access level\",", - " \"answer\": [", - " {", - " \"valueCoding\": {", - " \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",", - " \"code\": \"APPT\",", - " \"display\": \"Appointment Booking\"", - " }", - " },", - " {", - " \"valueCoding\": {", - " \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",", - " \"code\": \"VACC\",", - " \"display\": \"Vaccination Records\"", - " }", - " }", - " ]", - " },", - " {", - " \"linkId\": \"requestedAccess_reasonsForAccess\",", - " \"text\": \"Reason for access\",", - " \"answer\": [", - " {", - " \"valueCoding\": {", - " \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-ReasonForAccess\",", - " \"code\": \"PRAC\",", - " \"display\": \"Practical Reasons\"", - " }", - " }", - " ]", - " }", - " ]", - " }", - " ]", - "};", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "d967f4c9-8e83-4930-97ab-ae4e122d8ca5", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "8717c840-c222-4f84-a880-45bc129f8382", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/QuestionnaireResponse/156e1560-e532-4e2a-85ad-5aeff03dc43e", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "QuestionnaireResponse", - "156e1560-e532-4e2a-85ad-5aeff03dc43e" - ] - }, - "description": "Example of Questionnaire Response that will be returned" - }, - "response": [] - }, - { - "name": "Missing Access Request UUID", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"issue\": [", - " {", - " \"code\": \"not-supported\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"code\": \"METHOD_NOT_ALLOWED\",", - " \"display\": \"The method is not allowed.\",", - " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", - " \"version\": \"1\"", - " }", - " ]", - " },", - " \"diagnostics\": \"The method is not allowed for the requested resource.\",", - " \"severity\": \"error\"", - " }", - " ],", - " \"resourceType\": \"OperationOutcome\"", - "};", - "", - "pm.test(\"Status code is 405\", function () {", - " pm.response.to.have.status(405);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "d967f4c9-8e83-4930-97ab-ae4e122d8ca5", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "8717c840-c222-4f84-a880-45bc129f8382", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/QuestionnaireResponse/", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "QuestionnaireResponse", - "" - ] - }, - "description": "Example of an error response when reference code is missing from request" - }, - "response": [] - }, - { - "name": "Invalid Access Request UUID", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"OperationOutcome\",", - " \"issue\": [", - " {", - " \"severity\": \"error\",", - " \"code\": \"invalid\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/STU3/CodeSystem/Spine-ErrorOrWarningCode-1\",", - " \"code\": \"INVALID_IDENTIFIER_VALUE\",", - " \"display\": \"Invalid identifier value\",", - " }", - " ]", - " },", - " \"diagnostics\": \"The specified access request ID is invalid. Access request IDs must be a valid UUID.\",", - " }", - " ],", - " };", - "", - "pm.test(\"Status code is 400\", function () {", - " pm.response.to.have.status(400);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "d967f4c9-8e83-4930-97ab-ae4e122d8ca5", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "8717c840-c222-4f84-a880-45bc129f8382", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/QuestionnaireResponse/INVALID", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "QuestionnaireResponse", - "INVALID" - ] - }, - "description": "Example of an error response when reference code is invalid" - }, - "response": [] - }, - { - "name": "Access Request UUID Not Found", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"OperationOutcome\",", - " \"issue\": [", - " {", - " \"severity\": \"error\",", - " \"code\": \"not-found\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/STU3/CodeSystem/Spine-ErrorOrWarningCode-1\",", - " \"code\": \"QUESTIONNAIRE_RESPONSE_NOT_FOUND\",", - " \"display\": \"Questionnaire response not found\"", - " }", - " ]", - " },", - " \"diagnostics\": \"The Questionnaire response could not be found using the provided access request ID.\"", - " }", - " ]", - "};", - "", - "pm.test(\"Status code is 404\", function () {", - " pm.response.to.have.status(404);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "d967f4c9-8e83-4930-97ab-ae4e122d8ca5", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "8717c840-c222-4f84-a880-45bc129f8382", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/QuestionnaireResponse/60d09b82-f4bb-41f9-b41e-767999b4ac9b", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "QuestionnaireResponse", - "60d09b82-f4bb-41f9-b41e-767999b4ac9b" - ] - }, - "description": "Example of an error response when reference code is not found in database" - }, - "response": [] - } - ], - "description": "The GET Questionnaire Response endpoint is used to retrieve a Questionnaire Response using its unique reference code. This endpoint returns the full Questionnaire Response document that was previously submitted.\n\nThis folder contains requests covering different scenarios of valid and invalid requests.\n\nFor more details, please refer to the [GET Questionnaire Response OAS page for the Validated Relationship Service on the NHS England website.](https://digital.nhs.uk/developer/api-catalogue/validated-relationship-service#get-/QuestionnaireResponse)" - }, - { - "name": "New access request (Questionnaire Response)", - "item": [ - { - "name": "Adult to child access request", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"OperationOutcome\",", - " \"issue\": [", - " {", - " \"severity\": \"information\",", - " \"code\": \"informational\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"code\": \"19318ZGLAB\",", - " \"display\": \"19318ZGLAB\"", - " }", - " ]", - " }", - " }", - " ]", - "};", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Response has the correct body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});", - "", - "pm.test(\"Location header is returned\", () => {", - " pm.response.to.have.header(\"Location\", \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/QuestionnaireResponse?ID=156e1560-e532-4e2a-85ad-5aeff03dc43e\")", - "})" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/fhir+json", - "type": "text" - }, - { - "key": "X-Request-ID", - "value": "d967f4c9-8e83-4930-97ab-ae4e122d8ca5", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "8717c840-c222-4f84-a880-45bc129f8382", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"resourceType\": \"QuestionnaireResponse\",\n \"status\": \"completed\",\n \"authored\": \"2024-07-15T09:43:03.280Z\",\n \"source\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000009\"\n }\n },\n \"subject\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000017\"\n }\n },\n \"questionnaire\": \"Questionnaire/01dc6813-3421-4d14-948d-a4888241add1\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson\",\n \"text\": \"relatedPerson\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_identifier\",\n \"text\": \"NHS Number\",\n \"answer\": [\n {\n \"valueString\": \"9000000009\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name\",\n \"text\": \"relatedPerson_name\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_name_first\",\n \"text\": \"First name.\",\n \"answer\": [\n {\n \"valueString\": \"Sharon\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name_family\",\n \"text\": \"Family name (often called Surname).\",\n \"answer\": [\n {\n \"valueString\": \"Smith\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_birthDate\",\n \"text\": \"Date of Birth\",\n \"answer\": [\n {\n \"valueDate\": \"1994-03-21\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_basisForAccess\",\n \"text\": \"Basis For Access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_relationship\",\n \"text\": \"Relationship\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails\",\n \"text\": \"parentalApplicationSupplementaryDetails\",\n \"item\": [\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_evidenceOfResponsibility\",\n \"text\": \"Evidence of parental responsibility\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-EvidenceOfResponsibility\",\n \"code\": \"BRTH\",\n \"display\": \"Birth certificate\"\n }\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_evidenceOfResponsibilityMoreinfo\",\n \"text\": \"Evidence of responsibility - Further Information\",\n \"answer\": [\n {\n \"valueString\": \"Birth Certificate is original\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_isCurrentAddressConfirmed\",\n \"text\": \"Is current address confirmed?\",\n \"answer\": [\n {\n \"valueString\": \"Yes\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_newAddress\",\n \"text\": \"parentalApplicationSupplementaryDetails_newAddress\",\n \"item\": [\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_line1\",\n \"text\": \"Address Line 1\",\n \"answer\": [\n {\n \"valueString\": \"24 Hoves Edge\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_line2\",\n \"text\": \"Address Line 2\",\n \"answer\": [\n {\n \"valueString\": \"Remington\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_line3\",\n \"text\": \"Address Line 3\",\n \"answer\": [\n {\n \"valueString\": \"Boroughbridge\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_city\",\n \"text\": \"Town / City\",\n \"answer\": [\n {\n \"valueString\": \"Leeds\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_district\",\n \"text\": \"County\",\n \"answer\": [\n {\n \"valueString\": \"West Yorkshire\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_postalCode\",\n \"text\": \"Postcode\",\n \"answer\": [\n {\n \"valueString\": \"LS1 1DW\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_liveAtSameAddress\",\n \"text\": \"Do the adult and child live at the same address?\",\n \"answer\": [\n {\n \"valueString\": \"Yes\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_canChildConsent\",\n \"text\": \"Can the child consent?\",\n \"answer\": [\n {\n \"valueString\": \"No\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_reasonNoChildConsent\",\n \"text\": \"Reason the child cannot consent\",\n \"answer\": [\n {\n \"valueString\": \"Child is too young\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient\",\n \"text\": \"patient\",\n \"item\": [\n {\n \"linkId\": \"patient_identifier\",\n \"text\": \"NHS Number\",\n \"answer\": [\n {\n \"valueString\": \"9000000017\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name\",\n \"text\": \"patient_name\",\n \"item\": [\n {\n \"linkId\": \"patient_name_first\",\n \"text\": \"First name.\",\n \"answer\": [\n {\n \"valueString\": \"Jane\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name_family\",\n \"text\": \"Family name (often called Surname).\",\n \"answer\": [\n {\n \"valueString\": \"Smith\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient_birthDate\",\n \"text\": \"Date of Birth\",\n \"answer\": [\n {\n \"valueDate\": \"2020-10-22\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess\",\n \"text\": \"requestedAccess\",\n \"item\": [\n {\n \"linkId\": \"requestedAccess_accessLevel\",\n \"text\": \"Requested access level\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"APPT\",\n \"display\": \"Appointment Booking\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccess\",\n \"text\": \"Reason for access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-ReasonForAccess\",\n \"code\": \"COMB\",\n \"display\": \"Communication Barriers\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccessMoreinfo\",\n \"text\": \"Reason for access - further information\",\n \"answer\": [\n {\n \"valueString\": \"No internet connection\"\n }\n ]\n }\n ]\n }\n ]\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/QuestionnaireResponse", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "QuestionnaireResponse" - ] - }, - "description": "Example of an adult to child access request with the reference code returned" - }, - "response": [] - }, - { - "name": "Adult to adult with ability to consent access request", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"OperationOutcome\",", - " \"issue\": [", - " {", - " \"severity\": \"information\",", - " \"code\": \"informational\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"code\": \"19318ZGLAB\",", - " \"display\": \"19318ZGLAB\"", - " }", - " ]", - " }", - " }", - " ]", - "};", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Response has the correct body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});", - "", - "pm.test(\"Location header is returned\", () => {", - " pm.response.to.have.header(\"Location\", \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/QuestionnaireResponse?ID=156e1560-e532-4e2a-85ad-5aeff03dc43e\")", - "})" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "X-Request-ID", - "value": "d967f4c9-8e83-4930-97ab-ae4e122d8ca5", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "8717c840-c222-4f84-a880-45bc129f8382", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"resourceType\": \"QuestionnaireResponse\",\n \"status\": \"completed\",\n \"authored\": \"2024-07-15T09:43:03.280Z\",\n \"source\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000009\"\n }\n },\n \"subject\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000017\"\n }\n },\n \"questionnaire\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Questionnaire/01dc6813-3421-4d14-948d-a4888241add1\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson\",\n \"text\": \"Proxy details\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_identifier\",\n \"text\": \"NHS number\",\n \"answer\": [\n {\n \"valueString\": \"9000000005\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_basisForAccess\",\n \"text\": \"Basis for Access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\",\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\"\n }\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_relationship\",\n \"text\": \"Relationship\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"SPS\",\n \"display\": \"Spouse\"\n }\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient\",\n \"text\": \"Patient details\",\n \"item\": [\n {\n \"linkId\": \"patient_identifier\",\n \"text\": \"NHS number\",\n \"answer\": [\n {\n \"valueString\": \"9000000017\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name\",\n \"text\": \"Name\",\n \"item\": [\n {\n \"linkId\": \"patient_name_first\",\n \"text\": \"First name\",\n \"answer\": [\n {\n \"valueString\": \"Jill\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name_family\",\n \"text\": \"Last name\",\n \"answer\": [\n {\n \"valueString\": \"Jones\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient_birthDate\",\n \"text\": \"Date of birth\",\n \"answer\": [\n {\n \"valueDate\": \"1965-01-01\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess\",\n \"text\": \"Requested access\",\n \"item\": [\n {\n \"linkId\": \"requestedAccess_accessLevel\",\n \"text\": \"Requested access level\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"APPT\",\n \"display\": \"Appointment Booking\"\n }\n },\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"VACC\",\n \"display\": \"Vaccination Records\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccess\",\n \"text\": \"Reason for access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-ReasonForAccess\",\n \"code\": \"PRAC\",\n \"display\": \"Practical Reasons\"\n }\n }\n ]\n }\n ]\n }\n ]\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/QuestionnaireResponse", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "QuestionnaireResponse" - ] - }, - "description": "Example of an adult to adult access request where the patient can consent with the reference code returned" - }, - "response": [] - }, - { - "name": "Duplicate relationship", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"issue\": [", - " {", - " \"code\": \"invalid\",", - " \"diagnostics\": \"Proxy role already exists.\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"code\": \"DUPLICATE_RELATIONSHIP\",", - " \"display\": \"Request must be for a new proxy role.\",", - " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", - " \"version\": \"1\"", - " }", - " ]", - " },", - " \"severity\": \"error\"", - " }", - " ],", - " \"resourceType\": \"OperationOutcome\"", - "}", - "", - "pm.test(\"Status code is 409\", function () {", - " pm.response.to.have.status(409);", - "});", - "", - "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\": \"QuestionnaireResponse\",\n \"status\": \"completed\",\n \"authored\": \"2024-07-15T09:43:03.280Z\",\n \"source\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000049\"\n }\n },\n \"subject\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000006\"\n }\n },\n \"questionnaire\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Questionnaire/01dc6813-3421-4d14-948d-a4888241add1\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson\",\n \"text\": \"Proxy details\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_identifier\",\n \"text\": \"NHS number\",\n \"answer\": [\n {\n \"valueString\": \"9000000049\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_basisForAccess\",\n \"text\": \"Basis for Access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\",\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\"\n }\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_relationship\",\n \"text\": \"Relationship\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"SPS\",\n \"display\": \"Spouse\"\n }\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient\",\n \"text\": \"Patient details\",\n \"item\": [\n {\n \"linkId\": \"patient_identifier\",\n \"text\": \"NHS number\",\n \"answer\": [\n {\n \"valueString\": \"9000000006\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name\",\n \"text\": \"Name\",\n \"item\": [\n {\n \"linkId\": \"patient_name_first\",\n \"text\": \"First name\",\n \"answer\": [\n {\n \"valueString\": \"Jill\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name_family\",\n \"text\": \"Last name\",\n \"answer\": [\n {\n \"valueString\": \"Jones\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient_birthDate\",\n \"text\": \"Date of birth\",\n \"answer\": [\n {\n \"valueDate\": \"1965-01-01\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess\",\n \"text\": \"Requested access\",\n \"item\": [\n {\n \"linkId\": \"requestedAccess_accessLevel\",\n \"text\": \"Requested access level\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"APPT\",\n \"display\": \"Appointment Booking\"\n }\n },\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"VACC\",\n \"display\": \"Vaccination Records\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccess\",\n \"text\": \"Reason for access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-ReasonForAccess\",\n \"code\": \"PRAC\",\n \"display\": \"Practical Reasons\"\n }\n }\n ]\n }\n ]\n }\n ]\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/QuestionnaireResponse", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "QuestionnaireResponse" - ] - } - }, - "response": [] - }, - { - "name": "Adult to adult without ability to consent access request", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"OperationOutcome\",", - " \"issue\": [", - " {", - " \"severity\": \"information\",", - " \"code\": \"informational\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"code\": \"19318ZGLAB\",", - " \"display\": \"19318ZGLAB\"", - " }", - " ]", - " }", - " }", - " ]", - "};", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Response has the correct body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});", - "", - "pm.test(\"Location header is returned\", () => {", - " pm.response.to.have.header(\"Location\", \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/QuestionnaireResponse?ID=156e1560-e532-4e2a-85ad-5aeff03dc43e\")", - "})" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "X-Request-ID", - "value": "d967f4c9-8e83-4930-97ab-ae4e122d8ca5", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "8717c840-c222-4f84-a880-45bc129f8382", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"resourceType\": \"QuestionnaireResponse\",\n \"status\": \"completed\",\n \"authored\": \"2024-07-15T09:43:03.280Z\",\n \"source\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000017\"\n }\n },\n \"subject\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000009\"\n }\n },\n \"questionnaire\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Questionnaire/01dc6813-3421-4d14-948d-a4888241add1\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson\",\n \"text\": \"Proxy details\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_identifier\",\n \"text\": \"NHS number\",\n \"answer\": [\n {\n \"valueString\": \"9000000017\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_basisForAccess\",\n \"text\": \"Basis for Access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/STU3/CodeSystem/RARecord-ProxyRole-1\",\n \"code\": \"002\",\n \"display\": \"Best interest decision made on behalf of the patient (Mental Capacity Act 2005)\"\n }\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_relationship\",\n \"text\": \"Relationship\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"CHILD\",\n \"display\": \"Child\"\n }\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient\",\n \"text\": \"Patient details\",\n \"item\": [\n {\n \"linkId\": \"patient_identifier\",\n \"text\": \"NHS number\",\n \"answer\": [\n {\n \"valueString\": \"9000000009\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name\",\n \"text\": \"Name\",\n \"item\": [\n {\n \"linkId\": \"patient_name_first\",\n \"text\": \"First name\",\n \"answer\": [\n {\n \"valueString\": \"Florence\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name_family\",\n \"text\": \"Last name\",\n \"answer\": [\n {\n \"valueString\": \"Smith\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient_birthDate\",\n \"text\": \"Date of birth\",\n \"answer\": [\n {\n \"valueDate\": \"1935-01-02\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess\",\n \"text\": \"Requested access\",\n \"item\": [\n {\n \"linkId\": \"requestedAccess_accessLevel\",\n \"text\": \"Requested access level\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"APPT\",\n \"display\": \"Appointment Booking\"\n }\n },\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"VACC\",\n \"display\": \"Vaccination Records\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccess\",\n \"text\": \"Reason for access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-ReasonForAccess\",\n \"code\": \"TECH\",\n \"display\": \"Technical Barriers\"\n }\n }\n ]\n }\n ]\n }\n ]\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/QuestionnaireResponse", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "QuestionnaireResponse" - ] - }, - "description": "Example of an adult to adult access request where the patient cannot consent with the reference code returned" - }, - "response": [] - }, - { - "name": "Adult nominates adult access request", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"OperationOutcome\",", - " \"issue\": [", - " {", - " \"severity\": \"information\",", - " \"code\": \"informational\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"code\": \"19318ZGLAB\",", - " \"display\": \"19318ZGLAB\"", - " }", - " ]", - " }", - " }", - " ]", - "};", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Response has the correct body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});", - "", - "pm.test(\"Location header is returned\", () => {", - " pm.response.to.have.header(\"Location\", \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/QuestionnaireResponse?ID=156e1560-e532-4e2a-85ad-5aeff03dc43e\")", - "})" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "X-Request-ID", - "value": "d967f4c9-8e83-4930-97ab-ae4e122d8ca5", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "8717c840-c222-4f84-a880-45bc129f8382", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"resourceType\": \"QuestionnaireResponse\",\n \"status\": \"completed\",\n \"authored\": \"2024-07-15T09:43:03.280Z\",\n \"source\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000009\"\n }\n },\n \"subject\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000009\"\n }\n },\n \"questionnaire\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Questionnaire/01dc6813-3421-4d14-948d-a4888241add1\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson\",\n \"text\": \"Proxy details\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_identifier\",\n \"text\": \"NHS number\",\n \"answer\": [\n {\n \"valueString\": \"9000000017\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name\",\n \"text\": \"Name\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_name_first\",\n \"text\": \"First name\",\n \"answer\": [\n {\n \"valueString\": \"Tom\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name_family\",\n \"text\": \"Last name\",\n \"answer\": [\n {\n \"valueString\": \"Jones\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_birthDate\",\n \"text\": \"Date of birth\",\n \"answer\": [\n {\n \"valueDate\": \"1970-07-12\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_basisForAccess\",\n \"text\": \"Basis for Access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\",\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\"\n }\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_relationship\",\n \"text\": \"Relationship\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"SPS\",\n \"display\": \"Spouse\"\n }\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient\",\n \"text\": \"Patient details\",\n \"item\": [\n {\n \"linkId\": \"patient_identifier\",\n \"text\": \"NHS number\",\n \"answer\": [\n {\n \"valueString\": \"9000000009\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess\",\n \"text\": \"Requested access\",\n \"item\": [\n {\n \"linkId\": \"requestedAccess_accessLevel\",\n \"text\": \"Requested access level\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"APPT\",\n \"display\": \"Appointment Booking\"\n }\n },\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"VACC\",\n \"display\": \"Vaccination Records\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccess\",\n \"text\": \"Reason for access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-ReasonForAccess\",\n \"code\": \"PRAC\",\n \"display\": \"Practical Reasons\"\n }\n }\n ]\n }\n ]\n }\n ]\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/QuestionnaireResponse", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "QuestionnaireResponse" - ] - }, - "description": "Example of an adult to adult access request where the patient is the applicant with the reference code returned" - }, - "response": [] - } - ], - "description": "The POST Questionnaire Response endpoint is used to submit a proxy access request for a given performer and patient.\n\nIt is indended to be used by user facing service e.g. Proxy Access Service, who will collect the necessary information from the user and submit it to VRS as a QuestionnaireResponse.\n\nThis folder contains requests covering different scenarios of valid and invalid requests.\n\nFor more details, please refer to the [POST Questionnaire Response OAS page for the Validated Relationship Service on the NHS England website.](https://digital.nhs.uk/developer/api-catalogue/validated-relationship-service#post-/QuestionnaireResponse)", - "event": [ - { - "listen": "prerequest", - "script": { - "type": "text/javascript", - "exec": [ - "" - ] - } - }, - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "" - ] - } - } - ] - }, - { - "name": "Get verified candidate relationship (Related Person)", - "item": [ - { - "name": "List relationship", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"entry\": [", - " {", - " \"fullUrl\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/BE974742\",", - " \"resource\": {", - " \"id\": \"BE974742\",", - " \"birthDate\": \"2017-09-23\",", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000017\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000009\"", - " }", - " },", - " \"name\": [", - " {", - " \"family\": \"MOGAJI\",", - " \"given\": [", - " \"GADIL\"", - " ],", - " \"period\": {", - " \"start\": \"2021-07-08\"", - " },", - " \"prefix\": [", - " \"MR\"", - " ],", - " \"use\": \"usual\"", - " }", - " ],", - " \"relationship\": [", - " {", - " \"coding\": [", - " {", - " \"code\": \"MTH\",", - " \"display\": \"mother\",", - " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\"", - " }", - " ]", - " }", - " ],", - " \"resourceType\": \"RelatedPerson\"", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/A3CC67E2\",", - " \"resource\": {", - " \"id\": \"A3CC67E2\",", - " \"birthDate\": \"2018-04-27\",", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000017\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000025\"", - " }", - " },", - " \"name\": [", - " {", - " \"family\": \"FEARON\",", - " \"given\": [", - " \"Daren\"", - " ],", - " \"period\": {", - " \"start\": \"2018-09-21\"", - " },", - " \"prefix\": [", - " \"MR\"", - " ],", - " \"use\": \"usual\"", - " }", - " ],", - " \"relationship\": [", - " {", - " \"coding\": [", - " {", - " \"code\": \"MTH\",", - " \"display\": \"mother\",", - " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\"", - " }", - " ]", - " }", - " ],", - " \"resourceType\": \"RelatedPerson\"", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " }", - " ],", - " \"link\": [", - " {", - " \"relation\": \"self\",", - " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson?identifier=9000000017\"", - " }", - " ],", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2024-01-01T00:00:00+00:00\",", - " \"total\": 2,", - " \"type\": \"searchset\"", - "};", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "d967f4c9-8e83-4930-97ab-ae4e122d8ca5", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "8717c840-c222-4f84-a880-45bc129f8382", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/RelatedPerson?identifier=9000000017", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "RelatedPerson" - ], - "query": [ - { - "key": "identifier", - "value": "9000000017" - } - ] - }, - "description": "Retrieves a list of validated relationships for a given NHS number." - }, - "response": [] - }, - { - "name": "List relationship and include patient's details", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"entry\": [", - " {", - " \"fullUrl\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9000000009\",", - " \"resource\": {", - " \"birthDate\": \"2017-09-23\",", - " \"id\": \"9000000009\",", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000009\"", - " }", - " ],", - " \"name\": [", - " {", - " \"family\": \"MOGAJI\",", - " \"given\": [", - " \"GADIL\"", - " ],", - " \"period\": {", - " \"start\": \"2021-07-08\"", - " },", - " \"prefix\": [", - " \"MR\"", - " ],", - " \"use\": \"usual\"", - " }", - " ],", - " \"resourceType\": \"Patient\"", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/BE974742\",", - " \"resource\": {", - " \"id\": \"BE974742\",", - " \"birthDate\": \"2017-09-23\",", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000017\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000009\"", - " }", - " },", - " \"name\": [", - " {", - " \"family\": \"MOGAJI\",", - " \"given\": [", - " \"GADIL\"", - " ],", - " \"period\": {", - " \"start\": \"2021-07-08\"", - " },", - " \"prefix\": [", - " \"MR\"", - " ],", - " \"use\": \"usual\"", - " }", - " ],", - " \"relationship\": [", - " {", - " \"coding\": [", - " {", - " \"code\": \"MTH\",", - " \"display\": \"mother\",", - " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\"", - " }", - " ]", - " }", - " ],", - " \"resourceType\": \"RelatedPerson\"", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9000000025\",", - " \"resource\": {", - " \"birthDate\": \"2018-04-27\",", - " \"id\": \"9000000025\",", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000025\"", - " }", - " ],", - " \"name\": [", - " {", - " \"family\": \"FEARON\",", - " \"given\": [", - " \"Daren\"", - " ],", - " \"period\": {", - " \"start\": \"2018-09-21\"", - " },", - " \"prefix\": [", - " \"MR\"", - " ],", - " \"use\": \"usual\"", - " }", - " ],", - " \"resourceType\": \"Patient\"", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/A3CC67E2\",", - " \"resource\": {", - " \"id\": \"A3CC67E2\",", - " \"birthDate\": \"2018-04-27\",", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000017\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000025\"", - " }", - " },", - " \"name\": [", - " {", - " \"family\": \"FEARON\",", - " \"given\": [", - " \"Daren\"", - " ],", - " \"period\": {", - " \"start\": \"2018-09-21\"", - " },", - " \"prefix\": [", - " \"MR\"", - " ],", - " \"use\": \"usual\"", - " }", - " ],", - " \"relationship\": [", - " {", - " \"coding\": [", - " {", - " \"code\": \"MTH\",", - " \"display\": \"mother\",", - " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\"", - " }", - " ]", - " }", - " ],", - " \"resourceType\": \"RelatedPerson\"", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " }", - " ],", - " \"link\": [", - " {", - " \"relation\": \"self\",", - " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson?identifier=9000000017&_include=RelatedPerson:patient\"", - " }", - " ],", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2024-01-01T00:00:00+00:00\",", - " \"total\": 2,", - " \"type\": \"searchset\"", - "};", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "d967f4c9-8e83-4930-97ab-ae4e122d8ca5", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "8717c840-c222-4f84-a880-45bc129f8382", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/RelatedPerson?identifier=9000000017&_include=RelatedPerson:patient", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "RelatedPerson" - ], - "query": [ - { - "key": "identifier", - "value": "9000000017" - }, - { - "key": "_include", - "value": "RelatedPerson:patient" - } - ] - }, - "description": "Retrieves a list of validated relationships for a given NHS number with additional patient information." - }, - "response": [] - }, - { - "name": "List Relationship and no relationships returned", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"link\": [", - " {", - " \"relation\": \"self\",", - " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships-service-api/FHIR/R4/RelatedPerson?identifier=9000000033\"", - " }", - " ],", - " \"timestamp\": \"2024-01-01T00:00:00+00:00\",", - " \"total\": 0,", - " \"type\": \"searchset\",", - " \"resourceType\": \"Bundle\"", - "};", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "d967f4c9-8e83-4930-97ab-ae4e122d8ca5", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "8717c840-c222-4f84-a880-45bc129f8382", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/RelatedPerson?identifier=9000000033", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "RelatedPerson" - ], - "query": [ - { - "key": "identifier", - "value": "9000000033" - } - ] - }, - "description": "Example of a response where the given NHS numbers do not have a relationship." - }, - "response": [] - }, - { - "name": "Verify relationship between proxy and patient", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2024-01-01T00:00:00+00:00\",", - " \"total\": 1,", - " \"type\": \"searchset\",", - " \"entry\": [", - " {", - " \"fullUrl\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/BE974742\",", - " \"resource\": {", - " \"id\": \"BE974742\",", - " \"birthDate\": \"2017-09-23\",", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000009\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000017\"", - " }", - " },", - " \"name\": [", - " {", - " \"family\": \"MOGAJI\",", - " \"given\": [", - " \"GADIL\"", - " ],", - " \"period\": {", - " \"start\": \"2021-07-08\"", - " },", - " \"prefix\": [", - " \"MR\"", - " ],", - " \"use\": \"usual\"", - " }", - " ],", - " \"relationship\": [", - " {", - " \"coding\": [", - " {", - " \"code\": \"MTH\",", - " \"display\": \"mother\",", - " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\"", - " }", - " ]", - " }", - " ],", - " \"resourceType\": \"RelatedPerson\"", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " }", - " ],", - " \"link\": [", - " {", - " \"relation\": \"self\",", - " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson?patient:identifier=9000000009&identifier=9000000017\"", - " }", - " ]", - "};", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "d967f4c9-8e83-4930-97ab-ae4e122d8ca5", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "8717c840-c222-4f84-a880-45bc129f8382", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/RelatedPerson?identifier=9000000017&patient:identifier=9000000009", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "RelatedPerson" - ], - "query": [ - { - "key": "identifier", - "value": "9000000017" - }, - { - "key": "patient:identifier", - "value": "9000000009" - } - ] - }, - "description": "Retrieves information about the relationship between the given NHS numbers" - }, - "response": [] - }, - { - "name": "Verify relationship between proxy and patient and include patient's details", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2024-01-01T00:00:00+00:00\",", - " \"total\": 1,", - " \"type\": \"searchset\",", - " \"link\": [", - " {", - " \"relation\": \"self\",", - " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson?patient:identifier=9000000009&identifier=9000000017&_include=RelatedPerson:patient\"", - " }", - " ],", - " \"entry\": [", - " {", - " \"fullUrl\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9000000009\",", - " \"resource\": {", - " \"birthDate\": \"2017-09-23\",", - " \"id\": \"9000000009\",", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000009\"", - " }", - " ],", - " \"name\": [", - " {", - " \"family\": \"MOGAJI\",", - " \"given\": [", - " \"GADIL\"", - " ],", - " \"period\": {", - " \"start\": \"2021-07-08\"", - " },", - " \"prefix\": [", - " \"MR\"", - " ],", - " \"use\": \"usual\"", - " }", - " ],", - " \"resourceType\": \"Patient\"", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/BE974742\",", - " \"resource\": {", - " \"id\": \"BE974742\",", - " \"birthDate\": \"2017-09-23\",", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000009\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000017\"", - " }", - " },", - " \"name\": [", - " {", - " \"family\": \"MOGAJI\",", - " \"given\": [", - " \"GADIL\"", - " ],", - " \"period\": {", - " \"start\": \"2021-07-08\"", - " },", - " \"prefix\": [", - " \"MR\"", - " ],", - " \"use\": \"usual\"", - " }", - " ],", - " \"relationship\": [", - " {", - " \"coding\": [", - " {", - " \"code\": \"MTH\",", - " \"display\": \"mother\",", - " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\"", - " }", - " ]", - " }", - " ],", - " \"resourceType\": \"RelatedPerson\"", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " }", - " ]", - "};", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "d967f4c9-8e83-4930-97ab-ae4e122d8ca5", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "8717c840-c222-4f84-a880-45bc129f8382", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/RelatedPerson?identifier=9000000017&patient:identifier=9000000009&_include=RelatedPerson:patient", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "RelatedPerson" - ], - "query": [ - { - "key": "identifier", - "value": "9000000017" - }, - { - "key": "patient:identifier", - "value": "9000000009" - }, - { - "key": "_include", - "value": "RelatedPerson:patient" - } - ] - }, - "description": "Retrieves information about the relationship between the given NHS numbers including the patient details" - }, - "response": [] - }, - { - "name": "Missing identifier", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"issue\": [", - " {", - " \"code\": \"invalid\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"code\": \"MISSING_IDENTIFIER_VALUE\",", - " \"display\": \"Missing RelatedPerson NHS number.\",", - " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", - " \"version\": \"1\"", - " }", - " ]", - " },", - " \"diagnostics\": \"The 'identifier' parameter is required\",", - " \"severity\": \"error\"", - " }", - " ],", - " \"resourceType\": \"OperationOutcome\"", - "};", - "", - "const responseJson = pm.response.json();", - "", - "pm.test(\"Status code is 400\", function () {", - " pm.response.to.have.status(400);", - "});", - "", - "pm.test(\"Should have correct error response\", () => {", - " pm.expect(responseJson.issue[0].details.coding[0].code).to.eql(\"MISSING_IDENTIFIER_VALUE\");", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "d967f4c9-8e83-4930-97ab-ae4e122d8ca5", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "8717c840-c222-4f84-a880-45bc129f8382", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/RelatedPerson", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "RelatedPerson" - ] - }, - "description": "Example of an error response when the NHS number is missing" - }, - "response": [] - }, - { - "name": "Invalid identifier", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "var expectedResponseBody = {", - " \"issue\": [", - " {", - " \"code\": \"invalid\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"code\": \"INVALID_IDENTIFIER_VALUE\",", - " \"display\": \"Provided value is invalid\",", - " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", - " \"version\": \"1\"", - " }", - " ]", - " },", - " \"diagnostics\": \"Not a valid NHS Number provided for the 'identifier' parameter\",", - " \"expression\": [", - " \"RelatedPerson.identifier\"", - " ],", - " \"severity\": \"error\"", - " }", - " ],", - " \"resourceType\": \"OperationOutcome\"", - "}", - "", - "const responseJson = pm.response.json();", - "", - "pm.test(\"Status code is 400\", function () {", - " pm.response.to.have.status(400);", - "});", - "", - "pm.test(\"Should have correct error response\", () => {", - " pm.expect(responseJson.issue[0].details.coding[0].code).to.eql(\"INVALID_IDENTIFIER_VALUE\");", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "d967f4c9-8e83-4930-97ab-ae4e122d8ca5", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "8717c840-c222-4f84-a880-45bc129f8382", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/RelatedPerson?identifier=900000000", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "RelatedPerson" - ], - "query": [ - { - "key": "identifier", - "value": "900000000" - } - ] - }, - "description": "Example of an error raised when the specified NHS number is not valid." - }, - "response": [] - }, - { - "name": "Invalid identifier system", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "var expectedResponseBody = {", - " \"issue\": [", - " {", - " \"code\": \"invalid\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"code\": \"INVALID_IDENTIFIER_SYSTEM\",", - " \"display\": \"Invalid identifier system.\",", - " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", - " \"version\": \"1\"", - " }", - " ]", - " },", - " \"diagnostics\": \"The identifier system is not valid.\",", - " \"severity\": \"error\"", - " }", - " ],", - " \"resourceType\": \"OperationOutcome\"", - "}", - "", - "const responseJson = pm.response.json();", - "", - "pm.test(\"Status code is 400\", function () {", - " pm.response.to.have.status(400);", - "});", - "", - "pm.test(\"Should have correct error response\", () => {", - " pm.expect(responseJson.issue[0].details.coding[0].code).to.eql(\"INVALID_IDENTIFIER_SYSTEM\");", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "d967f4c9-8e83-4930-97ab-ae4e122d8ca5", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "8717c840-c222-4f84-a880-45bc129f8382", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/RelatedPerson?identifier=https://fhir.nhs.uk/Id/nhs-number|A730675929", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "RelatedPerson" - ], - "query": [ - { - "key": "identifier", - "value": "https://fhir.nhs.uk/Id/nhs-number|A730675929" - } - ] - }, - "description": "Example of an error response when the given NHS number uses a different identifier system" - }, - "response": [] - }, - { - "name": "Identifier not supported", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"issue\": [", - " {", - " \"code\": \"processing\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"code\": \"INVALIDATED_RESOURCE\",", - " \"display\": \"Resource that has been marked as invalid was requested - invalid resources cannot be retrieved\",", - " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", - " \"version\": \"1\"", - " }", - " ]", - " },", - " \"diagnostics\": \"Resource that has been marked as invalid was requested - invalid resources cannot be retrieved\",", - " \"severity\": \"error\"", - " }", - " ],", - " \"resourceType\": \"OperationOutcome\"", - "};", - "", - "const responseJson = pm.response.json();", - "", - "pm.test(\"Status code is 404\", function () {", - " pm.response.to.have.status(404);", - "});", - "", - "pm.test(\"Should have correct error response\", () => {", - " pm.expect(responseJson.issue[0].details.coding[0].code).to.eql(\"INVALIDATED_RESOURCE\");", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "d967f4c9-8e83-4930-97ab-ae4e122d8ca5", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "8717c840-c222-4f84-a880-45bc129f8382", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/RelatedPerson?identifier=1000000001", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "RelatedPerson" - ], - "query": [ - { - "key": "identifier", - "value": "1000000001" - } - ] - }, - "description": "Example of an error response when the given NHS number is not supported by the sandbox" - }, - "response": [] - }, - { - "name": "No matching record", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"issue\": [", - " {", - " \"code\": \"processing\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"code\": \"INVALIDATED_RESOURCE\",", - " \"display\": \"Resource that has been marked as invalid was requested - invalid resources cannot be retrieved\",", - " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", - " \"version\": \"1\"", - " }", - " ]", - " },", - " \"diagnostics\": \"Resource that has been marked as invalid was requested - invalid resources cannot be retrieved\",", - " \"severity\": \"error\"", - " }", - " ],", - " \"resourceType\": \"OperationOutcome\"", - "};", - "", - "const responseJson = pm.response.json();", - "", - "pm.test(\"Status code is 404\", function () {", - " pm.response.to.have.status(404);", - "});", - "", - "pm.test(\"Should have correct error response\", () => {", - " pm.expect(responseJson.issue[0].details.coding[0].code).to.eql(\"INVALIDATED_RESOURCE\");", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "d967f4c9-8e83-4930-97ab-ae4e122d8ca5", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "8717c840-c222-4f84-a880-45bc129f8382", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/RelatedPerson?identifier=9000000041", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "RelatedPerson" - ], - "query": [ - { - "key": "identifier", - "value": "9000000041" - } - ] - }, - "description": "Example of a response where the given NHS number does not have any validated relationships." - }, - "response": [] - } - ], - "description": "The GET Related Person endpoint retrieves candidate proxy relationships for a user with a given NHS Number.\n\nThis endpoint should NOT be used to retrieve proxy relationships; these should be queried from the `/Consent` endpoint.\n\nThis folder contains requests covering different scenarios of valid and invalid requests.\n\nFor more details, please refer to the [GET Related Person OAS page for the Validated Relationship Service on the NHS England website.](https://digital.nhs.uk/developer/api-catalogue/validated-relationship-service#get-/RelatedPerson)" - }, - { - "name": "Get proxy roles (Consent)", - "item": [ - { - "name": "Filtered proxy relationships by 'active' status include details", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", - " \"total\": 2,", - " \"type\": \"searchset\",", - " \"link\": [", - " {", - " \"relation\": \"self\",", - " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000017&status=active&_include=Consent:performer&_include=Consent:patient\"", - " }", - " ],", - " \"entry\": [", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/BE974742\",", - " \"resource\": {", - " \"resourceType\": \"RelatedPerson\",", - " \"id\": \"BE974742\",", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000017\"", - " },", - " {", - " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", - " \"value\": \"ABC0000003\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000017\"", - " }", - " },", - " \"relationship\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", - " \"code\": \"PRN\",", - " \"display\": \"parent\"", - " }", - " ]", - " },", - " {", - " \"coding\": [", - " {", - " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", - " \"code\": \"MTH\",", - " \"display\": \"mother\"", - " }", - " ]", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/A3CC67E2\",", - " \"resource\": {", - " \"resourceType\": \"Patient\",", - " \"id\": \"A3CC67E2\",", - " \"meta\": {", - " \"security\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\",", - " \"code\": \"P9\",", - " \"display\": \"High level verification (P9)\"", - " }", - " ]", - " },", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000009\"", - " },", - " {", - " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", - " \"value\": \"ABC1234567\"", - " }", - " ],", - " \"name\": [", - " {", - " \"use\": \"usual\",", - " \"period\": {", - " \"start\": \"2020-01-01\",", - " \"end\": \"2021-12-31\"", - " },", - " \"given\": [", - " \"Jane Marie Anne\"", - " ],", - " \"family\": \"Smith\",", - " \"prefix\": [", - " \"Mrs\"", - " ],", - " \"suffix\": [", - " \"MBE\",", - " \"PhD\"", - " ]", - " }", - " ],", - " \"birthDate\": \"2022-10-22\",", - " \"generalPractitioner\": [", - " {", - " \"identifier\": {", - " \"value\": \"ODS12345\",", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBCC67E9\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"BBCC67E9\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"Information Access\"", - " }", - " ],", - " \"text\": \"Information Access Consent\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000009\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"performer\": [", - " {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000017\"", - " }", - " }", - " ],", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"actor\": [", - " {", - " \"reference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000017\"", - " }", - " },", - " \"role\": {", - " \"coding\": [", - " {", - " \"code\": \"parental-responsibility\",", - " \"display\": \"Parental responsibility\",", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"", - " }", - " ]", - " }", - " }", - " ],", - " \"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\"", - " }", - " ]", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/RP974720\",", - " \"resource\": {", - " \"resourceType\": \"RelatedPerson\",", - " \"id\": \"RP974720\",", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000017\"", - " },", - " {", - " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", - " \"value\": \"ABC0000003\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000005\"", - " }", - " },", - " \"relationship\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\",", - " \"code\": \"Personal\",", - " \"display\": \"Personal relationship with the patient\"", - " }", - " ]", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/DFCC67F5\",", - " \"resource\": {", - " \"resourceType\": \"Patient\",", - " \"id\": \"DFCC67F5\",", - " \"meta\": {", - " \"security\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\",", - " \"code\": \"P9\",", - " \"display\": \"High level verification (P9)\"", - " }", - " ]", - " },", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000005\"", - " },", - " {", - " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", - " \"value\": \"ABC9999999\"", - " }", - " ],", - " \"name\": [", - " {", - " \"use\": \"usual\",", - " \"period\": {", - " \"start\": \"2020-01-01\",", - " \"end\": \"2021-12-31\"", - " },", - " \"given\": [", - " \"Sally\"", - " ],", - " \"family\": \"Evans\",", - " \"prefix\": [", - " \"Mrs\"", - " ]", - " }", - " ],", - " \"birthDate\": \"1995-10-22\",", - " \"generalPractitioner\": [", - " {", - " \"identifier\": {", - " \"value\": \"ODS12345\",", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/WWCC67T1\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"WWCC67T1\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"Information Access\"", - " }", - " ],", - " \"text\": \"Information Access Consent\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000005\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"performer\": [", - " {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000017\"", - " }", - " }", - " ],", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"actor\": [", - " {", - " \"reference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000017\"", - " }", - " },", - " \"role\": {", - " \"coding\": [", - " {", - " \"code\": \"parental-responsibility\",", - " \"display\": \"Parental responsibility\",", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"", - " }", - " ]", - " }", - " }", - " ],", - " \"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\"", - " }", - " ]", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " }", - " ]", - "}", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - }, - { - "listen": "prerequest", - "script": { - "exec": [ - "" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "protocolProfileBehavior": { - "disableBodyPruning": true - }, - "request": { - "method": "GET", - "header": [], - "body": { - "mode": "raw", - "raw": "", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9000000017&status=active&_include=Consent:performer&_include=Consent:patient", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9000000017" - }, - { - "key": "status", - "value": "active" - }, - { - "key": "_include", - "value": "Consent:performer" - }, - { - "key": "_include", - "value": "Consent:patient" - } - ] - } - }, - "response": [] - }, - { - "name": "Filtered proxy relationships by 'inactive' status", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", - " \"total\": 2,", - " \"type\": \"searchset\",", - " \"link\": [", - " {", - " \"relation\": \"self\",", - " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000017&status=inactive\"", - " }", - " ],", - " \"entry\": [", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/AATD11A1\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"AATD11A1\",", - " \"status\": \"inactive\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"Information Access\"", - " }", - " ],", - " \"text\": \"Information Access Consent\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000006\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"performer\": [", - " {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000017\"", - " }", - " }", - " ],", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"actor\": [", - " {", - " \"reference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000017\"", - " }", - " },", - " \"role\": {", - " \"coding\": [", - " {", - " \"code\": \"parental-responsibility\",", - " \"display\": \"Parental responsibility\",", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"", - " }", - " ]", - " }", - " }", - " ],", - " \"period\": {", - " \"end\": \"2026-02-11\",", - " \"start\": \"2025-02-11\"", - " }", - " },", - " \"extension\": [", - " {", - " \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",", - " \"code\": \"ROLE_DEACTIVATED_END_DATE_REACHED\",", - " \"display\": \"End date reached\"", - " }", - " ]", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/ABCD12B3\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"ABCD12B3\",", - " \"status\": \"inactive\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"Information Access\"", - " }", - " ],", - " \"text\": \"Information Access Consent\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000007\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"performer\": [", - " {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000017\"", - " }", - " }", - " ],", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"actor\": [", - " {", - " \"reference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000017\"", - " }", - " },", - " \"role\": {", - " \"coding\": [", - " {", - " \"code\": \"parental-responsibility\",", - " \"display\": \"Parental responsibility\",", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"", - " }", - " ]", - " }", - " }", - " ],", - " \"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\"", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " }", - " ]", - "}", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - }, - { - "listen": "prerequest", - "script": { - "exec": [ - "" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9000000017&status=inactive", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9000000017" - }, - { - "key": "status", - "value": "inactive" - } - ] - } - }, - "response": [] - }, - { - "name": "Filtered proxy relationships by 'proposed' and 'active' status", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", - " \"total\": 4,", - " \"type\": \"searchset\",", - " \"link\": [", - " {", - " \"relation\": \"self\",", - " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000017&status=proposed&status=active&_include=Consent:patient\"", - " }", - " ],", - " \"entry\": [", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBCC67E9\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"BBCC67E9\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"Information Access\"", - " }", - " ],", - " \"text\": \"Information Access Consent\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000009\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"performer\": [", - " {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000017\"", - " }", - " }", - " ],", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"actor\": [", - " {", - " \"reference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000017\"", - " }", - " },", - " \"role\": {", - " \"coding\": [", - " {", - " \"code\": \"parental-responsibility\",", - " \"display\": \"Parental responsibility\",", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"", - " }", - " ]", - " }", - " }", - " ],", - " \"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\"", - " }", - " ]", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/WWCC67T1\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"WWCC67T1\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"Information Access\"", - " }", - " ],", - " \"text\": \"Information Access Consent\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000005\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"performer\": [", - " {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000017\"", - " }", - " }", - " ],", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"actor\": [", - " {", - " \"reference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000017\"", - " }", - " },", - " \"role\": {", - " \"coding\": [", - " {", - " \"code\": \"parental-responsibility\",", - " \"display\": \"Parental responsibility\",", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"", - " }", - " ]", - " }", - " }", - " ],", - " \"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\"", - " }", - " ]", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBGY55L2\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"BBGY55L2\",", - " \"status\": \"proposed\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"Information Access\"", - " }", - " ],", - " \"text\": \"Information Access Consent\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000020\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"performer\": [", - " {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000017\"", - " }", - " }", - " ],", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"actor\": [", - " {", - " \"reference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000017\"", - " }", - " },", - " \"role\": {", - " \"coding\": [", - " {", - " \"code\": \"parental-responsibility\",", - " \"display\": \"Parental responsibility\",", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"", - " }", - " ]", - " }", - " }", - " ],", - " \"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\": \"APPLICATION_SUBMITTED\",", - " \"display\": \"Application submitted online\"", - " }", - " ]", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/EFGH12C5\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"EFGH12C5\",", - " \"status\": \"proposed\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"Information Access\"", - " }", - " ],", - " \"text\": \"Information Access Consent\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000021\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"performer\": [", - " {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000017\"", - " }", - " }", - " ],", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"actor\": [", - " {", - " \"reference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000017\"", - " }", - " },", - " \"role\": {", - " \"coding\": [", - " {", - " \"code\": \"parental-responsibility\",", - " \"display\": \"Parental responsibility\",", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"", - " }", - " ]", - " }", - " }", - " ],", - " \"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\": \"APPLICATION_SUBMITTED\",", - " \"display\": \"Application submitted online\"", - " }", - " ]", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " }", - " ]", - "}", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9000000017&status=proposed&status=active&_include=Consent:patient", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9000000017" - }, - { - "key": "status", - "value": "proposed" - }, - { - "key": "status", - "value": "active" - }, - { - "key": "_include", - "value": "Consent:patient" - } - ] - } - }, - "response": [] - }, - { - "name": "Multiple proxy relationships", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", - " \"total\": 3,", - " \"type\": \"searchset\",", - " \"link\": [", - " {", - " \"relation\": \"self\",", - " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000022\"", - " }", - " ],", - " \"entry\": [", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBCC67E9\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"BBCC67E9\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"Information Access\"", - " }", - " ],", - " \"text\": \"Information Access Consent\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000009\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"performer\": [", - " {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000022\"", - " }", - " }", - " ],", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"actor\": [", - " {", - " \"reference\": {", - " \"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\"", - " }", - " },", - " \"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\"", - " }", - " ]", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/WWCC67T1\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"WWCC67T1\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"Information Access\"", - " }", - " ],", - " \"text\": \"Information Access Consent\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000005\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"performer\": [", - " {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000022\"", - " }", - " }", - " ],", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"actor\": [", - " {", - " \"reference\": {", - " \"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\"", - " }", - " },", - " \"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\"", - " }", - " ]", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/AATD11A1\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"AATD11A1\",", - " \"status\": \"inactive\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"Information Access\"", - " }", - " ],", - " \"text\": \"Information Access Consent\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000006\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"performer\": [", - " {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000022\"", - " }", - " }", - " ],", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"actor\": [", - " {", - " \"reference\": {", - " \"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\"", - " }", - " },", - " \"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\"", - " }", - " ]", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " }", - " ]", - "}", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9000000022", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9000000022" - } - ] - } - }, - "response": [] - }, - { - "name": "Multiple proxy relationships include patient", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", - " \"total\": 3,", - " \"type\": \"searchset\",", - " \"link\": [", - " {", - " \"relation\": \"self\",", - " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000022&_include=Consent:patient\"", - " }", - " ],", - " \"entry\": [", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/A3CC67E2\",", - " \"resource\": {", - " \"resourceType\": \"Patient\",", - " \"id\": \"A3CC67E2\",", - " \"meta\": {", - " \"security\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\",", - " \"code\": \"P9\",", - " \"display\": \"High level verification (P9)\"", - " }", - " ]", - " },", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000009\"", - " },", - " {", - " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", - " \"value\": \"ABC1234567\"", - " }", - " ],", - " \"name\": [", - " {", - " \"use\": \"usual\",", - " \"period\": {", - " \"start\": \"2020-01-01\",", - " \"end\": \"2021-12-31\"", - " },", - " \"given\": [", - " \"Jane Marie Anne\"", - " ],", - " \"family\": \"Smith\",", - " \"prefix\": [", - " \"Mrs\"", - " ],", - " \"suffix\": [", - " \"MBE\",", - " \"PhD\"", - " ]", - " }", - " ],", - " \"birthDate\": \"2022-10-22\",", - " \"generalPractitioner\": [", - " {", - " \"identifier\": {", - " \"value\": \"ODS12345\",", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBCC67E9\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"BBCC67E9\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"Information Access\"", - " }", - " ],", - " \"text\": \"Information Access Consent\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000009\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"performer\": [", - " {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000022\"", - " }", - " }", - " ],", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"actor\": [", - " {", - " \"reference\": {", - " \"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\"", - " }", - " },", - " \"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\"", - " }", - " ]", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/DFCC67F5\",", - " \"resource\": {", - " \"resourceType\": \"Patient\",", - " \"id\": \"DFCC67F5\",", - " \"meta\": {", - " \"security\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\",", - " \"code\": \"P9\",", - " \"display\": \"High level verification (P9)\"", - " }", - " ]", - " },", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000005\"", - " },", - " {", - " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", - " \"value\": \"ABC9999999\"", - " }", - " ],", - " \"name\": [", - " {", - " \"use\": \"usual\",", - " \"period\": {", - " \"start\": \"2020-01-01\",", - " \"end\": \"2021-12-31\"", - " },", - " \"given\": [", - " \"Sally\"", - " ],", - " \"family\": \"Evans\",", - " \"prefix\": [", - " \"Mrs\"", - " ]", - " }", - " ],", - " \"birthDate\": \"1995-10-22\",", - " \"generalPractitioner\": [", - " {", - " \"identifier\": {", - " \"value\": \"ODS12345\",", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/WWCC67T1\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"WWCC67T1\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"Information Access\"", - " }", - " ],", - " \"text\": \"Information Access Consent\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000005\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"performer\": [", - " {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000022\"", - " }", - " }", - " ],", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"actor\": [", - " {", - " \"reference\": {", - " \"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\"", - " }", - " },", - " \"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\"", - " }", - " ]", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/ZPTT32T3\",", - " \"resource\": {", - " \"resourceType\": \"Patient\",", - " \"id\": \"ZPTT32T3\",", - " \"meta\": {", - " \"security\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\",", - " \"code\": \"P9\",", - " \"display\": \"High level verification (P9)\"", - " }", - " ]", - " },", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000006\"", - " },", - " {", - " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", - " \"value\": \"ABC9999999\"", - " }", - " ],", - " \"name\": [", - " {", - " \"use\": \"usual\",", - " \"period\": {", - " \"start\": \"2020-01-01\",", - " \"end\": \"2021-12-31\"", - " },", - " \"given\": [", - " \"Michael\"", - " ],", - " \"family\": \"Percy\",", - " \"prefix\": [", - " \"Mr\"", - " ]", - " }", - " ],", - " \"birthDate\": \"1991-1-13\",", - " \"generalPractitioner\": [", - " {", - " \"identifier\": {", - " \"value\": \"ODS12345\",", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/AATD11A1\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"AATD11A1\",", - " \"status\": \"inactive\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"Information Access\"", - " }", - " ],", - " \"text\": \"Information Access Consent\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000006\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T1T32:28Z\",", - " \"performer\": [", - " {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000022\"", - " }", - " }", - " ],", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"actor\": [", - " {", - " \"reference\": {", - " \"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\"", - " }", - " },", - " \"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\"", - " }", - " ]", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " }", - " ]", - "}", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9000000022&_include=Consent:patient", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9000000022" - }, - { - "key": "_include", - "value": "Consent:patient" - } - ] - } - }, - "response": [] - }, - { - "name": "Multiple proxy relationships include performer", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", - " \"total\": 3,", - " \"type\": \"searchset\",", - " \"link\": [", - " {", - " \"relation\": \"self\",", - " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000022&_include=Consent:performer\"", - " }", - " ],", - " \"entry\": [", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/BE974742\",", - " \"resource\": {", - " \"resourceType\": \"RelatedPerson\",", - " \"id\": \"BE974742\",", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000022\"", - " },", - " {", - " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", - " \"value\": \"ABC0000003\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000009\"", - " }", - " },", - " \"relationship\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", - " \"code\": \"PRN\",", - " \"display\": \"parent\"", - " }", - " ]", - " },", - " {", - " \"coding\": [", - " {", - " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", - " \"code\": \"MTH\",", - " \"display\": \"mother\"", - " }", - " ]", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBCC67E9\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"BBCC67E9\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"Information Access\"", - " }", - " ],", - " \"text\": \"Information Access Consent\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000009\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"performer\": [", - " {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000022\"", - " }", - " }", - " ],", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"actor\": [", - " {", - " \"reference\": {", - " \"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\"", - " }", - " },", - " \"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\"", - " }", - " ]", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/RP974720\",", - " \"resource\": {", - " \"resourceType\": \"RelatedPerson\",", - " \"id\": \"RP974720\",", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000022\"", - " },", - " {", - " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", - " \"value\": \"ABC00000234\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000005\"", - " }", - " },", - " \"relationship\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\",", - " \"code\": \"Personal\",", - " \"display\": \"Personal relationship with the patient\"", - " }", - " ]", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/WWCC67T1\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"WWCC67T1\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"Information Access\"", - " }", - " ],", - " \"text\": \"Information Access Consent\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000005\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"performer\": [", - " {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000022\"", - " }", - " }", - " ],", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"actor\": [", - " {", - " \"reference\": {", - " \"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\"", - " }", - " },", - " \"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\"", - " }", - " ]", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/AATD11A1\",", - " \"resource\": {", - " \"resourceType\": \"RelatedPerson\",", - " \"id\": \"AATD11A1\",", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000022\"", - " },", - " {", - " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", - " \"value\": \"ABC0000001\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000006\"", - " }", - " },", - " \"relationship\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\",", - " \"code\": \"Personal\",", - " \"display\": \"Personal relationship with the patient\"", - " }", - " ]", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/AATD11A1\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"AATD11A1\",", - " \"status\": \"inactive\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"Information Access\"", - " }", - " ],", - " \"text\": \"Information Access Consent\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000006\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"performer\": [", - " {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000022\"", - " }", - " }", - " ],", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"actor\": [", - " {", - " \"reference\": {", - " \"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\"", - " }", - " },", - " \"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\"", - " }", - " ]", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " }", - " ]", - "}", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9000000022&_include=Consent:performer", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9000000022" - }, - { - "key": "_include", - "value": "Consent:performer" - } - ] - } - }, - "response": [] - }, - { - "name": "Multiple proxy relationships include performer and patient", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", - " \"total\": 3,", - " \"type\": \"searchset\",", - " \"link\": [", - " {", - " \"relation\": \"self\",", - " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000022&_include=Consent:performer&_include=Consent:patient\"", - " }", - " ],", - " \"entry\": [", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/BE974742\",", - " \"resource\": {", - " \"resourceType\": \"RelatedPerson\",", - " \"id\": \"BE974742\",", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000022\"", - " },", - " {", - " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", - " \"value\": \"ABC0000003\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000009\"", - " }", - " },", - " \"relationship\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", - " \"code\": \"PRN\",", - " \"display\": \"parent\"", - " }", - " ]", - " },", - " {", - " \"coding\": [", - " {", - " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", - " \"code\": \"MTH\",", - " \"display\": \"mother\"", - " }", - " ]", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/A3CC67E2\",", - " \"resource\": {", - " \"resourceType\": \"Patient\",", - " \"id\": \"A3CC67E2\",", - " \"meta\": {", - " \"security\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\",", - " \"code\": \"P9\",", - " \"display\": \"High level verification (P9)\"", - " }", - " ]", - " },", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000009\"", - " },", - " {", - " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", - " \"value\": \"ABC1234567\"", - " }", - " ],", - " \"name\": [", - " {", - " \"use\": \"usual\",", - " \"period\": {", - " \"start\": \"2020-01-01\",", - " \"end\": \"2021-12-31\"", - " },", - " \"given\": [", - " \"Jane Marie Anne\"", - " ],", - " \"family\": \"Smith\",", - " \"prefix\": [", - " \"Mrs\"", - " ],", - " \"suffix\": [", - " \"MBE\",", - " \"PhD\"", - " ]", - " }", - " ],", - " \"birthDate\": \"2022-10-22\",", - " \"generalPractitioner\": [", - " {", - " \"identifier\": {", - " \"value\": \"ODS12345\",", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBCC67E9\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"BBCC67E9\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"Information Access\"", - " }", - " ],", - " \"text\": \"Information Access Consent\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000009\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"performer\": [", - " {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000022\"", - " }", - " }", - " ],", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"actor\": [", - " {", - " \"reference\": {", - " \"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\"", - " }", - " },", - " \"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\"", - " }", - " ]", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/RP974720\",", - " \"resource\": {", - " \"resourceType\": \"RelatedPerson\",", - " \"id\": \"RP974720\",", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000022\"", - " },", - " {", - " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", - " \"value\": \"ABC00000234\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000005\"", - " }", - " },", - " \"relationship\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\",", - " \"code\": \"Personal\",", - " \"display\": \"Personal relationship with the patient\"", - " }", - " ]", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/DFCC67F5\",", - " \"resource\": {", - " \"resourceType\": \"Patient\",", - " \"id\": \"DFCC67F5\",", - " \"meta\": {", - " \"security\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\",", - " \"code\": \"P9\",", - " \"display\": \"High level verification (P9)\"", - " }", - " ]", - " },", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000005\"", - " },", - " {", - " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", - " \"value\": \"ABC9999999\"", - " }", - " ],", - " \"name\": [", - " {", - " \"use\": \"usual\",", - " \"period\": {", - " \"start\": \"2020-01-01\",", - " \"end\": \"2021-12-31\"", - " },", - " \"given\": [", - " \"Sally\"", - " ],", - " \"family\": \"Evans\",", - " \"prefix\": [", - " \"Mrs\"", - " ]", - " }", - " ],", - " \"birthDate\": \"1995-10-22\",", - " \"generalPractitioner\": [", - " {", - " \"identifier\": {", - " \"value\": \"ODS12345\",", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/WWCC67T1\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"WWCC67T1\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"Information Access\"", - " }", - " ],", - " \"text\": \"Information Access Consent\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000005\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"performer\": [", - " {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000022\"", - " }", - " }", - " ],", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"actor\": [", - " {", - " \"reference\": {", - " \"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\"", - " }", - " },", - " \"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\"", - " }", - " ]", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/AATD11A1\",", - " \"resource\": {", - " \"resourceType\": \"RelatedPerson\",", - " \"id\": \"AATD11A1\",", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000022\"", - " },", - " {", - " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", - " \"value\": \"ABC0000001\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000006\"", - " }", - " },", - " \"relationship\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\",", - " \"code\": \"Personal\",", - " \"display\": \"Personal relationship with the patient\"", - " }", - " ]", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/ZPTT32T3\",", - " \"resource\": {", - " \"resourceType\": \"Patient\",", - " \"id\": \"ZPTT32T3\",", - " \"meta\": {", - " \"security\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\",", - " \"code\": \"P9\",", - " \"display\": \"High level verification (P9)\"", - " }", - " ]", - " },", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000006\"", - " },", - " {", - " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", - " \"value\": \"ABC9999999\"", - " }", - " ],", - " \"name\": [", - " {", - " \"use\": \"usual\",", - " \"period\": {", - " \"start\": \"2020-01-01\",", - " \"end\": \"2021-12-31\"", - " },", - " \"given\": [", - " \"Michael\"", - " ],", - " \"family\": \"Percy\",", - " \"prefix\": [", - " \"Mr\"", - " ]", - " }", - " ],", - " \"birthDate\": \"1991-1-13\",", - " \"generalPractitioner\": [", - " {", - " \"identifier\": {", - " \"value\": \"ODS12345\",", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/AATD11A1\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"AATD11A1\",", - " \"status\": \"inactive\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"Information Access\"", - " }", - " ],", - " \"text\": \"Information Access Consent\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000006\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"performer\": [", - " {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000022\"", - " }", - " }", - " ],", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"actor\": [", - " {", - " \"reference\": {", - " \"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\"", - " }", - " },", - " \"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\"", - " }", - " ]", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " }", - " ]", - "}", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9000000022&_include=Consent:performer&_include=Consent:patient", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9000000022" - }, - { - "key": "_include", - "value": "Consent:performer" - }, - { - "key": "_include", - "value": "Consent:patient" - } - ] - } - }, - "response": [] - }, - { - "name": "Multiple proxy relationships single patient", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", - " \"total\": 3,", - " \"type\": \"searchset\",", - " \"link\": [", - " {", - " \"relation\": \"self\",", - " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?patient:identifier=9000000100\"", - " }", - " ],", - " \"entry\": [", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBCC67E9\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"BBCC67E9\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"Information Access\"", - " }", - " ],", - " \"text\": \"Information Access Consent\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000100\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"performer\": [", - " {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000020\"", - " }", - " }", - " ],", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"actor\": [", - " {", - " \"reference\": {", - " \"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\"", - " }", - " },", - " \"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\"", - " }", - " ]", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/WWCC67T1\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"WWCC67T1\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"Information Access\"", - " }", - " ],", - " \"text\": \"Information Access Consent\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000100\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"performer\": [", - " {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000021\"", - " }", - " }", - " ],", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"actor\": [", - " {", - " \"reference\": {", - " \"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\"", - " }", - " },", - " \"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\"", - " }", - " ]", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/AATD11A1\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"AATD11A1\",", - " \"status\": \"inactive\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"Information Access\"", - " }", - " ],", - " \"text\": \"Information Access Consent\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000100\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"performer\": [", - " {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000022\"", - " }", - " }", - " ],", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"actor\": [", - " {", - " \"reference\": {", - " \"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\"", - " }", - " },", - " \"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\"", - " }", - " ]", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " }", - " ]", - "}", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent?patient:identifier=9000000100", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "patient:identifier", - "value": "9000000100" - } - ] - } - }, - "response": [] - }, - { - "name": "Multiple proxy relationships single patient include performer and patient", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", - " \"total\": 3,", - " \"type\": \"searchset\",", - " \"link\": [", - " {", - " \"relation\": \"self\",", - " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?patient:identifier=9000000100&_include=Consent:performer&_include=Consent:patient\"", - " }", - " ],", - " \"entry\": [", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/A3CC67E2\",", - " \"resource\": {", - " \"resourceType\": \"Patient\",", - " \"id\": \"A3CC67E2\",", - " \"meta\": {", - " \"security\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\",", - " \"code\": \"P9\",", - " \"display\": \"High level verification (P9)\"", - " }", - " ]", - " },", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000100\"", - " },", - " {", - " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", - " \"value\": \"ABC1234567\"", - " }", - " ],", - " \"name\": [", - " {", - " \"use\": \"usual\",", - " \"period\": {", - " \"start\": \"2020-01-01\",", - " \"end\": \"2021-12-31\"", - " },", - " \"given\": [", - " \"Samantha\"", - " ],", - " \"family\": \"Adams\",", - " \"prefix\": [", - " \"Miss\"", - " ]", - " }", - " ],", - " \"birthDate\": \"1963-11-02\",", - " \"generalPractitioner\": [", - " {", - " \"identifier\": {", - " \"value\": \"ODS12345\",", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/BE974742\",", - " \"resource\": {", - " \"resourceType\": \"RelatedPerson\",", - " \"id\": \"BE974742\",", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000020\"", - " },", - " {", - " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", - " \"value\": \"ABC0000003\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000100\"", - " }", - " },", - " \"relationship\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", - " \"code\": \"PRN\",", - " \"display\": \"parent\"", - " }", - " ]", - " },", - " {", - " \"coding\": [", - " {", - " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", - " \"code\": \"MTH\",", - " \"display\": \"mother\"", - " }", - " ]", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBCC67E9\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"BBCC67E9\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"Information Access\"", - " }", - " ],", - " \"text\": \"Information Access Consent\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000100\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"performer\": [", - " {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000020\"", - " }", - " }", - " ],", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"actor\": [", - " {", - " \"reference\": {", - " \"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\"", - " }", - " },", - " \"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\"", - " }", - " ]", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/BE974742\",", - " \"resource\": {", - " \"resourceType\": \"RelatedPerson\",", - " \"id\": \"BE974742\",", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000021\"", - " },", - " {", - " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", - " \"value\": \"ABC0000003\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000100\"", - " }", - " },", - " \"relationship\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", - " \"code\": \"Personal\",", - " \"display\": \"Personal relationship with the patient\"", - " }", - " ]", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/WWCC67T1\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"WWCC67T1\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"Information Access\"", - " }", - " ],", - " \"text\": \"Information Access Consent\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000100\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"performer\": [", - " {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000021\"", - " }", - " }", - " ],", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"actor\": [", - " {", - " \"reference\": {", - " \"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\"", - " }", - " },", - " \"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\"", - " }", - " ]", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/BE974742\",", - " \"resource\": {", - " \"resourceType\": \"RelatedPerson\",", - " \"id\": \"BE974742\",", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000022\"", - " },", - " {", - " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", - " \"value\": \"ABC0000003\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000100\"", - " }", - " },", - " \"relationship\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", - " \"code\": \"Personal\",", - " \"display\": \"Personal relationship with the patient\"", - " }", - " ]", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/AATD11A1\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"AATD11A1\",", - " \"status\": \"inactive\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"Information Access\"", - " }", - " ],", - " \"text\": \"Information Access Consent\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000100\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"performer\": [", - " {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000022\"", - " }", - " }", - " ],", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"actor\": [", - " {", - " \"reference\": {", - " \"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\"", - " }", - " },", - " \"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\"", - " }", - " ]", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " }", - " ]", - "}", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent?patient:identifier=9000000100&_include=Consent:performer&_include=Consent:patient", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "patient:identifier", - "value": "9000000100" - }, - { - "key": "_include", - "value": "Consent:performer" - }, - { - "key": "_include", - "value": "Consent:patient" - } - ] - } - }, - "response": [] - }, - { - "name": "Multiple proxy relationships single patient include performer", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", - " \"total\": 3,", - " \"type\": \"searchset\",", - " \"link\": [", - " {", - " \"relation\": \"self\",", - " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?patient:identifier=9000000100&_include=Consent:performer\"", - " }", - " ],", - " \"entry\": [", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/BE974742\",", - " \"resource\": {", - " \"resourceType\": \"RelatedPerson\",", - " \"id\": \"BE974742\",", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000020\"", - " },", - " {", - " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", - " \"value\": \"ABC0000003\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000100\"", - " }", - " },", - " \"relationship\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", - " \"code\": \"PRN\",", - " \"display\": \"parent\"", - " }", - " ]", - " },", - " {", - " \"coding\": [", - " {", - " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", - " \"code\": \"MTH\",", - " \"display\": \"mother\"", - " }", - " ]", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBCC67E9\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"BBCC67E9\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"Information Access\"", - " }", - " ],", - " \"text\": \"Information Access Consent\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000100\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"performer\": [", - " {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000020\"", - " }", - " }", - " ],", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"actor\": [", - " {", - " \"reference\": {", - " \"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\"", - " }", - " },", - " \"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\"", - " }", - " ]", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/BE974742\",", - " \"resource\": {", - " \"resourceType\": \"RelatedPerson\",", - " \"id\": \"BE974742\",", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000021\"", - " },", - " {", - " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", - " \"value\": \"ABC0000003\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000100\"", - " }", - " },", - " \"relationship\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", - " \"code\": \"Personal\",", - " \"display\": \"Personal relationship with the patient\"", - " }", - " ]", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/WWCC67T1\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"WWCC67T1\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"Information Access\"", - " }", - " ],", - " \"text\": \"Information Access Consent\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000100\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"performer\": [", - " {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000021\"", - " }", - " }", - " ],", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"actor\": [", - " {", - " \"reference\": {", - " \"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\"", - " }", - " },", - " \"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\"", - " }", - " ]", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/BE974742\",", - " \"resource\": {", - " \"resourceType\": \"RelatedPerson\",", - " \"id\": \"BE974742\",", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000022\"", - " },", - " {", - " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", - " \"value\": \"ABC0000003\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000100\"", - " }", - " },", - " \"relationship\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", - " \"code\": \"Personal\",", - " \"display\": \"Personal relationship with the patient\"", - " }", - " ]", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/AATD11A1\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"AATD11A1\",", - " \"status\": \"inactive\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"Information Access\"", - " }", - " ],", - " \"text\": \"Information Access Consent\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000100\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"performer\": [", - " {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000022\"", - " }", - " }", - " ],", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"actor\": [", - " {", - " \"reference\": {", - " \"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\"", - " }", - " },", - " \"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\"", - " }", - " ]", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " }", - " ]", - "}", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent?patient:identifier=9000000100&_include=Consent:performer", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "patient:identifier", - "value": "9000000100" - }, - { - "key": "_include", - "value": "Consent:performer" - } - ] - } - }, - "response": [] - }, - { - "name": "Multiple proxy relationships single patient include patient", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", - " \"total\": 3,", - " \"type\": \"searchset\",", - " \"link\": [", - " {", - " \"relation\": \"self\",", - " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?patient:identifier=9000000100&_include=Consent:patient\"", - " }", - " ],", - " \"entry\": [", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/A3CC67E2\",", - " \"resource\": {", - " \"resourceType\": \"Patient\",", - " \"id\": \"A3CC67E2\",", - " \"meta\": {", - " \"security\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\",", - " \"code\": \"P9\",", - " \"display\": \"High level verification (P9)\"", - " }", - " ]", - " },", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000100\"", - " },", - " {", - " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", - " \"value\": \"ABC1234567\"", - " }", - " ],", - " \"name\": [", - " {", - " \"use\": \"usual\",", - " \"period\": {", - " \"start\": \"2020-01-01\",", - " \"end\": \"2021-12-31\"", - " },", - " \"given\": [", - " \"Samantha\"", - " ],", - " \"family\": \"Adams\",", - " \"prefix\": [", - " \"Miss\"", - " ]", - " }", - " ],", - " \"birthDate\": \"1963-11-02\",", - " \"generalPractitioner\": [", - " {", - " \"identifier\": {", - " \"value\": \"ODS12345\",", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBCC67E9\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"BBCC67E9\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"Information Access\"", - " }", - " ],", - " \"text\": \"Information Access Consent\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000100\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"performer\": [", - " {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000020\"", - " }", - " }", - " ],", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"actor\": [", - " {", - " \"reference\": {", - " \"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\"", - " }", - " },", - " \"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\"", - " }", - " ]", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/WWCC67T1\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"WWCC67T1\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"Information Access\"", - " }", - " ],", - " \"text\": \"Information Access Consent\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000100\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"performer\": [", - " {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000021\"", - " }", - " }", - " ],", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"actor\": [", - " {", - " \"reference\": {", - " \"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\"", - " }", - " },", - " \"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\"", - " }", - " ]", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/AATD11A1\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"AATD11A1\",", - " \"status\": \"inactive\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"Information Access\"", - " }", - " ],", - " \"text\": \"Information Access Consent\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000100\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"performer\": [", - " {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000022\"", - " }", - " }", - " ],", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"actor\": [", - " {", - " \"reference\": {", - " \"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\"", - " }", - " },", - " \"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\"", - " }", - " ]", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " }", - " ]", - "}", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent?patient:identifier=9000000100&_include=Consent:patient", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "patient:identifier", - "value": "9000000100" - }, - { - "key": "_include", - "value": "Consent:patient" - } - ] - } - }, - "response": [] - }, - { - "name": "No relationships", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", - " \"total\": 0,", - " \"type\": \"searchset\",", - " \"link\": [", - " {", - " \"relation\": \"self\",", - " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000025&_include=Consent:performer&_include=Consent:patient\"", - " }", - " ],", - " \"entry\": []", - "}", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9000000025", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9000000025" - } - ] - } - }, - "response": [] - }, - { - "name": "Single consenting adult proxy relationship", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", - " \"total\": 1,", - " \"type\": \"searchset\",", - " \"link\": [", - " {", - " \"relation\": \"self\",", - " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000010\"", - " }", - " ],", - " \"entry\": [", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/WWCC67T1\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"WWCC67T1\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"Information Access\"", - " }", - " ],", - " \"text\": \"Information Access Consent\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000005\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"performer\": [", - " {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000010\"", - " }", - " }", - " ],", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"actor\": [", - " {", - " \"reference\": {", - " \"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\"", - " }", - " },", - " \"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\"", - " }", - " ]", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " }", - " ]", - "}", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9000000010", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9000000010" - } - ] - } - }, - "response": [] - }, - { - "name": "Single consenting adult proxy relationship include performer and patient", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", - " \"total\": 1,", - " \"type\": \"searchset\",", - " \"link\": [", - " {", - " \"relation\": \"self\",", - " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000010&_include=Consent:performer&_include=Consent:patient\"", - " }", - " ],", - " \"entry\": [", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/RP974720\",", - " \"resource\": {", - " \"resourceType\": \"RelatedPerson\",", - " \"id\": \"RP974720\",", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000010\"", - " },", - " {", - " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", - " \"value\": \"ABC0000008\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000005\"", - " }", - " },", - " \"relationship\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\",", - " \"code\": \"Personal\",", - " \"display\": \"Personal relationship with the patient\"", - " }", - " ]", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/DFCC67F5\",", - " \"resource\": {", - " \"resourceType\": \"Patient\",", - " \"id\": \"DFCC67F5\",", - " \"meta\": {", - " \"security\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\",", - " \"code\": \"P9\",", - " \"display\": \"High level verification (P9)\"", - " }", - " ]", - " },", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000005\"", - " },", - " {", - " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", - " \"value\": \"ABC1234567\"", - " }", - " ],", - " \"name\": [", - " {", - " \"use\": \"usual\",", - " \"period\": {", - " \"start\": \"2020-01-01\",", - " \"end\": \"2021-12-31\"", - " },", - " \"given\": [", - " \"Sally\"", - " ],", - " \"family\": \"Evans\",", - " \"prefix\": [", - " \"Mrs\"", - " ]", - " }", - " ],", - " \"birthDate\": \"1995-10-22\",", - " \"generalPractitioner\": [", - " {", - " \"identifier\": {", - " \"value\": \"ODS12345\",", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/WWCC67T1\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"WWCC67T1\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"Information Access\"", - " }", - " ],", - " \"text\": \"Information Access Consent\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000005\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"performer\": [", - " {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000010\"", - " }", - " }", - " ],", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"actor\": [", - " {", - " \"reference\": {", - " \"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\": \"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\"", - " }", - " ]", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " }", - " ]", - "}", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9000000010&_include=Consent:performer&_include=Consent:patient", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9000000010" - }, - { - "key": "_include", - "value": "Consent:performer" - }, - { - "key": "_include", - "value": "Consent:patient" - } - ] - } - }, - "response": [] - }, - { - "name": "Single mother-child relationship", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", - " \"total\": 1,", - " \"type\": \"searchset\",", - " \"link\": [", - " {", - " \"relation\": \"self\",", - " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000019\"", - " }", - " ],", - " \"entry\": [", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBCC67E9\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"BBCC67E9\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"Information Access\"", - " }", - " ],", - " \"text\": \"Information Access Consent\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000009\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"performer\": [", - " {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000019\"", - " }", - " }", - " ],", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"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\"", - " }", - " ]", - " }", - " }", - " ],", - " \"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\"", - " }", - " ]", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " }", - " ]", - "}", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9000000019", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9000000019" - } - ] - } - }, - "response": [] - }, - { - "name": "Single mother-child relationship include performer and patient", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", - " \"total\": 1,", - " \"type\": \"searchset\",", - " \"link\": [", - " {", - " \"relation\": \"self\",", - " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000019&_include=Consent:performer&_include=Consent:patient\"", - " }", - " ],", - " \"entry\": [", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/BE974742\",", - " \"resource\": {", - " \"resourceType\": \"RelatedPerson\",", - " \"id\": \"BE974742\",", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000019\"", - " },", - " {", - " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", - " \"value\": \"ABC0000001\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000009\"", - " }", - " },", - " \"relationship\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", - " \"code\": \"PRN\",", - " \"display\": \"parent\"", - " }", - " ]", - " },", - " {", - " \"coding\": [", - " {", - " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", - " \"code\": \"MTH\",", - " \"display\": \"mother\"", - " }", - " ]", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/A3CC67E2\",", - " \"resource\": {", - " \"resourceType\": \"Patient\",", - " \"id\": \"A3CC67E2\",", - " \"meta\": {", - " \"security\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\",", - " \"code\": \"P9\",", - " \"display\": \"High level verification (P9)\"", - " }", - " ]", - " },", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000009\"", - " },", - " {", - " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", - " \"value\": \"ABC1234556\"", - " }", - " ],", - " \"name\": [", - " {", - " \"use\": \"usual\",", - " \"period\": {", - " \"start\": \"2020-01-01\",", - " \"end\": \"2021-12-31\"", - " },", - " \"given\": [", - " \"Jane Marie Anne\"", - " ],", - " \"family\": \"Smith\",", - " \"prefix\": [", - " \"Mrs\"", - " ],", - " \"suffix\": [", - " \"MBE\",", - " \"PhD\"", - " ]", - " }", - " ],", - " \"birthDate\": \"2022-10-22\",", - " \"generalPractitioner\": [", - " {", - " \"identifier\": {", - " \"value\": \"ODS12345\",", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBCC67E9\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"BBCC67E9\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"Information Access\"", - " }", - " ],", - " \"text\": \"Information Access Consent\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000009\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"performer\": [", - " {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000019\"", - " }", - " }", - " ],", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"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\"", - " }", - " ]", - " }", - " }", - " ],", - " \"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\"", - " }", - " ]", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " }", - " ]", - "}", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9000000019&_include=Consent:performer&_include=Consent:patient", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9000000019" - }, - { - "key": "_include", - "value": "Consent:performer" - }, - { - "key": "_include", - "value": "Consent:patient" - } - ] - } - }, - "response": [] - }, - { - "name": "Invalid status parameter", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"OperationOutcome\",", - " \"issue\": [", - " {", - " \"code\": \"invalid\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", - " \"version\": \"1\",", - " \"code\": \"INVALID_PARAMETER\",", - " \"display\": \"Required parameter(s) are invalid.\"", - " }", - " ]", - " },", - " \"diagnostics\": \"Invalid request with error - status parameter is invalid.\",", - " \"severity\": \"error\"", - " }", - " ]", - "}", - "", - "const responseJson = pm.response.json();", - "", - "pm.test(\"Status code is 422\", function () {", - " pm.response.to.have.status(422);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9000000017&status=test", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9000000017" - }, - { - "key": "status", - "value": "test" - } - ] - } - }, - "response": [] - }, - { - "name": "Invalid include parameter", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"OperationOutcome\",", - " \"issue\": [", - " {", - " \"code\": \"invalid\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", - " \"version\": \"1\",", - " \"code\": \"INVALID_PARAMETER\",", - " \"display\": \"Required parameter(s) are invalid.\"", - " }", - " ]", - " },", - " \"diagnostics\": \"Invalid request with error - _include parameter is invalid.\",", - " \"severity\": \"error\"", - " }", - " ]", - "}", - "", - "const responseJson = pm.response.json();", - "", - "pm.test(\"Status code is 422\", function () {", - " pm.response.to.have.status(422);", - "});", - "", - "pm.test(\"Should have correct error response\", () => {", - " pm.expect(responseJson.issue[0].details.coding[0].code).to.eql(\"INVALID_PARAMETER\");", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9000000019&_include=test", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9000000019" - }, - { - "key": "_include", - "value": "test" - } - ] - } - }, - "response": [] - }, - { - "name": "Single mother-child relationship unknown legal basis", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", - " \"total\": 1,", - " \"type\": \"searchset\",", - " \"link\": [", - " {", - " \"relation\": \"self\",", - " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000111\"", - " }", - " ],", - " \"entry\": [", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/AF974742\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"AF974742\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"Information Access\"", - " }", - " ],", - " \"text\": \"Information Access Consent\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000119\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"performer\": [", - " {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000111\"", - " }", - " }", - " ],", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\",", - " \"code\": \"unknown\",", - " \"display\": \"Unknown legal basis\"", - " }", - " ],", - " \"provision\": {", - " \"actor\": [", - " {", - " \"reference\": {", - " \"identifier\": {", - " \"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\"", - " }", - " },", - " \"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\"", - " }", - " ]", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " }", - " ]", - "}", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9000000111", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9000000111" - } - ] - } - }, - "response": [] - }, - { - "name": "No performer record found", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"OperationOutcome\",", - " \"issue\": [", - " { ", - " \"code\": \"processing\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", - " \"version\": \"1\",", - " \"code\": \"INVALIDATED_RESOURCE\",", - " \"display\": \"Resource that has been marked as invalid was requested - invalid resources cannot be retrieved\"", - " }", - " ]", - " },", - " \"diagnostics\": \"Resource that has been marked as invalid was requested - invalid resources cannot be retrieved\",", - " \"severity\": \"error\",", - " ", - " }", - " ]", - "}", - "", - "const responseJson = pm.response.json();", - "", - "pm.test(\"Status code is 404\", function () {", - " pm.response.to.have.status(404);", - "});", - "", - "pm.test(\"Should have correct error response\", () => {", - " pm.expect(responseJson.issue[0].details.coding[0].code).to.eql(\"INVALIDATED_RESOURCE\");", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9000000999", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9000000999" - } - ] - } - }, - "response": [] - }, - { - "name": "Invalid performer identifier", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"issue\": [", - " {", - " \"code\": \"invalid\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"code\": \"INVALID_IDENTIFIER_VALUE\",", - " \"display\": \"Required parameter(s) are invalid.\",", - " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", - " \"version\": \"1\"", - " }", - " ]", - " },", - " \"diagnostics\": \"Invalid request with error - performer:identifier or patient:identifier parameter is invalid.\",", - " \"severity\": \"error\"", - " }", - " ],", - " \"resourceType\": \"OperationOutcome\"", - "}", - "", - "const responseJson = pm.response.json();", - "", - "pm.test(\"Status code is 422\", function () {", - " pm.response.to.have.status(422);", - "});", - "", - "pm.test(\"Should have correct error response\", () => {", - " pm.expect(responseJson.issue[0].details.coding[0].code).to.eql(\"INVALID_IDENTIFIER_VALUE\");", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=90000009990", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "90000009990" - } - ] - } - }, - "response": [] - }, - { - "name": "Invalid performer identifier system", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"issue\": [", - " {", - " \"code\": \"invalid\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"code\": \"INVALID_IDENTIFIER_SYSTEM\",", - " \"display\": \"Required parameter(s) are invalid.\",", - " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", - " \"version\": \"1\"", - " }", - " ]", - " },", - " \"diagnostics\": \"Invalid request with error - performer:identifier or patient:identifier system parameter is invalid.\",", - " \"severity\": \"error\"", - " }", - " ],", - " \"resourceType\": \"OperationOutcome\"", - "}", - "", - "const responseJson = pm.response.json();", - "", - "pm.test(\"Status code is 422\", function () {", - " pm.response.to.have.status(422);", - "});", - "", - "pm.test(\"Should have correct error response\", () => {", - " pm.expect(responseJson.issue[0].details.coding[0].code).to.eql(\"INVALID_IDENTIFIER_SYSTEM\");", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=https://fhir.nhs.uk/Id/nhs-number|1234567890", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "https://fhir.nhs.uk/Id/nhs-number|1234567890" - } - ] - } - }, - "response": [] - }, - { - "name": "Missing performer identifier value", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"issue\": [", - " {", - " \"code\": \"invalid\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"code\": \"MISSING_IDENTIFIER_VALUE\",", - " \"display\": \"Required parameter(s) are missing.\",", - " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", - " \"version\": \"1\"", - " }", - " ]", - " },", - " \"diagnostics\": \"Invalid request with error - performer:identifier or patient:identifier parameter not found.\",", - " \"severity\": \"error\"", - " }", - " ],", - " \"resourceType\": \"OperationOutcome\"", - "}", - "", - "const responseJson = pm.response.json();", - "", - "pm.test(\"Status code is 400\", function () {", - " pm.response.to.have.status(400);", - "});", - "", - "pm.test(\"Should have correct error response\", () => {", - " pm.expect(responseJson.issue[0].details.coding[0].code).to.eql(\"MISSING_IDENTIFIER_VALUE\");", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ] - } - }, - "response": [] - }, - { - "name": "GP Practice not found", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"issue\": [", - " {", - " \"code\": \"processing\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", - " \"version\": \"1\",", - " \"code\": \"GP_PRACTICE_NOT_FOUND\",", - " \"display\": \"GP Practice could not be found - invalid resources cannot be retrieved\"", - " }", - " ]", - " },", - " \"diagnostics\": \"GP Practice could not be found\",", - " \"severity\": \"error\"", - " }", - " ],", - " \"resourceType\": \"OperationOutcome\"", - "}", - "", - "const responseJson = pm.response.json();", - "", - "pm.test(\"Status code is 404\", function () {", - " pm.response.to.have.status(404);", - "});", - "", - "pm.test(\"Should have correct error response\", () => {", - " pm.expect(responseJson.issue[0].details.coding[0].code).to.eql(\"GP_PRACTICE_NOT_FOUND\");", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9000000012", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9000000012" - } - ] - } - }, - "response": [] - } - ], - "description": "The GET /Consent is for retrieving confirmed proxy relationships via the Validated Relationship Service.\n\nThis folder contains requests covering different scenarios for users with different types of proxy relationship. Also includes error scenarios.\n\nFor more details, please refer to the [GET Consent OAS page for the Validated Relationship Service on the NHS England website.](https://digital.nhs.uk/developer/api-catalogue/validated-relationship-service#get-/Consent)" - }, - { - "name": "Create a proxy role (Consent)", - "item": [ - { - "name": "Parent-child proxy creation", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"OperationOutcome\",", - " \"issue\": [", - " {", - " \"severity\": \"information\",", - " \"code\": \"informational\"", - " }", - " ]", - "}", - "", - "pm.test(\"Status code is 201\", function () {", - " pm.response.to.have.status(201);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " var responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});", - "", - "pm.test(\"Location header is returned\", () => {", - " pm.response.to.have.header(\"Location\", \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/90b9863e-e33c-4895-a333-fd0ea0e23205\")", - "})" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "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\": \"9000000012\"\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\": \"9000000009\"\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\": \"9000000009\"\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" - } - } - }, - "url": { - "raw": "{{api_base_url}}/Consent", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ] - } - }, - "response": [] - }, - { - "name": "Adult-adult proxy creation", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"OperationOutcome\",", - " \"issue\": [", - " {", - " \"severity\": \"information\",", - " \"code\": \"informational\"", - " }", - " ]", - "}", - "", - "pm.test(\"Status code is 201\", function () {", - " pm.response.to.have.status(201);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " var responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});", - "", - "pm.test(\"Location header is returned\", () => {", - " pm.response.to.have.header(\"Location\", \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/90b9863e-e33c-4895-a333-fd0ea0e23205\")", - "})" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "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\": \"9000000012\"\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\": \"9000000017\"\n }\n }\n ],\n \"provision\": {\n \"type\": \"permit\",\n \"period\": {\n \"start\": \"2025-02-11\"\n },\n \"actor\": [\n {\n \"role\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"GUARD\",\n \"display\": \"Guardian\"\n }\n ]\n },\n \"reference\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000017\"\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" - } - } - }, - "url": { - "raw": "{{api_base_url}}/Consent", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ] - } - }, - "response": [] - }, - { - "name": "Invalid performer NHS number", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"issue\": [", - " {", - " \"code\": \"invalid\",", - " \"diagnostics\": \"Not a valid NHS Number provided for the Performer identifier parameter\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", - " \"version\": \"1\",", - " \"code\": \"INVALID_IDENTIFIER\",", - " \"display\": \"Provided value is invalid\"", - " }", - " ]", - " },", - " \"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": {}, - "requests": {} - } - } - ], - "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\": \"9000000012\"\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\": \"9000000000\"\n }\n }\n ],\n \"provision\": {\n \"type\":\"permit\",\n \"period\": {\n \"start\": \"2025-02-11\"\n },\n \"actor\": [\n {\n \"role\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"GUARD\",\n \"display\": \"Guardian\"\n }\n ]\n },\n \"reference\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000000\"\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" - } - } - }, - "url": { - "raw": "{{api_base_url}}/Consent", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ] - } - }, - "response": [] - }, - { - "name": "Duplicate relationship", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"issue\": [", - " {", - " \"code\": \"invalid\",", - " \"diagnostics\": \"Proxy role already exists.\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"code\": \"DUPLICATE_RELATIONSHIP\",", - " \"display\": \"Request must be for a new proxy role.\",", - " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", - " \"version\": \"1\"", - " }", - " ]", - " },", - " \"severity\": \"error\"", - " }", - " ],", - " \"resourceType\": \"OperationOutcome\"", - "}", - "", - "pm.test(\"Status code is 409\", function () {", - " pm.response.to.have.status(409);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " var responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});", - "" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "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\": \"9000000000\"\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\": \"9000000049\"\n }\n }\n ],\n \"provision\": {\n \"type\": \"permit\",\n \"period\": {\n \"start\": \"2025-02-11\"\n },\n \"actor\": [\n {\n \"role\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"GUARD\",\n \"display\": \"Guardian\"\n }\n ]\n },\n \"reference\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000049\"\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" - } - } - }, - "url": { - "raw": "{{api_base_url}}/Consent", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ] - } - }, - "response": [] - } - ], - "description": "The POST /Consent is for storing confirmed proxy relationships via the Validated Relationships Service.\n\nThis folder contains requests covering different scenarios for users with different types of proxy relationship. Also includes error scenarios.\n\nFor more details, please refer to the [POST Consent OAS page for the Validated Relationship Service on the NHS England website.](https://digital.nhs.uk/developer/api-catalogue/validated-relationship-service#post-/Consent)" - }, - { - "name": "Get proxy role (Consent)", - "item": [ - { - "name": "Retrieve consenting adult relationship", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", - " \"total\": 1,", - " \"type\": \"searchset\",", - " \"link\": [", - " {", - " \"relation\": \"self\",", - " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000010\"", - " }", - " ],", - " \"entry\": [", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/WWCC67T1\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"WWCC67T1\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"Information Access\"", - " }", - " ],", - " \"text\": \"Information Access Consent\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000005\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"performer\": [", - " {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000010\"", - " }", - " }", - " ],", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"actor\": [", - " {", - " \"reference\": {", - " \"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\"", - " }", - " },", - " \"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\"", - " }", - " ]", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " }", - " ]", - "}", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent/74eed847-ca25-4e76-8cf2-f2c2d7842a7a", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - "74eed847-ca25-4e76-8cf2-f2c2d7842a7a" - ] - } - }, - "response": [] - }, - { - "name": "Retrieve consenting adult relationship with patient details", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", - " \"total\": 1,", - " \"type\": \"searchset\",", - " \"link\": [", - " {", - " \"relation\": \"self\",", - " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000010&_include=Consent:patient\"", - " }", - " ],", - " \"entry\": [", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/DFCC67F5\",", - " \"resource\": {", - " \"resourceType\": \"Patient\",", - " \"id\": \"DFCC67F5\",", - " \"meta\": {", - " \"security\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\",", - " \"code\": \"P9\",", - " \"display\": \"High level verification (P9)\"", - " }", - " ]", - " },", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000005\"", - " },", - " {", - " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", - " \"value\": \"ABC1234567\"", - " }", - " ],", - " \"name\": [", - " {", - " \"use\": \"usual\",", - " \"period\": {", - " \"start\": \"2020-01-01\",", - " \"end\": \"2021-12-31\"", - " },", - " \"given\": [", - " \"Sally\"", - " ],", - " \"family\": \"Evans\",", - " \"prefix\": [", - " \"Mrs\"", - " ]", - " }", - " ],", - " \"birthDate\": \"1995-10-22\",", - " \"generalPractitioner\": [", - " {", - " \"identifier\": {", - " \"value\": \"ODS12345\",", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/WWCC67T1\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"WWCC67T1\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"Information Access\"", - " }", - " ],", - " \"text\": \"Information Access Consent\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000005\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"performer\": [", - " {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000010\"", - " }", - " }", - " ],", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"actor\": [", - " {", - " \"reference\": {", - " \"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\": \"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\"", - " }", - " ]", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " }", - " ]", - "}", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent/74eed847-ca25-4e76-8cf2-f2c2d7842a7a?_include=Consent:patient", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - "74eed847-ca25-4e76-8cf2-f2c2d7842a7a" - ], - "query": [ - { - "key": "_include", - "value": "Consent:patient" - } - ] - } - }, - "response": [] - }, - { - "name": "Retrieve consenting adult relationship with performer details", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", - " \"total\": 1,", - " \"type\": \"searchset\",", - " \"link\": [", - " {", - " \"relation\": \"self\",", - " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000010&_include=Consent:performer\"", - " }", - " ],", - " \"entry\": [", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/RP974720\",", - " \"resource\": {", - " \"resourceType\": \"RelatedPerson\",", - " \"id\": \"RP974720\",", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000010\"", - " },", - " {", - " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", - " \"value\": \"ABC0000008\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000005\"", - " }", - " },", - " \"relationship\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\",", - " \"code\": \"Personal\",", - " \"display\": \"Personal relationship with the patient\"", - " }", - " ]", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/WWCC67T1\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"WWCC67T1\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"Information Access\"", - " }", - " ],", - " \"text\": \"Information Access Consent\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000005\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"performer\": [", - " {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000010\"", - " }", - " }", - " ],", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"actor\": [", - " {", - " \"reference\": {", - " \"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\": \"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\"", - " }", - " ]", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " }", - " ]", - "}", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent/74eed847-ca25-4e76-8cf2-f2c2d7842a7a?_include=Consent:performer", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - "74eed847-ca25-4e76-8cf2-f2c2d7842a7a" - ], - "query": [ - { - "key": "_include", - "value": "Consent:performer" - } - ] - } - }, - "response": [] - }, - { - "name": "Retrieve consenting adult relationship with performer and patient details", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", - " \"total\": 1,", - " \"type\": \"searchset\",", - " \"link\": [", - " {", - " \"relation\": \"self\",", - " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000010&_include=Consent:performer&_include=Consent:patient\"", - " }", - " ],", - " \"entry\": [", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/RP974720\",", - " \"resource\": {", - " \"resourceType\": \"RelatedPerson\",", - " \"id\": \"RP974720\",", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000010\"", - " },", - " {", - " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", - " \"value\": \"ABC0000008\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000005\"", - " }", - " },", - " \"relationship\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\",", - " \"code\": \"Personal\",", - " \"display\": \"Personal relationship with the patient\"", - " }", - " ]", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/DFCC67F5\",", - " \"resource\": {", - " \"resourceType\": \"Patient\",", - " \"id\": \"DFCC67F5\",", - " \"meta\": {", - " \"security\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\",", - " \"code\": \"P9\",", - " \"display\": \"High level verification (P9)\"", - " }", - " ]", - " },", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000005\"", - " },", - " {", - " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", - " \"value\": \"ABC1234567\"", - " }", - " ],", - " \"name\": [", - " {", - " \"use\": \"usual\",", - " \"period\": {", - " \"start\": \"2020-01-01\",", - " \"end\": \"2021-12-31\"", - " },", - " \"given\": [", - " \"Sally\"", - " ],", - " \"family\": \"Evans\",", - " \"prefix\": [", - " \"Mrs\"", - " ]", - " }", - " ],", - " \"birthDate\": \"1995-10-22\",", - " \"generalPractitioner\": [", - " {", - " \"identifier\": {", - " \"value\": \"ODS12345\",", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/WWCC67T1\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"WWCC67T1\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"Information Access\"", - " }", - " ],", - " \"text\": \"Information Access Consent\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000005\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"performer\": [", - " {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000010\"", - " }", - " }", - " ],", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"actor\": [", - " {", - " \"reference\": {", - " \"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\": \"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\"", - " }", - " ]", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " }", - " ]", - "}", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent/74eed847-ca25-4e76-8cf2-f2c2d7842a7a?_include=Consent:performer&_include=Consent:patient", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - "74eed847-ca25-4e76-8cf2-f2c2d7842a7a" - ], - "query": [ - { - "key": "_include", - "value": "Consent:performer" - }, - { - "key": "_include", - "value": "Consent:patient" - } - ] - } - }, - "response": [] - }, - { - "name": "Retrieve mother-child relationship", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", - " \"total\": 1,", - " \"type\": \"searchset\",", - " \"link\": [", - " {", - " \"relation\": \"self\",", - " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000019\"", - " }", - " ],", - " \"entry\": [", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBCC67E9\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"BBCC67E9\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"Information Access\"", - " }", - " ],", - " \"text\": \"Information Access Consent\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000009\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"performer\": [", - " {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000019\"", - " }", - " }", - " ],", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"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\"", - " }", - " ]", - " }", - " }", - " ],", - " \"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\"", - " }", - " ]", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " }", - " ]", - "}", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent/39df03a2-1b14-4d19-b1dc-d5d8cbf96948", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - "39df03a2-1b14-4d19-b1dc-d5d8cbf96948" - ] - } - }, - "response": [] - }, - { - "name": "Retrieve mother-child relationship with patient details", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", - " \"total\": 1,", - " \"type\": \"searchset\",", - " \"link\": [", - " {", - " \"relation\": \"self\",", - " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000019&_include=Consent:patient\"", - " }", - " ],", - " \"entry\": [", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/A3CC67E2\",", - " \"resource\": {", - " \"resourceType\": \"Patient\",", - " \"id\": \"A3CC67E2\",", - " \"meta\": {", - " \"security\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\",", - " \"code\": \"P9\",", - " \"display\": \"High level verification (P9)\"", - " }", - " ]", - " },", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000009\"", - " },", - " {", - " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", - " \"value\": \"ABC1234556\"", - " }", - " ],", - " \"name\": [", - " {", - " \"use\": \"usual\",", - " \"period\": {", - " \"start\": \"2020-01-01\",", - " \"end\": \"2021-12-31\"", - " },", - " \"given\": [", - " \"Jane Marie Anne\"", - " ],", - " \"family\": \"Smith\",", - " \"prefix\": [", - " \"Mrs\"", - " ],", - " \"suffix\": [", - " \"MBE\",", - " \"PhD\"", - " ]", - " }", - " ],", - " \"birthDate\": \"2022-10-22\",", - " \"generalPractitioner\": [", - " {", - " \"identifier\": {", - " \"value\": \"ODS12345\",", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBCC67E9\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"BBCC67E9\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"Information Access\"", - " }", - " ],", - " \"text\": \"Information Access Consent\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000009\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"performer\": [", - " {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000019\"", - " }", - " }", - " ],", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"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\"", - " }", - " ]", - " }", - " }", - " ]", - " },", - " \"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\"", - " }", - " ]", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " }", - " ]", - "}", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent/39df03a2-1b14-4d19-b1dc-d5d8cbf96948?_include=Consent:patient", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - "39df03a2-1b14-4d19-b1dc-d5d8cbf96948" - ], - "query": [ - { - "key": "_include", - "value": "Consent:patient" - } - ] - } - }, - "response": [] - }, - { - "name": "Retrieve mother-child relationship with performer details", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", - " \"total\": 1,", - " \"type\": \"searchset\",", - " \"link\": [", - " {", - " \"relation\": \"self\",", - " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000019&_include=Consent:performer\"", - " }", - " ],", - " \"entry\": [", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/BE974742\",", - " \"resource\": {", - " \"resourceType\": \"RelatedPerson\",", - " \"id\": \"BE974742\",", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000019\"", - " },", - " {", - " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", - " \"value\": \"ABC0000001\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000009\"", - " }", - " },", - " \"relationship\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", - " \"code\": \"PRN\",", - " \"display\": \"parent\"", - " }", - " ]", - " },", - " {", - " \"coding\": [", - " {", - " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", - " \"code\": \"MTH\",", - " \"display\": \"mother\"", - " }", - " ]", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBCC67E9\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"BBCC67E9\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"Information Access\"", - " }", - " ],", - " \"text\": \"Information Access Consent\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000009\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"performer\": [", - " {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000019\"", - " }", - " }", - " ],", - " \"provision\": {", - " \"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\"", - " }", - " ]", - " }", - " }", - " ],", - " \"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\"", - " }", - " ]", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " }", - " ]", - "}", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent/39df03a2-1b14-4d19-b1dc-d5d8cbf96948?_include=Consent:performer", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - "39df03a2-1b14-4d19-b1dc-d5d8cbf96948" - ], - "query": [ - { - "key": "_include", - "value": "Consent:performer" - } - ] - } - }, - "response": [] - }, - { - "name": "Retrieve mother-child relationship with performer and patient details", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", - " \"total\": 1,", - " \"type\": \"searchset\",", - " \"link\": [", - " {", - " \"relation\": \"self\",", - " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000019&_include=Consent:performer&_include=Consent:patient\"", - " }", - " ],", - " \"entry\": [", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/BE974742\",", - " \"resource\": {", - " \"resourceType\": \"RelatedPerson\",", - " \"id\": \"BE974742\",", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000019\"", - " },", - " {", - " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", - " \"value\": \"ABC0000001\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000009\"", - " }", - " },", - " \"relationship\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", - " \"code\": \"PRN\",", - " \"display\": \"parent\"", - " }", - " ]", - " },", - " {", - " \"coding\": [", - " {", - " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", - " \"code\": \"MTH\",", - " \"display\": \"mother\"", - " }", - " ]", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/A3CC67E2\",", - " \"resource\": {", - " \"resourceType\": \"Patient\",", - " \"id\": \"A3CC67E2\",", - " \"meta\": {", - " \"security\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\",", - " \"code\": \"P9\",", - " \"display\": \"High level verification (P9)\"", - " }", - " ]", - " },", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000009\"", - " },", - " {", - " \"system\": \"https://placeholder.fhir.nhs.uk/Id/local-gp-patient-identifier\",", - " \"value\": \"ABC1234556\"", - " }", - " ],", - " \"name\": [", - " {", - " \"use\": \"usual\",", - " \"period\": {", - " \"start\": \"2020-01-01\",", - " \"end\": \"2021-12-31\"", - " },", - " \"given\": [", - " \"Jane Marie Anne\"", - " ],", - " \"family\": \"Smith\",", - " \"prefix\": [", - " \"Mrs\"", - " ],", - " \"suffix\": [", - " \"MBE\",", - " \"PhD\"", - " ]", - " }", - " ],", - " \"birthDate\": \"2022-10-22\",", - " \"generalPractitioner\": [", - " {", - " \"identifier\": {", - " \"value\": \"ODS12345\",", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBCC67E9\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"BBCC67E9\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"Information Access\"", - " }", - " ],", - " \"text\": \"Information Access Consent\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000009\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"performer\": [", - " {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000019\"", - " }", - " }", - " ],", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"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\"", - " }", - " ]", - " }", - " }", - " ],", - " \"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\"", - " }", - " ]", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " }", - " ]", - "}", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent/39df03a2-1b14-4d19-b1dc-d5d8cbf96948?_include=Consent:performer&_include=Consent:patient", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - "39df03a2-1b14-4d19-b1dc-d5d8cbf96948" - ], - "query": [ - { - "key": "_include", - "value": "Consent:performer" - }, - { - "key": "_include", - "value": "Consent:patient" - } - ] - } - }, - "response": [] - }, - { - "name": "Invalid consent ID", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"issue\": [", - " {", - " \"code\": \"invalid\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"code\": \"INVALID_ID_VALUE\",", - " \"display\": \"Required parameter(s) are invalid.\",", - " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", - " \"version\": \"1\"", - " }", - " ]", - " },", - " \"diagnostics\": \"Invalid request with error - ID must be a valid UUID.\",", - " \"severity\": \"error\"", - " }", - " ],", - " \"resourceType\": \"OperationOutcome\"", - "}", - "", - "const responseJson = pm.response.json();", - "", - "pm.test(\"Status code is 400\", function () {", - " pm.response.to.have.status(400);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent/invalid-identifier", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - "invalid-identifier" - ] - } - }, - "response": [] - }, - { - "name": "Invalid include parameter", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"OperationOutcome\",", - " \"issue\": [", - " {", - " \"code\": \"invalid\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", - " \"version\": \"1\",", - " \"code\": \"INVALID_PARAMETER\",", - " \"display\": \"Required parameter(s) are invalid.\"", - " }", - " ]", - " },", - " \"diagnostics\": \"Invalid request with error - _include parameter is invalid.\",", - " \"severity\": \"error\"", - " ", - " }", - " ],", - "}", - "", - "const responseJson = pm.response.json();", - "", - "pm.test(\"Status code is 422\", function () {", - " pm.response.to.have.status(422);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent/39df03a2-1b14-4d19-b1dc-d5d8cbf96948?_include=Consent:invalid", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - "39df03a2-1b14-4d19-b1dc-d5d8cbf96948" - ], - "query": [ - { - "key": "_include", - "value": "Consent:invalid" - } - ] - } - }, - "response": [] - }, - { - "name": "Invalid parameters", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"OperationOutcome\",", - " \"issue\": [", - " {", - " \"code\": \"invalid\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", - " \"version\": \"1\",", - " \"code\": \"INVALID_PARAMETER\",", - " \"display\": \"Required parameter(s) are invalid.\"", - " }", - " ]", - " },", - " \"diagnostics\": \"Invalid request with error - _include parameter is invalid.\",", - " \"severity\": \"error\"", - " }", - " ],", - "}", - "", - "const responseJson = pm.response.json();", - "", - "pm.test(\"Status code is 422\", function () {", - " pm.response.to.have.status(422);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent/74eed847-ca25-4e76-8cf2-f2c2d7842a7a?_unknown=true", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - "74eed847-ca25-4e76-8cf2-f2c2d7842a7a" - ], - "query": [ - { - "key": "_unknown", - "value": "true" - } - ] - } - }, - "response": [] - }, - { - "name": "Proxy role not found", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"issue\": [", - " {", - " \"code\": \"processing\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", - " \"version\": \"1\",", - " \"code\": \"INVALIDATED_RESOURCE\",", - " \"display\": \"Resource that has been marked as invalid was requested - invalid resources cannot be retrieved\"", - " }", - " ]", - " },", - " \"diagnostics\": \"Resource that has been marked as invalid was requested - invalid resources cannot be retrieved\",", - " \"severity\": \"error\"", - " }", - " ],", - " \"resourceType\": \"OperationOutcome\"", - "}", - "", - "const responseJson = pm.response.json();", - "", - "pm.test(\"Status code is 404\", function () {", - " pm.response.to.have.status(404);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent/a0922245-1072-40c3-8f4e-a7490c10d365", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - "a0922245-1072-40c3-8f4e-a7490c10d365" - ] - } - }, - "response": [] - } - ], - "description": "The GET /Consent/{ID} is for retrieving the details of a single proxy relationship, including current status, based on a provided id.\n\nThis folder contains requests covering different scenarios for users with different types of proxy relationships. It also includes error scenarios.\n\nFor more details, please refer to the [GET Consent by ID OAS page for the Validated Relationship Service on the NHS England website.](https://digital.nhs.uk/developer/api-catalogue/validated-relationship-service#get-/Consent/%7Bid%7D)" - }, - { - "name": "Update a proxy role (Consent)", - "item": [ - { - "name": "Status update", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"OperationOutcome\",", - " \"issue\": [", - " {", - " \"severity\": \"information\",", - " \"code\": \"informational\"", - " }", - " ]", - "}", - "", - "pm.test(\"Status code is 201\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " var responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "PATCH", - "header": [], - "body": { - "mode": "raw", - "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" - } - } - }, - "url": { - "raw": "{{api_base_url}}/Consent/74eed847-ca25-4e76-8cf2-f2c2d7842a7a", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - "74eed847-ca25-4e76-8cf2-f2c2d7842a7a" - ] - }, - "description": "Valid patch changing status to 'active'" - }, - "response": [] - }, - { - "name": "Missing free text for Other", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"issue\": [", - " {", - " \"code\": \"invalid\",", - " \"diagnostics\": \"Free text is required when reason code is OTHER.\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"code\": \"MISSING_FREE_TEXT_FOR_OTHER\",", - " \"display\": \"Free text must be provided for OTHER reason codes.\",", - " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", - " \"version\": \"1\"", - " }", - " ]", - " },", - " \"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\": \"inactive\"\n }\n]", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/Consent/d4e8a6f2-1c3b-4a7e-9d2f-8b5c7e9f1a3d", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - "d4e8a6f2-1c3b-4a7e-9d2f-8b5c7e9f1a3d" - ] - }, - "description": "Valid patch changing status to 'active'" - }, - "response": [] - }, - { - "name": "Access level update", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"OperationOutcome\",", - " \"issue\": [", - " {", - " \"severity\": \"information\",", - " \"code\": \"informational\"", - " }", - " ]", - "}", - "", - "pm.test(\"Status code is 201\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " var responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "PATCH", - "header": [], - "body": { - "mode": "raw", - "raw": "[\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/6b71ac92-baa3-4b76-b0f5-a601257e2722", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - "6b71ac92-baa3-4b76-b0f5-a601257e2722" - ] - }, - "description": "Valid patch modifying the role end date" - }, - "response": [] - }, - { - "name": "Multiple valid changes", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"OperationOutcome\",", - " \"issue\": [", - " {", - " \"severity\": \"information\",", - " \"code\": \"informational\"", - " }", - " ]", - "}", - "", - "pm.test(\"Status code is 201\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " var responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "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 },\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/43003db8-ffcd-4bd6-ab2f-b49b9656f9e5", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - "43003db8-ffcd-4bd6-ab2f-b49b9656f9e5" - ] - }, - "description": "Valid patch modifying the role end date" - }, - "response": [] - }, - { - "name": "Invalid status code", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"issue\": [", - " {", - " \"code\": \"invalid\",", - " \"diagnostics\": \"Invalid status code.\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"code\": \"INVALID_STATUS_CODE\",", - " \"display\": \"Status code is invalid.\",", - " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", - " \"version\": \"1\"", - " }", - " ]", - " },", - " \"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": {}, - "requests": {} - } - } - ], - "request": { - "method": "PATCH", - "header": [], - "body": { - "mode": "raw", - "raw": "[\n {\n \"op\": \"replace\",\n \"path\": \"/status\",\n \"value\": \"someinvalidcode\"\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" - } - } - }, - "url": { - "raw": "{{api_base_url}}/Consent/78c35330-fa2f-4934-a5dd-fff847f38de5", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - "78c35330-fa2f-4934-a5dd-fff847f38de5" - ] - }, - "description": "Patch with invalid status value" - }, - "response": [] - }, - { - "name": "Invalid path", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"issue\": [", - " {", - " \"code\": \"invalid\",", - " \"diagnostics\": \"Patch targeting non-existent element.\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"code\": \"INVALID_PATCH_PATH\",", - " \"display\": \"Patch target is invalid.\",", - " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", - " \"version\": \"1\"", - " }", - " ]", - " },", - " \"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": {}, - "requests": {} - } - } - ], - "request": { - "method": "PATCH", - "header": [], - "body": { - "mode": "raw", - "raw": "[\n {\n \"op\": \"replace\",\n \"path\": \"/someotherpath\",\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_DEACTIVATED_PATIENT_REQUEST\",\n \"display\": \"At patient request\"\n }\n ]\n }\n }\n ]\n }\n]", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/Consent/01abb0c5-b1ac-499d-9655-9cd0b8d3588f", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - "01abb0c5-b1ac-499d-9655-9cd0b8d3588f" - ] - }, - "description": "Patch targeting non-existent element" - }, - "response": [] - }, - { - "name": "Resource not found", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"issue\": [", - " {", - " \"code\": \"invalid\",", - " \"diagnostics\": \"Proxy role not found.\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"code\": \"RESOURCE_NOT_FOUND\",", - " \"display\": \"Request must be for a existing proxy role.\",", - " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", - " \"version\": \"1\"", - " }", - " ]", - " },", - " \"severity\": \"error\"", - " }", - " ],", - " \"resourceType\": \"OperationOutcome\"", - "}", - "", - "pm.test(\"Status code is 404\", function () {", - " pm.response.to.have.status(404);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " var responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "PATCH", - "header": [], - "body": { - "mode": "raw", - "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" - } - } - }, - "url": { - "raw": "{{api_base_url}}/Consent/0000000", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - "0000000" - ] - }, - "description": "Patch for non-existent Consent" - }, - "response": [] - }, - { - "name": "Invalid patch format", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"issue\": [", - " {", - " \"code\": \"invalid\",", - " \"diagnostics\": \"Malformed JSON patch document.\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"code\": \"INVALID_PATCH_FORMAT\",", - " \"display\": \"Request format is invalid.\",", - " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", - " \"version\": \"1\"", - " }", - " ]", - " },", - " \"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]", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/Consent/849ea584-2318-471b-a24c-cee1b5ad0137", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - "849ea584-2318-471b-a24c-cee1b5ad0137" - ] - }, - "description": "Malformed JSON patch document" - }, - "response": [] - }, - { - "name": "Invalid state transition", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"issue\": [", - " {", - " \"code\": \"invalid\",", - " \"diagnostics\": \"Patch attempting invalid status change.\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"code\": \"INVALID_STATE_TRANSITION\",", - " \"display\": \"Status change is invalid.\",", - " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", - " \"version\": \"1\"", - " }", - " ]", - " },", - " \"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": {}, - "requests": {} - } - } - ], - "request": { - "method": "PATCH", - "header": [], - "body": { - "mode": "raw", - "raw": "[\n {\n \"op\": \"replace\",\n \"path\": \"/status\",\n \"value\": \"someinvalidcode\"\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" - } - } - }, - "url": { - "raw": "{{api_base_url}}/Consent/7b7f47b8-96e5-43eb-b733-283bf1449f2c", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - "7b7f47b8-96e5-43eb-b733-283bf1449f2c" - ] - } - }, - "response": [] - }, - { - "name": "Invalid Status Reason", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"issue\": [", - " {", - " \"code\": \"invalid\",", - " \"diagnostics\": \"Invalid status reason.\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"code\": \"INVALID_STATUS_REASON\",", - " \"display\": \"Status reason is invalid.\",", - " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", - " \"version\": \"1\"", - " }", - " ]", - " },", - " \"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": {}, - "requests": {} - } - } - ], - "request": { - "method": "PATCH", - "header": [], - "body": { - "mode": "raw", - "raw": "[\n {\n \"op\": \"replace\",\n \"path\": \"/status\",\n \"value\": \"someinvalidcode\"\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" - } - } - }, - "url": { - "raw": "{{api_base_url}}/Consent/51fb4df5-815a-45cd-8427-04d6558336b7", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - "51fb4df5-815a-45cd-8427-04d6558336b7" - ] - } - }, - "response": [] - } - ], - "description": "Use this endpoint to update an existing proxy role.\n\nCommon update scenarios include:\n\n- Revocation of the role (status change from \"active\" to \"inactive\")\n- Changing the legal basis of the role (TBC)\n- Updating the end date for time-bound access\n \n\nThis folder contains requests covering different scenarios for various valid and invalid update requests.\n\nFor more details, please refer to the [PATCH Consent OAS page for the Validated Relationship Service on the NHS England website.](https://digital.nhs.uk/developer/api-catalogue/validated-relationship-service#patch-/Consent/-id-)" - } - ], - "event": [ - { - "listen": "prerequest", - "script": { - "type": "text/javascript", - "exec": [ - "" - ] - } - }, - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "pm.test(\"Response has FHIR content type\", () => {", - " pm.expect(pm.response.headers.get('Content-Type')).to.include('application/fhir+json');", - "});" - ] - } - } - ], - "variable": [ - { - "key": "api_base_url", - "value": "https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4" - } - ] + "info": { + "_postman_id": "39a04e0e-9036-43b4-bf8e-a756d07c5d9b", + "name": "Validated Relationship Service Sandbox 27/01/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": "50770159" + }, + "item": [ + { + "name": "Get a proxy access request (Questionnaire Response)", + "item": [ + { + "name": "Adult to adult with capacity", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"resourceType\": \"QuestionnaireResponse\",", + " \"status\": \"completed\",", + " \"authored\": \"2024-07-15T09:43:03.280Z\",", + " \"id\": \"156e1560-e532-4e2a-85ad-5aeff03dc43e\",", + " \"identifier\": {", + " \"value\": \"19318ZGLAB\"", + " },", + " \"source\": {", + " \"type\": \"RelatedPerson\",", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000005\"", + " }", + " },", + " \"subject\": {", + " \"type\": \"Patient\",", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000006\"", + " }", + " },", + " \"questionnaire\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Questionnaire/01dc6813-3421-4d14-948d-a4888241add1\",", + " \"item\": [", + " {", + " \"linkId\": \"relatedPerson\",", + " \"text\": \"Proxy details\",", + " \"item\": [", + " {", + " \"linkId\": \"relatedPerson_identifier\",", + " \"text\": \"NHS number\",", + " \"answer\": [", + " {", + " \"valueString\": \"9000000005\"", + " }", + " ]", + " },", + " {", + " \"linkId\": \"relatedPerson_name\",", + " \"text\": \"Name\",", + " \"item\": [", + " {", + " \"linkId\": \"relatedPerson_name_first\",", + " \"text\": \"First name\",", + " \"answer\": [", + " {", + " \"valueString\": \"Jack\"", + " }", + " ]", + " },", + " {", + " \"linkId\": \"relatedPerson_name_family\",", + " \"text\": \"Last name\",", + " \"answer\": [", + " {", + " \"valueString\": \"Jones\"", + " }", + " ]", + " }", + " ]", + " },", + " {", + " \"linkId\": \"relatedPerson_birthDate\",", + " \"text\": \"Date of birth\",", + " \"answer\": [", + " {", + " \"valueDate\": \"1970-02-15\"", + " }", + " ]", + " },", + " {", + " \"linkId\": \"relatedPerson_basisForAccess\",", + " \"text\": \"Basis for Access\",", + " \"answer\": [", + " {", + " \"valueCoding\": {", + " \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\",", + " \"code\": \"PRN\",", + " \"display\": \"Parent\"", + " }", + " }", + " ]", + " },", + " {", + " \"linkId\": \"relatedPerson_relationship\",", + " \"text\": \"Relationship\",", + " \"answer\": [", + " {", + " \"valueCoding\": {", + " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", + " \"code\": \"PRN\",", + " \"display\": \"Parent\"", + " }", + " }", + " ]", + " }", + " ]", + " },", + " {", + " \"linkId\": \"patient\",", + " \"text\": \"Patient details\",", + " \"item\": [", + " {", + " \"linkId\": \"patient_identifier\",", + " \"text\": \"NHS number\",", + " \"answer\": [", + " {", + " \"valueString\": \"9000000006\"", + " }", + " ]", + " },", + " {", + " \"linkId\": \"patient_name\",", + " \"text\": \"Name\",", + " \"item\": [", + " {", + " \"linkId\": \"patient_name_first\",", + " \"text\": \"First name\",", + " \"answer\": [", + " {", + " \"valueString\": \"Jill\"", + " }", + " ]", + " },", + " {", + " \"linkId\": \"patient_name_family\",", + " \"text\": \"Last name\",", + " \"answer\": [", + " {", + " \"valueString\": \"Jones\"", + " }", + " ]", + " }", + " ]", + " },", + " {", + " \"linkId\": \"patient_birthDate\",", + " \"text\": \"Date of birth\",", + " \"answer\": [", + " {", + " \"valueDate\": \"1965-01-01\"", + " }", + " ]", + " }", + " ]", + " },", + " {", + " \"linkId\": \"requestedAccess\",", + " \"text\": \"Requested access\",", + " \"item\": [", + " {", + " \"linkId\": \"requestedAccess_accessLevel\",", + " \"text\": \"Requested access level\",", + " \"answer\": [", + " {", + " \"valueCoding\": {", + " \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",", + " \"code\": \"APPT\",", + " \"display\": \"Appointment Booking\"", + " }", + " },", + " {", + " \"valueCoding\": {", + " \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",", + " \"code\": \"VACC\",", + " \"display\": \"Vaccination Records\"", + " }", + " }", + " ]", + " },", + " {", + " \"linkId\": \"requestedAccess_reasonsForAccess\",", + " \"text\": \"Reason for access\",", + " \"answer\": [", + " {", + " \"valueCoding\": {", + " \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-ReasonForAccess\",", + " \"code\": \"PRAC\",", + " \"display\": \"Practical Reasons\"", + " }", + " }", + " ]", + " }", + " ]", + " }", + " ]", + "};", + "", + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " const responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "d967f4c9-8e83-4930-97ab-ae4e122d8ca5", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "8717c840-c222-4f84-a880-45bc129f8382", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/QuestionnaireResponse/156e1560-e532-4e2a-85ad-5aeff03dc43e", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "QuestionnaireResponse", + "156e1560-e532-4e2a-85ad-5aeff03dc43e" + ] + }, + "description": "Example of Questionnaire Response that will be returned" + }, + "response": [] + }, + { + "name": "Missing Access Request UUID", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"issue\": [", + " {", + " \"code\": \"not-supported\",", + " \"details\": {", + " \"coding\": [", + " {", + " \"code\": \"METHOD_NOT_ALLOWED\",", + " \"display\": \"The method is not allowed.\",", + " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", + " \"version\": \"1\"", + " }", + " ]", + " },", + " \"diagnostics\": \"The method is not allowed for the requested resource.\",", + " \"severity\": \"error\"", + " }", + " ],", + " \"resourceType\": \"OperationOutcome\"", + "};", + "", + "pm.test(\"Status code is 405\", function () {", + " pm.response.to.have.status(405);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " const responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "d967f4c9-8e83-4930-97ab-ae4e122d8ca5", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "8717c840-c222-4f84-a880-45bc129f8382", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/QuestionnaireResponse/", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "QuestionnaireResponse", + "" + ] + }, + "description": "Example of an error response when reference code is missing from request" + }, + "response": [] + }, + { + "name": "Invalid Access Request UUID", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"resourceType\": \"OperationOutcome\",", + " \"issue\": [", + " {", + " \"severity\": \"error\",", + " \"code\": \"invalid\",", + " \"details\": {", + " \"coding\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/STU3/CodeSystem/Spine-ErrorOrWarningCode-1\",", + " \"code\": \"INVALID_IDENTIFIER_VALUE\",", + " \"display\": \"Invalid identifier value\",", + " }", + " ]", + " },", + " \"diagnostics\": \"The specified access request ID is invalid. Access request IDs must be a valid UUID.\",", + " }", + " ],", + " };", + "", + "pm.test(\"Status code is 400\", function () {", + " pm.response.to.have.status(400);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " const responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "d967f4c9-8e83-4930-97ab-ae4e122d8ca5", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "8717c840-c222-4f84-a880-45bc129f8382", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/QuestionnaireResponse/INVALID", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "QuestionnaireResponse", + "INVALID" + ] + }, + "description": "Example of an error response when reference code is invalid" + }, + "response": [] + }, + { + "name": "Access Request UUID Not Found", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"resourceType\": \"OperationOutcome\",", + " \"issue\": [", + " {", + " \"severity\": \"error\",", + " \"code\": \"not-found\",", + " \"details\": {", + " \"coding\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/STU3/CodeSystem/Spine-ErrorOrWarningCode-1\",", + " \"code\": \"QUESTIONNAIRE_RESPONSE_NOT_FOUND\",", + " \"display\": \"Questionnaire response not found\"", + " }", + " ]", + " },", + " \"diagnostics\": \"The Questionnaire response could not be found using the provided access request ID.\"", + " }", + " ]", + "};", + "", + "pm.test(\"Status code is 404\", function () {", + " pm.response.to.have.status(404);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " const responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "d967f4c9-8e83-4930-97ab-ae4e122d8ca5", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "8717c840-c222-4f84-a880-45bc129f8382", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/QuestionnaireResponse/60d09b82-f4bb-41f9-b41e-767999b4ac9b", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "QuestionnaireResponse", + "60d09b82-f4bb-41f9-b41e-767999b4ac9b" + ] + }, + "description": "Example of an error response when reference code is not found in database" + }, + "response": [] + } + ], + "description": "The GET Questionnaire Response endpoint is used to retrieve a Questionnaire Response using its unique reference code. This endpoint returns the full Questionnaire Response document that was previously submitted.\n\nThis folder contains requests covering different scenarios of valid and invalid requests.\n\nFor more details, please refer to the [GET Questionnaire Response OAS page for the Validated Relationship Service on the NHS England website.](https://digital.nhs.uk/developer/api-catalogue/validated-relationship-service#get-/QuestionnaireResponse)" + }, + { + "name": "New access request (Questionnaire Response)", + "item": [ + { + "name": "Adult to child access request", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"resourceType\": \"OperationOutcome\",", + " \"issue\": [", + " {", + " \"severity\": \"information\",", + " \"code\": \"informational\",", + " \"details\": {", + " \"coding\": [", + " {", + " \"code\": \"19318ZGLAB\",", + " \"display\": \"19318ZGLAB\"", + " }", + " ]", + " }", + " }", + " ]", + "};", + "", + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Response has the correct body\", () => {", + " const responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});", + "", + "pm.test(\"Location header is returned\", () => {", + " pm.response.to.have.header(\"Location\", \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/QuestionnaireResponse?ID=156e1560-e532-4e2a-85ad-5aeff03dc43e\")", + "})" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/fhir+json", + "type": "text" + }, + { + "key": "X-Request-ID", + "value": "d967f4c9-8e83-4930-97ab-ae4e122d8ca5", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "8717c840-c222-4f84-a880-45bc129f8382", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"resourceType\": \"QuestionnaireResponse\",\n \"status\": \"completed\",\n \"authored\": \"2024-07-15T09:43:03.280Z\",\n \"source\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000009\"\n }\n },\n \"subject\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000017\"\n }\n },\n \"questionnaire\": \"Questionnaire/01dc6813-3421-4d14-948d-a4888241add1\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson\",\n \"text\": \"relatedPerson\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_identifier\",\n \"text\": \"NHS Number\",\n \"answer\": [\n {\n \"valueString\": \"9000000009\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name\",\n \"text\": \"relatedPerson_name\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_name_first\",\n \"text\": \"First name.\",\n \"answer\": [\n {\n \"valueString\": \"Sharon\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name_family\",\n \"text\": \"Family name (often called Surname).\",\n \"answer\": [\n {\n \"valueString\": \"Smith\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_birthDate\",\n \"text\": \"Date of Birth\",\n \"answer\": [\n {\n \"valueDate\": \"1994-03-21\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_basisForAccess\",\n \"text\": \"Basis For Access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_relationship\",\n \"text\": \"Relationship\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails\",\n \"text\": \"parentalApplicationSupplementaryDetails\",\n \"item\": [\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_evidenceOfResponsibility\",\n \"text\": \"Evidence of parental responsibility\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-EvidenceOfResponsibility\",\n \"code\": \"BRTH\",\n \"display\": \"Birth certificate\"\n }\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_evidenceOfResponsibilityMoreinfo\",\n \"text\": \"Evidence of responsibility - Further Information\",\n \"answer\": [\n {\n \"valueString\": \"Birth Certificate is original\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_isCurrentAddressConfirmed\",\n \"text\": \"Is current address confirmed?\",\n \"answer\": [\n {\n \"valueString\": \"Yes\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_newAddress\",\n \"text\": \"parentalApplicationSupplementaryDetails_newAddress\",\n \"item\": [\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_line1\",\n \"text\": \"Address Line 1\",\n \"answer\": [\n {\n \"valueString\": \"24 Hoves Edge\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_line2\",\n \"text\": \"Address Line 2\",\n \"answer\": [\n {\n \"valueString\": \"Remington\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_line3\",\n \"text\": \"Address Line 3\",\n \"answer\": [\n {\n \"valueString\": \"Boroughbridge\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_city\",\n \"text\": \"Town / City\",\n \"answer\": [\n {\n \"valueString\": \"Leeds\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_district\",\n \"text\": \"County\",\n \"answer\": [\n {\n \"valueString\": \"West Yorkshire\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_postalCode\",\n \"text\": \"Postcode\",\n \"answer\": [\n {\n \"valueString\": \"LS1 1DW\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_liveAtSameAddress\",\n \"text\": \"Do the adult and child live at the same address?\",\n \"answer\": [\n {\n \"valueString\": \"Yes\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_canChildConsent\",\n \"text\": \"Can the child consent?\",\n \"answer\": [\n {\n \"valueString\": \"No\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_reasonNoChildConsent\",\n \"text\": \"Reason the child cannot consent\",\n \"answer\": [\n {\n \"valueString\": \"Child is too young\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient\",\n \"text\": \"patient\",\n \"item\": [\n {\n \"linkId\": \"patient_identifier\",\n \"text\": \"NHS Number\",\n \"answer\": [\n {\n \"valueString\": \"9000000017\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name\",\n \"text\": \"patient_name\",\n \"item\": [\n {\n \"linkId\": \"patient_name_first\",\n \"text\": \"First name.\",\n \"answer\": [\n {\n \"valueString\": \"Jane\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name_family\",\n \"text\": \"Family name (often called Surname).\",\n \"answer\": [\n {\n \"valueString\": \"Smith\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient_birthDate\",\n \"text\": \"Date of Birth\",\n \"answer\": [\n {\n \"valueDate\": \"2020-10-22\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess\",\n \"text\": \"requestedAccess\",\n \"item\": [\n {\n \"linkId\": \"requestedAccess_accessLevel\",\n \"text\": \"Requested access level\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"APPT\",\n \"display\": \"Appointment Booking\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccess\",\n \"text\": \"Reason for access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-ReasonForAccess\",\n \"code\": \"COMB\",\n \"display\": \"Communication Barriers\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccessMoreinfo\",\n \"text\": \"Reason for access - further information\",\n \"answer\": [\n {\n \"valueString\": \"No internet connection\"\n }\n ]\n }\n ]\n }\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{api_base_url}}/QuestionnaireResponse", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "QuestionnaireResponse" + ] + }, + "description": "Example of an adult to child access request with the reference code returned" + }, + "response": [] + }, + { + "name": "Adult to adult with ability to consent access request", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"resourceType\": \"OperationOutcome\",", + " \"issue\": [", + " {", + " \"severity\": \"information\",", + " \"code\": \"informational\",", + " \"details\": {", + " \"coding\": [", + " {", + " \"code\": \"19318ZGLAB\",", + " \"display\": \"19318ZGLAB\"", + " }", + " ]", + " }", + " }", + " ]", + "};", + "", + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Response has the correct body\", () => {", + " const responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});", + "", + "pm.test(\"Location header is returned\", () => {", + " pm.response.to.have.header(\"Location\", \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/QuestionnaireResponse?ID=156e1560-e532-4e2a-85ad-5aeff03dc43e\")", + "})" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "X-Request-ID", + "value": "d967f4c9-8e83-4930-97ab-ae4e122d8ca5", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "8717c840-c222-4f84-a880-45bc129f8382", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"resourceType\": \"QuestionnaireResponse\",\n \"status\": \"completed\",\n \"authored\": \"2024-07-15T09:43:03.280Z\",\n \"source\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000009\"\n }\n },\n \"subject\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000017\"\n }\n },\n \"questionnaire\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Questionnaire/01dc6813-3421-4d14-948d-a4888241add1\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson\",\n \"text\": \"Proxy details\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_identifier\",\n \"text\": \"NHS number\",\n \"answer\": [\n {\n \"valueString\": \"9000000005\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_basisForAccess\",\n \"text\": \"Basis for Access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\",\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\"\n }\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_relationship\",\n \"text\": \"Relationship\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"SPS\",\n \"display\": \"Spouse\"\n }\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient\",\n \"text\": \"Patient details\",\n \"item\": [\n {\n \"linkId\": \"patient_identifier\",\n \"text\": \"NHS number\",\n \"answer\": [\n {\n \"valueString\": \"9000000017\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name\",\n \"text\": \"Name\",\n \"item\": [\n {\n \"linkId\": \"patient_name_first\",\n \"text\": \"First name\",\n \"answer\": [\n {\n \"valueString\": \"Jill\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name_family\",\n \"text\": \"Last name\",\n \"answer\": [\n {\n \"valueString\": \"Jones\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient_birthDate\",\n \"text\": \"Date of birth\",\n \"answer\": [\n {\n \"valueDate\": \"1965-01-01\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess\",\n \"text\": \"Requested access\",\n \"item\": [\n {\n \"linkId\": \"requestedAccess_accessLevel\",\n \"text\": \"Requested access level\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"APPT\",\n \"display\": \"Appointment Booking\"\n }\n },\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"VACC\",\n \"display\": \"Vaccination Records\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccess\",\n \"text\": \"Reason for access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-ReasonForAccess\",\n \"code\": \"PRAC\",\n \"display\": \"Practical Reasons\"\n }\n }\n ]\n }\n ]\n }\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{api_base_url}}/QuestionnaireResponse", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "QuestionnaireResponse" + ] + }, + "description": "Example of an adult to adult access request where the patient can consent with the reference code returned" + }, + "response": [] + }, + { + "name": "Duplicate relationship", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"issue\": [", + " {", + " \"code\": \"invalid\",", + " \"diagnostics\": \"Proxy role already exists.\",", + " \"details\": {", + " \"coding\": [", + " {", + " \"code\": \"DUPLICATE_RELATIONSHIP\",", + " \"display\": \"Request must be for a new proxy role.\",", + " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", + " \"version\": \"1\"", + " }", + " ]", + " },", + " \"severity\": \"error\"", + " }", + " ],", + " \"resourceType\": \"OperationOutcome\"", + "}", + "", + "pm.test(\"Status code is 409\", function () {", + " pm.response.to.have.status(409);", + "});", + "", + "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\": \"QuestionnaireResponse\",\n \"status\": \"completed\",\n \"authored\": \"2024-07-15T09:43:03.280Z\",\n \"source\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000049\"\n }\n },\n \"subject\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000006\"\n }\n },\n \"questionnaire\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Questionnaire/01dc6813-3421-4d14-948d-a4888241add1\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson\",\n \"text\": \"Proxy details\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_identifier\",\n \"text\": \"NHS number\",\n \"answer\": [\n {\n \"valueString\": \"9000000049\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_basisForAccess\",\n \"text\": \"Basis for Access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\",\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\"\n }\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_relationship\",\n \"text\": \"Relationship\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"SPS\",\n \"display\": \"Spouse\"\n }\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient\",\n \"text\": \"Patient details\",\n \"item\": [\n {\n \"linkId\": \"patient_identifier\",\n \"text\": \"NHS number\",\n \"answer\": [\n {\n \"valueString\": \"9000000006\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name\",\n \"text\": \"Name\",\n \"item\": [\n {\n \"linkId\": \"patient_name_first\",\n \"text\": \"First name\",\n \"answer\": [\n {\n \"valueString\": \"Jill\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name_family\",\n \"text\": \"Last name\",\n \"answer\": [\n {\n \"valueString\": \"Jones\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient_birthDate\",\n \"text\": \"Date of birth\",\n \"answer\": [\n {\n \"valueDate\": \"1965-01-01\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess\",\n \"text\": \"Requested access\",\n \"item\": [\n {\n \"linkId\": \"requestedAccess_accessLevel\",\n \"text\": \"Requested access level\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"APPT\",\n \"display\": \"Appointment Booking\"\n }\n },\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"VACC\",\n \"display\": \"Vaccination Records\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccess\",\n \"text\": \"Reason for access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-ReasonForAccess\",\n \"code\": \"PRAC\",\n \"display\": \"Practical Reasons\"\n }\n }\n ]\n }\n ]\n }\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{api_base_url}}/QuestionnaireResponse", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "QuestionnaireResponse" + ] + } + }, + "response": [] + }, + { + "name": "Adult to adult without ability to consent access request", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"resourceType\": \"OperationOutcome\",", + " \"issue\": [", + " {", + " \"severity\": \"information\",", + " \"code\": \"informational\",", + " \"details\": {", + " \"coding\": [", + " {", + " \"code\": \"19318ZGLAB\",", + " \"display\": \"19318ZGLAB\"", + " }", + " ]", + " }", + " }", + " ]", + "};", + "", + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Response has the correct body\", () => {", + " const responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});", + "", + "pm.test(\"Location header is returned\", () => {", + " pm.response.to.have.header(\"Location\", \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/QuestionnaireResponse?ID=156e1560-e532-4e2a-85ad-5aeff03dc43e\")", + "})" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "X-Request-ID", + "value": "d967f4c9-8e83-4930-97ab-ae4e122d8ca5", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "8717c840-c222-4f84-a880-45bc129f8382", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"resourceType\": \"QuestionnaireResponse\",\n \"status\": \"completed\",\n \"authored\": \"2024-07-15T09:43:03.280Z\",\n \"source\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000017\"\n }\n },\n \"subject\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000009\"\n }\n },\n \"questionnaire\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Questionnaire/01dc6813-3421-4d14-948d-a4888241add1\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson\",\n \"text\": \"Proxy details\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_identifier\",\n \"text\": \"NHS number\",\n \"answer\": [\n {\n \"valueString\": \"9000000017\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_basisForAccess\",\n \"text\": \"Basis for Access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/STU3/CodeSystem/RARecord-ProxyRole-1\",\n \"code\": \"002\",\n \"display\": \"Best interest decision made on behalf of the patient (Mental Capacity Act 2005)\"\n }\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_relationship\",\n \"text\": \"Relationship\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"CHILD\",\n \"display\": \"Child\"\n }\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient\",\n \"text\": \"Patient details\",\n \"item\": [\n {\n \"linkId\": \"patient_identifier\",\n \"text\": \"NHS number\",\n \"answer\": [\n {\n \"valueString\": \"9000000009\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name\",\n \"text\": \"Name\",\n \"item\": [\n {\n \"linkId\": \"patient_name_first\",\n \"text\": \"First name\",\n \"answer\": [\n {\n \"valueString\": \"Florence\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name_family\",\n \"text\": \"Last name\",\n \"answer\": [\n {\n \"valueString\": \"Smith\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient_birthDate\",\n \"text\": \"Date of birth\",\n \"answer\": [\n {\n \"valueDate\": \"1935-01-02\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess\",\n \"text\": \"Requested access\",\n \"item\": [\n {\n \"linkId\": \"requestedAccess_accessLevel\",\n \"text\": \"Requested access level\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"APPT\",\n \"display\": \"Appointment Booking\"\n }\n },\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"VACC\",\n \"display\": \"Vaccination Records\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccess\",\n \"text\": \"Reason for access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-ReasonForAccess\",\n \"code\": \"TECH\",\n \"display\": \"Technical Barriers\"\n }\n }\n ]\n }\n ]\n }\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{api_base_url}}/QuestionnaireResponse", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "QuestionnaireResponse" + ] + }, + "description": "Example of an adult to adult access request where the patient cannot consent with the reference code returned" + }, + "response": [] + }, + { + "name": "Adult nominates adult access request", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"resourceType\": \"OperationOutcome\",", + " \"issue\": [", + " {", + " \"severity\": \"information\",", + " \"code\": \"informational\",", + " \"details\": {", + " \"coding\": [", + " {", + " \"code\": \"19318ZGLAB\",", + " \"display\": \"19318ZGLAB\"", + " }", + " ]", + " }", + " }", + " ]", + "};", + "", + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Response has the correct body\", () => {", + " const responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});", + "", + "pm.test(\"Location header is returned\", () => {", + " pm.response.to.have.header(\"Location\", \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/QuestionnaireResponse?ID=156e1560-e532-4e2a-85ad-5aeff03dc43e\")", + "})" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "X-Request-ID", + "value": "d967f4c9-8e83-4930-97ab-ae4e122d8ca5", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "8717c840-c222-4f84-a880-45bc129f8382", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"resourceType\": \"QuestionnaireResponse\",\n \"status\": \"completed\",\n \"authored\": \"2024-07-15T09:43:03.280Z\",\n \"source\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000009\"\n }\n },\n \"subject\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000009\"\n }\n },\n \"questionnaire\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Questionnaire/01dc6813-3421-4d14-948d-a4888241add1\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson\",\n \"text\": \"Proxy details\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_identifier\",\n \"text\": \"NHS number\",\n \"answer\": [\n {\n \"valueString\": \"9000000017\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name\",\n \"text\": \"Name\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_name_first\",\n \"text\": \"First name\",\n \"answer\": [\n {\n \"valueString\": \"Tom\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name_family\",\n \"text\": \"Last name\",\n \"answer\": [\n {\n \"valueString\": \"Jones\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_birthDate\",\n \"text\": \"Date of birth\",\n \"answer\": [\n {\n \"valueDate\": \"1970-07-12\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_basisForAccess\",\n \"text\": \"Basis for Access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\",\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\"\n }\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_relationship\",\n \"text\": \"Relationship\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"SPS\",\n \"display\": \"Spouse\"\n }\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient\",\n \"text\": \"Patient details\",\n \"item\": [\n {\n \"linkId\": \"patient_identifier\",\n \"text\": \"NHS number\",\n \"answer\": [\n {\n \"valueString\": \"9000000009\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess\",\n \"text\": \"Requested access\",\n \"item\": [\n {\n \"linkId\": \"requestedAccess_accessLevel\",\n \"text\": \"Requested access level\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"APPT\",\n \"display\": \"Appointment Booking\"\n }\n },\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"VACC\",\n \"display\": \"Vaccination Records\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccess\",\n \"text\": \"Reason for access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-ReasonForAccess\",\n \"code\": \"PRAC\",\n \"display\": \"Practical Reasons\"\n }\n }\n ]\n }\n ]\n }\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{api_base_url}}/QuestionnaireResponse", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "QuestionnaireResponse" + ] + }, + "description": "Example of an adult to adult access request where the patient is the applicant with the reference code returned" + }, + "response": [] + } + ], + "description": "The POST Questionnaire Response endpoint is used to submit a proxy access request for a given performer and patient.\n\nIt is indended to be used by user facing service e.g. Proxy Access Service, who will collect the necessary information from the user and submit it to VRS as a QuestionnaireResponse.\n\nThis folder contains requests covering different scenarios of valid and invalid requests.\n\nFor more details, please refer to the [POST Questionnaire Response OAS page for the Validated Relationship Service on the NHS England website.](https://digital.nhs.uk/developer/api-catalogue/validated-relationship-service#post-/QuestionnaireResponse)", + "event": [ + { + "listen": "prerequest", + "script": { + "type": "text/javascript", + "exec": [ + "" + ] + } + }, + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "" + ] + } + } + ] + }, + { + "name": "Get verified candidate relationship (Related Person)", + "item": [ + { + "name": "List relationship", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"entry\": [", + " {", + " \"fullUrl\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/BE974742\",", + " \"resource\": {", + " \"id\": \"BE974742\",", + " \"birthDate\": \"2017-09-23\",", + " \"identifier\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000017\"", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000009\"", + " }", + " },", + " \"name\": [", + " {", + " \"family\": \"MOGAJI\",", + " \"given\": [", + " \"GADIL\"", + " ],", + " \"period\": {", + " \"start\": \"2021-07-08\"", + " },", + " \"prefix\": [", + " \"MR\"", + " ],", + " \"use\": \"usual\"", + " }", + " ],", + " \"relationship\": [", + " {", + " \"coding\": [", + " {", + " \"code\": \"MTH\",", + " \"display\": \"mother\",", + " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\"", + " }", + " ]", + " }", + " ],", + " \"resourceType\": \"RelatedPerson\"", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/A3CC67E2\",", + " \"resource\": {", + " \"id\": \"A3CC67E2\",", + " \"birthDate\": \"2018-04-27\",", + " \"identifier\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000017\"", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000025\"", + " }", + " },", + " \"name\": [", + " {", + " \"family\": \"FEARON\",", + " \"given\": [", + " \"Daren\"", + " ],", + " \"period\": {", + " \"start\": \"2018-09-21\"", + " },", + " \"prefix\": [", + " \"MR\"", + " ],", + " \"use\": \"usual\"", + " }", + " ],", + " \"relationship\": [", + " {", + " \"coding\": [", + " {", + " \"code\": \"MTH\",", + " \"display\": \"mother\",", + " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\"", + " }", + " ]", + " }", + " ],", + " \"resourceType\": \"RelatedPerson\"", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " }", + " ],", + " \"link\": [", + " {", + " \"relation\": \"self\",", + " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson?identifier=9000000017\"", + " }", + " ],", + " \"resourceType\": \"Bundle\",", + " \"timestamp\": \"2024-01-01T00:00:00+00:00\",", + " \"total\": 2,", + " \"type\": \"searchset\"", + "};", + "", + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " const responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "d967f4c9-8e83-4930-97ab-ae4e122d8ca5", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "8717c840-c222-4f84-a880-45bc129f8382", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/RelatedPerson?identifier=9000000017", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "RelatedPerson" + ], + "query": [ + { + "key": "identifier", + "value": "9000000017" + } + ] + }, + "description": "Retrieves a list of validated relationships for a given NHS number." + }, + "response": [] + }, + { + "name": "List relationship and include patient's details", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"entry\": [", + " {", + " \"fullUrl\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9000000009\",", + " \"resource\": {", + " \"birthDate\": \"2017-09-23\",", + " \"id\": \"9000000009\",", + " \"identifier\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000009\"", + " }", + " ],", + " \"name\": [", + " {", + " \"family\": \"MOGAJI\",", + " \"given\": [", + " \"GADIL\"", + " ],", + " \"period\": {", + " \"start\": \"2021-07-08\"", + " },", + " \"prefix\": [", + " \"MR\"", + " ],", + " \"use\": \"usual\"", + " }", + " ],", + " \"resourceType\": \"Patient\"", + " },", + " \"search\": {", + " \"mode\": \"include\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/BE974742\",", + " \"resource\": {", + " \"id\": \"BE974742\",", + " \"birthDate\": \"2017-09-23\",", + " \"identifier\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000017\"", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000009\"", + " }", + " },", + " \"name\": [", + " {", + " \"family\": \"MOGAJI\",", + " \"given\": [", + " \"GADIL\"", + " ],", + " \"period\": {", + " \"start\": \"2021-07-08\"", + " },", + " \"prefix\": [", + " \"MR\"", + " ],", + " \"use\": \"usual\"", + " }", + " ],", + " \"relationship\": [", + " {", + " \"coding\": [", + " {", + " \"code\": \"MTH\",", + " \"display\": \"mother\",", + " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\"", + " }", + " ]", + " }", + " ],", + " \"resourceType\": \"RelatedPerson\"", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9000000025\",", + " \"resource\": {", + " \"birthDate\": \"2018-04-27\",", + " \"id\": \"9000000025\",", + " \"identifier\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000025\"", + " }", + " ],", + " \"name\": [", + " {", + " \"family\": \"FEARON\",", + " \"given\": [", + " \"Daren\"", + " ],", + " \"period\": {", + " \"start\": \"2018-09-21\"", + " },", + " \"prefix\": [", + " \"MR\"", + " ],", + " \"use\": \"usual\"", + " }", + " ],", + " \"resourceType\": \"Patient\"", + " },", + " \"search\": {", + " \"mode\": \"include\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/A3CC67E2\",", + " \"resource\": {", + " \"id\": \"A3CC67E2\",", + " \"birthDate\": \"2018-04-27\",", + " \"identifier\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000017\"", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000025\"", + " }", + " },", + " \"name\": [", + " {", + " \"family\": \"FEARON\",", + " \"given\": [", + " \"Daren\"", + " ],", + " \"period\": {", + " \"start\": \"2018-09-21\"", + " },", + " \"prefix\": [", + " \"MR\"", + " ],", + " \"use\": \"usual\"", + " }", + " ],", + " \"relationship\": [", + " {", + " \"coding\": [", + " {", + " \"code\": \"MTH\",", + " \"display\": \"mother\",", + " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\"", + " }", + " ]", + " }", + " ],", + " \"resourceType\": \"RelatedPerson\"", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " }", + " ],", + " \"link\": [", + " {", + " \"relation\": \"self\",", + " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson?identifier=9000000017&_include=RelatedPerson:patient\"", + " }", + " ],", + " \"resourceType\": \"Bundle\",", + " \"timestamp\": \"2024-01-01T00:00:00+00:00\",", + " \"total\": 2,", + " \"type\": \"searchset\"", + "};", + "", + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " const responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "d967f4c9-8e83-4930-97ab-ae4e122d8ca5", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "8717c840-c222-4f84-a880-45bc129f8382", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/RelatedPerson?identifier=9000000017&_include=RelatedPerson:patient", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "RelatedPerson" + ], + "query": [ + { + "key": "identifier", + "value": "9000000017" + }, + { + "key": "_include", + "value": "RelatedPerson:patient" + } + ] + }, + "description": "Retrieves a list of validated relationships for a given NHS number with additional patient information." + }, + "response": [] + }, + { + "name": "List Relationship and no relationships returned", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"link\": [", + " {", + " \"relation\": \"self\",", + " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships-service-api/FHIR/R4/RelatedPerson?identifier=9000000033\"", + " }", + " ],", + " \"timestamp\": \"2024-01-01T00:00:00+00:00\",", + " \"total\": 0,", + " \"type\": \"searchset\",", + " \"resourceType\": \"Bundle\"", + "};", + "", + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " const responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "d967f4c9-8e83-4930-97ab-ae4e122d8ca5", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "8717c840-c222-4f84-a880-45bc129f8382", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/RelatedPerson?identifier=9000000033", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "RelatedPerson" + ], + "query": [ + { + "key": "identifier", + "value": "9000000033" + } + ] + }, + "description": "Example of a response where the given NHS numbers do not have a relationship." + }, + "response": [] + }, + { + "name": "Verify relationship between proxy and patient", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"resourceType\": \"Bundle\",", + " \"timestamp\": \"2024-01-01T00:00:00+00:00\",", + " \"total\": 1,", + " \"type\": \"searchset\",", + " \"entry\": [", + " {", + " \"fullUrl\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/BE974742\",", + " \"resource\": {", + " \"id\": \"BE974742\",", + " \"birthDate\": \"2017-09-23\",", + " \"identifier\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000009\"", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000017\"", + " }", + " },", + " \"name\": [", + " {", + " \"family\": \"MOGAJI\",", + " \"given\": [", + " \"GADIL\"", + " ],", + " \"period\": {", + " \"start\": \"2021-07-08\"", + " },", + " \"prefix\": [", + " \"MR\"", + " ],", + " \"use\": \"usual\"", + " }", + " ],", + " \"relationship\": [", + " {", + " \"coding\": [", + " {", + " \"code\": \"MTH\",", + " \"display\": \"mother\",", + " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\"", + " }", + " ]", + " }", + " ],", + " \"resourceType\": \"RelatedPerson\"", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " }", + " ],", + " \"link\": [", + " {", + " \"relation\": \"self\",", + " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson?patient:identifier=9000000009&identifier=9000000017\"", + " }", + " ]", + "};", + "", + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " const responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "d967f4c9-8e83-4930-97ab-ae4e122d8ca5", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "8717c840-c222-4f84-a880-45bc129f8382", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/RelatedPerson?identifier=9000000017&patient:identifier=9000000009", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "RelatedPerson" + ], + "query": [ + { + "key": "identifier", + "value": "9000000017" + }, + { + "key": "patient:identifier", + "value": "9000000009" + } + ] + }, + "description": "Retrieves information about the relationship between the given NHS numbers" + }, + "response": [] + }, + { + "name": "Verify relationship between proxy and patient and include patient's details", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"resourceType\": \"Bundle\",", + " \"timestamp\": \"2024-01-01T00:00:00+00:00\",", + " \"total\": 1,", + " \"type\": \"searchset\",", + " \"link\": [", + " {", + " \"relation\": \"self\",", + " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson?patient:identifier=9000000009&identifier=9000000017&_include=RelatedPerson:patient\"", + " }", + " ],", + " \"entry\": [", + " {", + " \"fullUrl\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9000000009\",", + " \"resource\": {", + " \"birthDate\": \"2017-09-23\",", + " \"id\": \"9000000009\",", + " \"identifier\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000009\"", + " }", + " ],", + " \"name\": [", + " {", + " \"family\": \"MOGAJI\",", + " \"given\": [", + " \"GADIL\"", + " ],", + " \"period\": {", + " \"start\": \"2021-07-08\"", + " },", + " \"prefix\": [", + " \"MR\"", + " ],", + " \"use\": \"usual\"", + " }", + " ],", + " \"resourceType\": \"Patient\"", + " },", + " \"search\": {", + " \"mode\": \"include\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/BE974742\",", + " \"resource\": {", + " \"id\": \"BE974742\",", + " \"birthDate\": \"2017-09-23\",", + " \"identifier\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000009\"", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000017\"", + " }", + " },", + " \"name\": [", + " {", + " \"family\": \"MOGAJI\",", + " \"given\": [", + " \"GADIL\"", + " ],", + " \"period\": {", + " \"start\": \"2021-07-08\"", + " },", + " \"prefix\": [", + " \"MR\"", + " ],", + " \"use\": \"usual\"", + " }", + " ],", + " \"relationship\": [", + " {", + " \"coding\": [", + " {", + " \"code\": \"MTH\",", + " \"display\": \"mother\",", + " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\"", + " }", + " ]", + " }", + " ],", + " \"resourceType\": \"RelatedPerson\"", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " }", + " ]", + "};", + "", + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " const responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "d967f4c9-8e83-4930-97ab-ae4e122d8ca5", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "8717c840-c222-4f84-a880-45bc129f8382", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/RelatedPerson?identifier=9000000017&patient:identifier=9000000009&_include=RelatedPerson:patient", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "RelatedPerson" + ], + "query": [ + { + "key": "identifier", + "value": "9000000017" + }, + { + "key": "patient:identifier", + "value": "9000000009" + }, + { + "key": "_include", + "value": "RelatedPerson:patient" + } + ] + }, + "description": "Retrieves information about the relationship between the given NHS numbers including the patient details" + }, + "response": [] + }, + { + "name": "Missing identifier", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"issue\": [", + " {", + " \"code\": \"invalid\",", + " \"details\": {", + " \"coding\": [", + " {", + " \"code\": \"MISSING_IDENTIFIER_VALUE\",", + " \"display\": \"Missing RelatedPerson NHS number.\",", + " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", + " \"version\": \"1\"", + " }", + " ]", + " },", + " \"diagnostics\": \"The 'identifier' parameter is required\",", + " \"severity\": \"error\"", + " }", + " ],", + " \"resourceType\": \"OperationOutcome\"", + "};", + "", + "const responseJson = pm.response.json();", + "", + "pm.test(\"Status code is 400\", function () {", + " pm.response.to.have.status(400);", + "});", + "", + "pm.test(\"Should have correct error response\", () => {", + " pm.expect(responseJson.issue[0].details.coding[0].code).to.eql(\"MISSING_IDENTIFIER_VALUE\");", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " const responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "d967f4c9-8e83-4930-97ab-ae4e122d8ca5", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "8717c840-c222-4f84-a880-45bc129f8382", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/RelatedPerson", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "RelatedPerson" + ] + }, + "description": "Example of an error response when the NHS number is missing" + }, + "response": [] + }, + { + "name": "Invalid identifier", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "var expectedResponseBody = {", + " \"issue\": [", + " {", + " \"code\": \"invalid\",", + " \"details\": {", + " \"coding\": [", + " {", + " \"code\": \"INVALID_IDENTIFIER_VALUE\",", + " \"display\": \"Provided value is invalid\",", + " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", + " \"version\": \"1\"", + " }", + " ]", + " },", + " \"diagnostics\": \"Not a valid NHS Number provided for the 'identifier' parameter\",", + " \"expression\": [", + " \"RelatedPerson.identifier\"", + " ],", + " \"severity\": \"error\"", + " }", + " ],", + " \"resourceType\": \"OperationOutcome\"", + "}", + "", + "const responseJson = pm.response.json();", + "", + "pm.test(\"Status code is 400\", function () {", + " pm.response.to.have.status(400);", + "});", + "", + "pm.test(\"Should have correct error response\", () => {", + " pm.expect(responseJson.issue[0].details.coding[0].code).to.eql(\"INVALID_IDENTIFIER_VALUE\");", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "d967f4c9-8e83-4930-97ab-ae4e122d8ca5", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "8717c840-c222-4f84-a880-45bc129f8382", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/RelatedPerson?identifier=900000000", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "RelatedPerson" + ], + "query": [ + { + "key": "identifier", + "value": "900000000" + } + ] + }, + "description": "Example of an error raised when the specified NHS number is not valid." + }, + "response": [] + }, + { + "name": "Invalid identifier system", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "var expectedResponseBody = {", + " \"issue\": [", + " {", + " \"code\": \"invalid\",", + " \"details\": {", + " \"coding\": [", + " {", + " \"code\": \"INVALID_IDENTIFIER_SYSTEM\",", + " \"display\": \"Invalid identifier system.\",", + " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", + " \"version\": \"1\"", + " }", + " ]", + " },", + " \"diagnostics\": \"The identifier system is not valid.\",", + " \"severity\": \"error\"", + " }", + " ],", + " \"resourceType\": \"OperationOutcome\"", + "}", + "", + "const responseJson = pm.response.json();", + "", + "pm.test(\"Status code is 400\", function () {", + " pm.response.to.have.status(400);", + "});", + "", + "pm.test(\"Should have correct error response\", () => {", + " pm.expect(responseJson.issue[0].details.coding[0].code).to.eql(\"INVALID_IDENTIFIER_SYSTEM\");", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "d967f4c9-8e83-4930-97ab-ae4e122d8ca5", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "8717c840-c222-4f84-a880-45bc129f8382", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/RelatedPerson?identifier=https://fhir.nhs.uk/Id/nhs-number|A730675929", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "RelatedPerson" + ], + "query": [ + { + "key": "identifier", + "value": "https://fhir.nhs.uk/Id/nhs-number|A730675929" + } + ] + }, + "description": "Example of an error response when the given NHS number uses a different identifier system" + }, + "response": [] + }, + { + "name": "Identifier not supported", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"issue\": [", + " {", + " \"code\": \"processing\",", + " \"details\": {", + " \"coding\": [", + " {", + " \"code\": \"INVALIDATED_RESOURCE\",", + " \"display\": \"Resource that has been marked as invalid was requested - invalid resources cannot be retrieved\",", + " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", + " \"version\": \"1\"", + " }", + " ]", + " },", + " \"diagnostics\": \"Resource that has been marked as invalid was requested - invalid resources cannot be retrieved\",", + " \"severity\": \"error\"", + " }", + " ],", + " \"resourceType\": \"OperationOutcome\"", + "};", + "", + "const responseJson = pm.response.json();", + "", + "pm.test(\"Status code is 404\", function () {", + " pm.response.to.have.status(404);", + "});", + "", + "pm.test(\"Should have correct error response\", () => {", + " pm.expect(responseJson.issue[0].details.coding[0].code).to.eql(\"INVALIDATED_RESOURCE\");", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "d967f4c9-8e83-4930-97ab-ae4e122d8ca5", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "8717c840-c222-4f84-a880-45bc129f8382", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/RelatedPerson?identifier=1000000001", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "RelatedPerson" + ], + "query": [ + { + "key": "identifier", + "value": "1000000001" + } + ] + }, + "description": "Example of an error response when the given NHS number is not supported by the sandbox" + }, + "response": [] + }, + { + "name": "No matching record", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"issue\": [", + " {", + " \"code\": \"processing\",", + " \"details\": {", + " \"coding\": [", + " {", + " \"code\": \"INVALIDATED_RESOURCE\",", + " \"display\": \"Resource that has been marked as invalid was requested - invalid resources cannot be retrieved\",", + " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", + " \"version\": \"1\"", + " }", + " ]", + " },", + " \"diagnostics\": \"Resource that has been marked as invalid was requested - invalid resources cannot be retrieved\",", + " \"severity\": \"error\"", + " }", + " ],", + " \"resourceType\": \"OperationOutcome\"", + "};", + "", + "const responseJson = pm.response.json();", + "", + "pm.test(\"Status code is 404\", function () {", + " pm.response.to.have.status(404);", + "});", + "", + "pm.test(\"Should have correct error response\", () => {", + " pm.expect(responseJson.issue[0].details.coding[0].code).to.eql(\"INVALIDATED_RESOURCE\");", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "X-Request-ID", + "value": "d967f4c9-8e83-4930-97ab-ae4e122d8ca5", + "type": "text" + }, + { + "key": "X-Correlation-ID", + "value": "8717c840-c222-4f84-a880-45bc129f8382", + "type": "text" + } + ], + "url": { + "raw": "{{api_base_url}}/RelatedPerson?identifier=9000000041", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "RelatedPerson" + ], + "query": [ + { + "key": "identifier", + "value": "9000000041" + } + ] + }, + "description": "Example of a response where the given NHS number does not have any validated relationships." + }, + "response": [] + } + ], + "description": "The GET Related Person endpoint retrieves candidate proxy relationships for a user with a given NHS Number.\n\nThis endpoint should NOT be used to retrieve proxy relationships; these should be queried from the `/Consent` endpoint.\n\nThis folder contains requests covering different scenarios of valid and invalid requests.\n\nFor more details, please refer to the [GET Related Person OAS page for the Validated Relationship Service on the NHS England website.](https://digital.nhs.uk/developer/api-catalogue/validated-relationship-service#get-/RelatedPerson)" + }, + { + "name": "Get proxy roles (Consent)", + "item": [ + { + "name": "Filtered proxy relationships by 'active' status include details", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"resourceType\": \"Bundle\",", + " \"timestamp\": \"2026-01-16T14:00:00+00:00\",", + " \"total\": 2,", + " \"type\": \"searchset\",", + " \"link\": [", + " {", + " \"relation\": \"self\",", + " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000017&status=active&_include=Consent:performer&_include=Consent:patient\"", + " }", + " ],", + " \"entry\": [", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/BE974742\",", + " \"resource\": {", + " \"resourceType\": \"RelatedPerson\",", + " \"id\": \"BE974742\",", + " \"identifier\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000017\"", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000017\"", + " }", + " },", + " \"relationship\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", + " \"code\": \"PRN\",", + " \"display\": \"parent\"", + " }", + " ]", + " },", + " {", + " \"coding\": [", + " {", + " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", + " \"code\": \"MTH\",", + " \"display\": \"mother\"", + " }", + " ]", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"include\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/A3CC67E2\",", + " \"resource\": {", + " \"resourceType\": \"Patient\",", + " \"id\": \"A3CC67E2\",", + " \"meta\": {", + " \"security\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\",", + " \"code\": \"P9\",", + " \"display\": \"High level verification (P9)\"", + " }", + " ]", + " },", + " \"identifier\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000009\"", + " }", + " ],", + " \"name\": [", + " {", + " \"use\": \"usual\",", + " \"period\": {", + " \"start\": \"2020-01-01\",", + " \"end\": \"2021-12-31\"", + " },", + " \"given\": [", + " \"Jane Marie Anne\"", + " ],", + " \"family\": \"Smith\",", + " \"prefix\": [", + " \"Mrs\"", + " ],", + " \"suffix\": [", + " \"MBE\",", + " \"PhD\"", + " ]", + " }", + " ],", + " \"birthDate\": \"2022-10-22\",", + " \"generalPractitioner\": [", + " {", + " \"identifier\": {", + " \"value\": \"ODS12345\",", + " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"include\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBCC67E9\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"BBCC67E9\",", + " \"status\": \"active\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ]", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", + " \"code\": \"INFA\",", + " \"display\": \"information access\"", + " }", + " ]", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000009\"", + " }", + " },", + " \"dateTime\": \"2024-07-21T17:32:28Z\",", + " \"policy\": [", + " {", + " \"authority\": \"https://www.england.nhs.uk\",", + " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", + " }", + " ],", + " \"provision\": {", + " \"type\": \"permit\",", + " \"actor\": [", + " {", + " \"reference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000017\"", + " }", + " },", + " \"role\": {", + " \"coding\": [", + " {", + " \"code\": \"parental-responsibility\",", + " \"display\": \"Parental responsibility\",", + " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"", + " }", + " ]", + " }", + " }", + " ],", + " \"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.grantee\",", + " \"valueReference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000017\"", + " }", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/RP974720\",", + " \"resource\": {", + " \"resourceType\": \"RelatedPerson\",", + " \"id\": \"RP974720\",", + " \"identifier\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000017\"", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000005\"", + " }", + " },", + " \"relationship\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\",", + " \"code\": \"Personal\",", + " \"display\": \"Personal relationship with the patient\"", + " }", + " ]", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"include\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/DFCC67F5\",", + " \"resource\": {", + " \"resourceType\": \"Patient\",", + " \"id\": \"DFCC67F5\",", + " \"meta\": {", + " \"security\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\",", + " \"code\": \"P9\",", + " \"display\": \"High level verification (P9)\"", + " }", + " ]", + " },", + " \"identifier\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000005\"", + " }", + " ],", + " \"name\": [", + " {", + " \"use\": \"usual\",", + " \"period\": {", + " \"start\": \"2020-01-01\",", + " \"end\": \"2021-12-31\"", + " },", + " \"given\": [", + " \"Sally\"", + " ],", + " \"family\": \"Evans\",", + " \"prefix\": [", + " \"Mrs\"", + " ]", + " }", + " ],", + " \"birthDate\": \"1995-10-22\",", + " \"generalPractitioner\": [", + " {", + " \"identifier\": {", + " \"value\": \"ODS12345\",", + " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"include\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/WWCC67T1\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"WWCC67T1\",", + " \"status\": \"active\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ]", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", + " \"code\": \"INFA\",", + " \"display\": \"information access\"", + " }", + " ]", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000005\"", + " }", + " },", + " \"dateTime\": \"2024-07-21T17:32:28Z\",", + " \"policy\": [", + " {", + " \"authority\": \"https://www.england.nhs.uk\",", + " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", + " }", + " ],", + " \"provision\": {", + " \"type\": \"permit\",", + " \"actor\": [", + " {", + " \"reference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000017\"", + " }", + " },", + " \"role\": {", + " \"coding\": [", + " {", + " \"code\": \"parental-responsibility\",", + " \"display\": \"Parental responsibility\",", + " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"", + " }", + " ]", + " }", + " }", + " ],", + " \"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.grantee\",", + " \"valueReference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000017\"", + " }", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " }", + " ]", + "}", + "", + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " const responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + }, + { + "listen": "prerequest", + "script": { + "exec": [ + "" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "protocolProfileBehavior": { + "disableBodyPruning": true + }, + "request": { + "method": "GET", + "header": [], + "body": { + "mode": "raw", + "raw": "", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9000000017&status=active&_include=Consent:performer&_include=Consent:patient", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9000000017" + }, + { + "key": "status", + "value": "active" + }, + { + "key": "_include", + "value": "Consent:performer" + }, + { + "key": "_include", + "value": "Consent:patient" + } + ] + } + }, + "response": [] + }, + { + "name": "Filtered proxy relationships by 'inactive' status", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"resourceType\": \"Bundle\",", + " \"timestamp\": \"2026-01-16T14:00:00+00:00\",", + " \"total\": 2,", + " \"type\": \"searchset\",", + " \"link\": [", + " {", + " \"relation\": \"self\",", + " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000017&status=inactive\"", + " }", + " ],", + " \"entry\": [", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/AATD11A1\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"AATD11A1\",", + " \"status\": \"inactive\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ]", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", + " \"code\": \"INFA\",", + " \"display\": \"information access\"", + " }", + " ]", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000006\"", + " }", + " },", + " \"dateTime\": \"2024-07-21T17:32:28Z\",", + " \"policy\": [", + " {", + " \"authority\": \"https://www.england.nhs.uk\",", + " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", + " }", + " ],", + " \"provision\": {", + " \"type\": \"permit\",", + " \"actor\": [", + " {", + " \"reference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000017\"", + " }", + " },", + " \"role\": {", + " \"coding\": [", + " {", + " \"code\": \"parental-responsibility\",", + " \"display\": \"Parental responsibility\",", + " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"", + " }", + " ]", + " }", + " }", + " ],", + " \"period\": {", + " \"end\": \"2026-02-11\",", + " \"start\": \"2025-02-11\"", + " }", + " },", + " \"extension\": [", + " {", + " \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",", + " \"valueCodeableConcept\": {", + " \"coding\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",", + " \"code\": \"ROLE_DEACTIVATED_END_DATE_REACHED\",", + " \"display\": \"End date reached\"", + " }", + " ]", + " }", + " },", + " {", + " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", + " \"valueReference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000017\"", + " }", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/ABCD12B3\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"ABCD12B3\",", + " \"status\": \"inactive\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ]", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", + " \"code\": \"INFA\",", + " \"display\": \"information access\"", + " }", + " ]", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000007\"", + " }", + " },", + " \"dateTime\": \"2024-07-21T17:32:28Z\",", + " \"policy\": [", + " {", + " \"authority\": \"https://www.england.nhs.uk\",", + " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", + " }", + " ],", + " \"provision\": {", + " \"type\": \"permit\",", + " \"actor\": [", + " {", + " \"reference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000017\"", + " }", + " },", + " \"role\": {", + " \"coding\": [", + " {", + " \"code\": \"parental-responsibility\",", + " \"display\": \"Parental responsibility\",", + " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"", + " }", + " ]", + " }", + " }", + " ],", + " \"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.grantee\",", + " \"valueReference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000017\"", + " }", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " }", + " ]", + "}", + "", + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " const responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + }, + { + "listen": "prerequest", + "script": { + "exec": [ + "" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9000000017&status=inactive", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9000000017" + }, + { + "key": "status", + "value": "inactive" + } + ] + } + }, + "response": [] + }, + { + "name": "Filtered proxy relationships by 'proposed' and 'active' status", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"resourceType\": \"Bundle\",", + " \"timestamp\": \"2026-01-16T14:00:00+00:00\",", + " \"total\": 4,", + " \"type\": \"searchset\",", + " \"link\": [", + " {", + " \"relation\": \"self\",", + " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000017&status=proposed&status=active&_include=Consent:patient\"", + " }", + " ],", + " \"entry\": [", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBCC67E9\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"BBCC67E9\",", + " \"status\": \"active\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ]", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", + " \"code\": \"INFA\",", + " \"display\": \"information access\"", + " }", + " ]", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000009\"", + " }", + " },", + " \"dateTime\": \"2024-07-21T17:32:28Z\",", + " \"policy\": [", + " {", + " \"authority\": \"https://www.england.nhs.uk\",", + " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", + " }", + " ],", + " \"provision\": {", + " \"type\": \"permit\",", + " \"actor\": [", + " {", + " \"reference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000017\"", + " }", + " },", + " \"role\": {", + " \"coding\": [", + " {", + " \"code\": \"parental-responsibility\",", + " \"display\": \"Parental responsibility\",", + " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"", + " }", + " ]", + " }", + " }", + " ],", + " \"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.grantee\",", + " \"valueReference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000017\"", + " }", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/WWCC67T1\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"WWCC67T1\",", + " \"status\": \"active\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ]", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", + " \"code\": \"INFA\",", + " \"display\": \"information access\"", + " }", + " ]", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000005\"", + " }", + " },", + " \"dateTime\": \"2024-07-21T17:32:28Z\",", + " \"policy\": [", + " {", + " \"authority\": \"https://www.england.nhs.uk\",", + " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", + " }", + " ],", + " \"provision\": {", + " \"type\": \"permit\",", + " \"actor\": [", + " {", + " \"reference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000017\"", + " }", + " },", + " \"role\": {", + " \"coding\": [", + " {", + " \"code\": \"parental-responsibility\",", + " \"display\": \"Parental responsibility\",", + " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"", + " }", + " ]", + " }", + " }", + " ],", + " \"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.grantee\",", + " \"valueReference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000017\"", + " }", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBGY55L2\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"BBGY55L2\",", + " \"status\": \"proposed\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ]", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", + " \"code\": \"INFA\",", + " \"display\": \"information access\"", + " }", + " ]", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000020\"", + " }", + " },", + " \"dateTime\": \"2024-07-21T17:32:28Z\",", + " \"policy\": [", + " {", + " \"authority\": \"https://www.england.nhs.uk\",", + " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", + " }", + " ],", + " \"provision\": {", + " \"type\": \"permit\",", + " \"actor\": [", + " {", + " \"reference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000017\"", + " }", + " },", + " \"role\": {", + " \"coding\": [", + " {", + " \"code\": \"parental-responsibility\",", + " \"display\": \"Parental responsibility\",", + " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"", + " }", + " ]", + " }", + " }", + " ],", + " \"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\": \"APPLICATION_SUBMITTED\",", + " \"display\": \"Application submitted online\"", + " }", + " ]", + " }", + " },", + " {", + " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", + " \"valueReference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000017\"", + " }", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/EFGH12C5\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"EFGH12C5\",", + " \"status\": \"proposed\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ]", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", + " \"code\": \"INFA\",", + " \"display\": \"information access\"", + " }", + " ]", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000021\"", + " }", + " },", + " \"dateTime\": \"2024-07-21T17:32:28Z\",", + " \"policy\": [", + " {", + " \"authority\": \"https://www.england.nhs.uk\",", + " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", + " }", + " ],", + " \"provision\": {", + " \"type\": \"permit\",", + " \"actor\": [", + " {", + " \"reference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000017\"", + " }", + " },", + " \"role\": {", + " \"coding\": [", + " {", + " \"code\": \"parental-responsibility\",", + " \"display\": \"Parental responsibility\",", + " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"", + " }", + " ]", + " }", + " }", + " ],", + " \"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\": \"APPLICATION_SUBMITTED\",", + " \"display\": \"Application submitted online\"", + " }", + " ]", + " }", + " },", + " {", + " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", + " \"valueReference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000017\"", + " }", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " }", + " ]", + "}", + "", + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " const responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9000000017&status=proposed&status=active&_include=Consent:patient", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9000000017" + }, + { + "key": "status", + "value": "proposed" + }, + { + "key": "status", + "value": "active" + }, + { + "key": "_include", + "value": "Consent:patient" + } + ] + } + }, + "response": [] + }, + { + "name": "Multiple proxy relationships", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"resourceType\": \"Bundle\",", + " \"timestamp\": \"2026-01-16T14:00:00+00:00\",", + " \"total\": 3,", + " \"type\": \"searchset\",", + " \"link\": [", + " {", + " \"relation\": \"self\",", + " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000022\"", + " }", + " ],", + " \"entry\": [", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBCC67E9\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"BBCC67E9\",", + " \"status\": \"active\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ]", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", + " \"code\": \"INFA\",", + " \"display\": \"information access\"", + " }", + " ]", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000009\"", + " }", + " },", + " \"dateTime\": \"2024-07-21T17:32:28Z\",", + " \"policy\": [", + " {", + " \"authority\": \"https://www.england.nhs.uk\",", + " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", + " }", + " ],", + " \"provision\": {", + " \"type\": \"permit\",", + " \"actor\": [", + " {", + " \"reference\": {", + " \"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\"", + " }", + " },", + " \"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.grantee\",", + " \"valueReference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000022\"", + " }", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/WWCC67T1\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"WWCC67T1\",", + " \"status\": \"active\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ]", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", + " \"code\": \"INFA\",", + " \"display\": \"information access\"", + " }", + " ]", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000005\"", + " }", + " },", + " \"dateTime\": \"2024-07-21T17:32:28Z\",", + " \"policy\": [", + " {", + " \"authority\": \"https://www.england.nhs.uk\",", + " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", + " }", + " ],", + " \"provision\": {", + " \"type\": \"permit\",", + " \"actor\": [", + " {", + " \"reference\": {", + " \"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\"", + " }", + " },", + " \"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.grantee\",", + " \"valueReference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000022\"", + " }", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/AATD11A1\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"AATD11A1\",", + " \"status\": \"inactive\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ]", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", + " \"code\": \"INFA\",", + " \"display\": \"information access\"", + " }", + " ]", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000006\"", + " }", + " },", + " \"dateTime\": \"2024-07-21T17:32:28Z\",", + " \"policy\": [", + " {", + " \"authority\": \"https://www.england.nhs.uk\",", + " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", + " }", + " ],", + " \"provision\": {", + " \"type\": \"permit\",", + " \"actor\": [", + " {", + " \"reference\": {", + " \"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\"", + " }", + " },", + " \"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.grantee\",", + " \"valueReference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000022\"", + " }", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " }", + " ]", + "}", + "", + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " const responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9000000022", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9000000022" + } + ] + } + }, + "response": [] + }, + { + "name": "Multiple proxy relationships include patient", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"resourceType\": \"Bundle\",", + " \"timestamp\": \"2026-01-16T14:00:00+00:00\",", + " \"total\": 3,", + " \"type\": \"searchset\",", + " \"link\": [", + " {", + " \"relation\": \"self\",", + " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000022&_include=Consent:patient\"", + " }", + " ],", + " \"entry\": [", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/A3CC67E2\",", + " \"resource\": {", + " \"resourceType\": \"Patient\",", + " \"id\": \"A3CC67E2\",", + " \"meta\": {", + " \"security\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\",", + " \"code\": \"P9\",", + " \"display\": \"High level verification (P9)\"", + " }", + " ]", + " },", + " \"identifier\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000009\"", + " }", + " ],", + " \"name\": [", + " {", + " \"use\": \"usual\",", + " \"period\": {", + " \"start\": \"2020-01-01\",", + " \"end\": \"2021-12-31\"", + " },", + " \"given\": [", + " \"Jane Marie Anne\"", + " ],", + " \"family\": \"Smith\",", + " \"prefix\": [", + " \"Mrs\"", + " ],", + " \"suffix\": [", + " \"MBE\",", + " \"PhD\"", + " ]", + " }", + " ],", + " \"birthDate\": \"2022-10-22\",", + " \"generalPractitioner\": [", + " {", + " \"identifier\": {", + " \"value\": \"ODS12345\",", + " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"include\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBCC67E9\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"BBCC67E9\",", + " \"status\": \"active\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ]", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", + " \"code\": \"INFA\",", + " \"display\": \"information access\"", + " }", + " ]", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000009\"", + " }", + " },", + " \"dateTime\": \"2024-07-21T17:32:28Z\",", + " \"policy\": [", + " {", + " \"authority\": \"https://www.england.nhs.uk\",", + " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", + " }", + " ],", + " \"provision\": {", + " \"type\": \"permit\",", + " \"actor\": [", + " {", + " \"reference\": {", + " \"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\"", + " }", + " },", + " \"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.grantee\",", + " \"valueReference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000022\"", + " }", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/DFCC67F5\",", + " \"resource\": {", + " \"resourceType\": \"Patient\",", + " \"id\": \"DFCC67F5\",", + " \"meta\": {", + " \"security\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\",", + " \"code\": \"P9\",", + " \"display\": \"High level verification (P9)\"", + " }", + " ]", + " },", + " \"identifier\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000005\"", + " }", + " ],", + " \"name\": [", + " {", + " \"use\": \"usual\",", + " \"period\": {", + " \"start\": \"2020-01-01\",", + " \"end\": \"2021-12-31\"", + " },", + " \"given\": [", + " \"Sally\"", + " ],", + " \"family\": \"Evans\",", + " \"prefix\": [", + " \"Mrs\"", + " ]", + " }", + " ],", + " \"birthDate\": \"1995-10-22\",", + " \"generalPractitioner\": [", + " {", + " \"identifier\": {", + " \"value\": \"ODS12345\",", + " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"include\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/WWCC67T1\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"WWCC67T1\",", + " \"status\": \"active\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ]", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", + " \"code\": \"INFA\",", + " \"display\": \"information access\"", + " }", + " ]", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000005\"", + " }", + " },", + " \"dateTime\": \"2024-07-21T17:32:28Z\",", + " \"policy\": [", + " {", + " \"authority\": \"https://www.england.nhs.uk\",", + " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", + " }", + " ],", + " \"provision\": {", + " \"type\": \"permit\",", + " \"actor\": [", + " {", + " \"reference\": {", + " \"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\"", + " }", + " },", + " \"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.grantee\",", + " \"valueReference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000022\"", + " }", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/ZPTT32T3\",", + " \"resource\": {", + " \"resourceType\": \"Patient\",", + " \"id\": \"ZPTT32T3\",", + " \"meta\": {", + " \"security\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\",", + " \"code\": \"P9\",", + " \"display\": \"High level verification (P9)\"", + " }", + " ]", + " },", + " \"identifier\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000006\"", + " }", + " ],", + " \"name\": [", + " {", + " \"use\": \"usual\",", + " \"period\": {", + " \"start\": \"2020-01-01\",", + " \"end\": \"2021-12-31\"", + " },", + " \"given\": [", + " \"Michael\"", + " ],", + " \"family\": \"Percy\",", + " \"prefix\": [", + " \"Mr\"", + " ]", + " }", + " ],", + " \"birthDate\": \"1991-1-13\",", + " \"generalPractitioner\": [", + " {", + " \"identifier\": {", + " \"value\": \"ODS12345\",", + " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"include\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/AATD11A1\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"AATD11A1\",", + " \"status\": \"inactive\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ]", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", + " \"code\": \"INFA\",", + " \"display\": \"information access\"", + " }", + " ]", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000006\"", + " }", + " },", + " \"dateTime\": \"2024-07-21T17:32:28Z\",", + " \"policy\": [", + " {", + " \"authority\": \"https://www.england.nhs.uk\",", + " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", + " }", + " ],", + " \"provision\": {", + " \"type\": \"permit\",", + " \"actor\": [", + " {", + " \"reference\": {", + " \"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\"", + " }", + " },", + " \"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.grantee\",", + " \"valueReference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000022\"", + " }", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " }", + " ]", + "}", + "", + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " const responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9000000022&_include=Consent:patient", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9000000022" + }, + { + "key": "_include", + "value": "Consent:patient" + } + ] + } + }, + "response": [] + }, + { + "name": "Multiple proxy relationships include performer", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"resourceType\": \"Bundle\",", + " \"timestamp\": \"2026-01-16T14:00:00+00:00\",", + " \"total\": 3,", + " \"type\": \"searchset\",", + " \"link\": [", + " {", + " \"relation\": \"self\",", + " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000022&_include=Consent:performer\"", + " }", + " ],", + " \"entry\": [", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/BE974742\",", + " \"resource\": {", + " \"resourceType\": \"RelatedPerson\",", + " \"id\": \"BE974742\",", + " \"identifier\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000022\"", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000009\"", + " }", + " },", + " \"relationship\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", + " \"code\": \"PRN\",", + " \"display\": \"parent\"", + " }", + " ]", + " },", + " {", + " \"coding\": [", + " {", + " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", + " \"code\": \"MTH\",", + " \"display\": \"mother\"", + " }", + " ]", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"include\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBCC67E9\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"BBCC67E9\",", + " \"status\": \"active\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ]", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", + " \"code\": \"INFA\",", + " \"display\": \"information access\"", + " }", + " ]", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000009\"", + " }", + " },", + " \"dateTime\": \"2024-07-21T17:32:28Z\",", + " \"policy\": [", + " {", + " \"authority\": \"https://www.england.nhs.uk\",", + " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", + " }", + " ],", + " \"provision\": {", + " \"type\": \"permit\",", + " \"actor\": [", + " {", + " \"reference\": {", + " \"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\"", + " }", + " },", + " \"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.grantee\",", + " \"valueReference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000022\"", + " }", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/RP974720\",", + " \"resource\": {", + " \"resourceType\": \"RelatedPerson\",", + " \"id\": \"RP974720\",", + " \"identifier\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000022\"", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000005\"", + " }", + " },", + " \"relationship\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\",", + " \"code\": \"Personal\",", + " \"display\": \"Personal relationship with the patient\"", + " }", + " ]", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"include\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/WWCC67T1\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"WWCC67T1\",", + " \"status\": \"active\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ]", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", + " \"code\": \"INFA\",", + " \"display\": \"information access\"", + " }", + " ]", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000005\"", + " }", + " },", + " \"dateTime\": \"2024-07-21T17:32:28Z\",", + " \"policy\": [", + " {", + " \"authority\": \"https://www.england.nhs.uk\",", + " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", + " }", + " ],", + " \"provision\": {", + " \"type\": \"permit\",", + " \"actor\": [", + " {", + " \"reference\": {", + " \"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\"", + " }", + " },", + " \"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.grantee\",", + " \"valueReference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000022\"", + " }", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/AATD11A1\",", + " \"resource\": {", + " \"resourceType\": \"RelatedPerson\",", + " \"id\": \"AATD11A1\",", + " \"identifier\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000022\"", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000006\"", + " }", + " },", + " \"relationship\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\",", + " \"code\": \"Personal\",", + " \"display\": \"Personal relationship with the patient\"", + " }", + " ]", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"include\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/AATD11A1\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"AATD11A1\",", + " \"status\": \"inactive\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ]", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", + " \"code\": \"INFA\",", + " \"display\": \"information access\"", + " }", + " ]", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000006\"", + " }", + " },", + " \"dateTime\": \"2024-07-21T17:32:28Z\",", + " \"policy\": [", + " {", + " \"authority\": \"https://www.england.nhs.uk\",", + " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", + " }", + " ],", + " \"provision\": {", + " \"type\": \"permit\",", + " \"actor\": [", + " {", + " \"reference\": {", + " \"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\"", + " }", + " },", + " \"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.grantee\",", + " \"valueReference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000022\"", + " }", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " }", + " ]", + "}", + "", + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " const responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9000000022&_include=Consent:performer", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9000000022" + }, + { + "key": "_include", + "value": "Consent:performer" + } + ] + } + }, + "response": [] + }, + { + "name": "Multiple proxy relationships include performer and patient", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"resourceType\": \"Bundle\",", + " \"timestamp\": \"2026-01-18T14:00:00+00:00\",", + " \"total\": 3,", + " \"type\": \"searchset\",", + " \"link\": [", + " {", + " \"relation\": \"self\",", + " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000022&_include=Consent:performer&_include=Consent:patient\"", + " }", + " ],", + " \"entry\": [", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/BE974742\",", + " \"resource\": {", + " \"resourceType\": \"RelatedPerson\",", + " \"id\": \"BE974742\",", + " \"identifier\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000022\"", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000009\"", + " }", + " },", + " \"relationship\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", + " \"code\": \"PRN\",", + " \"display\": \"parent\"", + " }", + " ]", + " },", + " {", + " \"coding\": [", + " {", + " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", + " \"code\": \"MTH\",", + " \"display\": \"mother\"", + " }", + " ]", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"include\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/A3CC67E2\",", + " \"resource\": {", + " \"resourceType\": \"Patient\",", + " \"id\": \"A3CC67E2\",", + " \"meta\": {", + " \"security\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\",", + " \"code\": \"P9\",", + " \"display\": \"High level verification (P9)\"", + " }", + " ]", + " },", + " \"identifier\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000009\"", + " }", + " ],", + " \"name\": [", + " {", + " \"use\": \"usual\",", + " \"period\": {", + " \"start\": \"2020-01-01\",", + " \"end\": \"2021-12-31\"", + " },", + " \"given\": [", + " \"Jane Marie Anne\"", + " ],", + " \"family\": \"Smith\",", + " \"prefix\": [", + " \"Mrs\"", + " ],", + " \"suffix\": [", + " \"MBE\",", + " \"PhD\"", + " ]", + " }", + " ],", + " \"birthDate\": \"2022-10-22\",", + " \"generalPractitioner\": [", + " {", + " \"identifier\": {", + " \"value\": \"ODS12345\",", + " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"include\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBCC67E9\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"BBCC67E9\",", + " \"status\": \"active\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ]", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", + " \"code\": \"INFA\",", + " \"display\": \"information access\"", + " }", + " ]", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000009\"", + " }", + " },", + " \"dateTime\": \"2024-07-21T17:32:28Z\",", + " \"policy\": [", + " {", + " \"authority\": \"https://www.england.nhs.uk\",", + " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", + " }", + " ],", + " \"provision\": {", + " \"type\": \"permit\",", + " \"actor\": [", + " {", + " \"reference\": {", + " \"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\"", + " }", + " },", + " \"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.grantee\",", + " \"valueReference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000022\"", + " }", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/RP974720\",", + " \"resource\": {", + " \"resourceType\": \"RelatedPerson\",", + " \"id\": \"RP974720\",", + " \"identifier\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000022\"", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000005\"", + " }", + " },", + " \"relationship\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\",", + " \"code\": \"Personal\",", + " \"display\": \"Personal relationship with the patient\"", + " }", + " ]", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"include\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/DFCC67F5\",", + " \"resource\": {", + " \"resourceType\": \"Patient\",", + " \"id\": \"DFCC67F5\",", + " \"meta\": {", + " \"security\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\",", + " \"code\": \"P9\",", + " \"display\": \"High level verification (P9)\"", + " }", + " ]", + " },", + " \"identifier\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000005\"", + " }", + " ],", + " \"name\": [", + " {", + " \"use\": \"usual\",", + " \"period\": {", + " \"start\": \"2020-01-01\",", + " \"end\": \"2021-12-31\"", + " },", + " \"given\": [", + " \"Sally\"", + " ],", + " \"family\": \"Evans\",", + " \"prefix\": [", + " \"Mrs\"", + " ]", + " }", + " ],", + " \"birthDate\": \"1995-10-22\",", + " \"generalPractitioner\": [", + " {", + " \"identifier\": {", + " \"value\": \"ODS12345\",", + " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"include\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/WWCC67T1\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"WWCC67T1\",", + " \"status\": \"active\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ]", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", + " \"code\": \"INFA\",", + " \"display\": \"information access\"", + " }", + " ]", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000005\"", + " }", + " },", + " \"dateTime\": \"2024-07-21T17:32:28Z\",", + " \"policy\": [", + " {", + " \"authority\": \"https://www.england.nhs.uk\",", + " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", + " }", + " ],", + " \"provision\": {", + " \"type\": \"permit\",", + " \"actor\": [", + " {", + " \"reference\": {", + " \"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\"", + " }", + " },", + " \"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.grantee\",", + " \"valueReference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000022\"", + " }", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/AATD11A1\",", + " \"resource\": {", + " \"resourceType\": \"RelatedPerson\",", + " \"id\": \"AATD11A1\",", + " \"identifier\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000022\"", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000006\"", + " }", + " },", + " \"relationship\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\",", + " \"code\": \"Personal\",", + " \"display\": \"Personal relationship with the patient\"", + " }", + " ]", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"include\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/ZPTT32T3\",", + " \"resource\": {", + " \"resourceType\": \"Patient\",", + " \"id\": \"ZPTT32T3\",", + " \"meta\": {", + " \"security\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\",", + " \"code\": \"P9\",", + " \"display\": \"High level verification (P9)\"", + " }", + " ]", + " },", + " \"identifier\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000006\"", + " }", + " ],", + " \"name\": [", + " {", + " \"use\": \"usual\",", + " \"period\": {", + " \"start\": \"2020-01-01\",", + " \"end\": \"2021-12-31\"", + " },", + " \"given\": [", + " \"Michael\"", + " ],", + " \"family\": \"Percy\",", + " \"prefix\": [", + " \"Mr\"", + " ]", + " }", + " ],", + " \"birthDate\": \"1991-1-13\",", + " \"generalPractitioner\": [", + " {", + " \"identifier\": {", + " \"value\": \"ODS12345\",", + " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"include\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/AATD11A1\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"AATD11A1\",", + " \"status\": \"inactive\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ]", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", + " \"code\": \"INFA\",", + " \"display\": \"information access\"", + " }", + " ]", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000006\"", + " }", + " },", + " \"dateTime\": \"2024-07-21T17:32:28Z\",", + " \"policy\": [", + " {", + " \"authority\": \"https://www.england.nhs.uk\",", + " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", + " }", + " ],", + " \"provision\": {", + " \"type\": \"permit\",", + " \"actor\": [", + " {", + " \"reference\": {", + " \"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\"", + " }", + " },", + " \"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.grantee\",", + " \"valueReference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000022\"", + " }", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " }", + " ]", + "}", + "", + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " const responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9000000022&_include=Consent:performer&_include=Consent:patient", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9000000022" + }, + { + "key": "_include", + "value": "Consent:performer" + }, + { + "key": "_include", + "value": "Consent:patient" + } + ] + } + }, + "response": [] + }, + { + "name": "Multiple proxy relationships single patient", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"resourceType\": \"Bundle\",", + " \"timestamp\": \"2026-01-16T14:00:00+00:00\",", + " \"total\": 3,", + " \"type\": \"searchset\",", + " \"link\": [", + " {", + " \"relation\": \"self\",", + " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?patient:identifier=9000000100\"", + " }", + " ],", + " \"entry\": [", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBCC67E9\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"BBCC67E9\",", + " \"status\": \"active\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ]", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", + " \"code\": \"INFA\",", + " \"display\": \"information access\"", + " }", + " ]", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000100\"", + " }", + " },", + " \"dateTime\": \"2024-07-21T17:32:28Z\",", + " \"policy\": [", + " {", + " \"authority\": \"https://www.england.nhs.uk\",", + " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", + " }", + " ],", + " \"provision\": {", + " \"type\": \"permit\",", + " \"actor\": [", + " {", + " \"reference\": {", + " \"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\"", + " }", + " },", + " \"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.grantee\",", + " \"valueReference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000020\"", + " }", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/WWCC67T1\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"WWCC67T1\",", + " \"status\": \"active\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ]", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", + " \"code\": \"INFA\",", + " \"display\": \"information access\"", + " }", + " ]", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000100\"", + " }", + " },", + " \"dateTime\": \"2024-07-21T17:32:28Z\",", + " \"policy\": [", + " {", + " \"authority\": \"https://www.england.nhs.uk\",", + " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", + " }", + " ],", + " \"provision\": {", + " \"type\": \"permit\",", + " \"actor\": [", + " {", + " \"reference\": {", + " \"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\"", + " }", + " },", + " \"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.grantee\",", + " \"valueReference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000021\"", + " }", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/AATD11A1\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"AATD11A1\",", + " \"status\": \"inactive\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ]", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", + " \"code\": \"INFA\",", + " \"display\": \"information access\"", + " }", + " ]", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000100\"", + " }", + " },", + " \"dateTime\": \"2024-07-21T17:32:28Z\",", + " \"policy\": [", + " {", + " \"authority\": \"https://www.england.nhs.uk\",", + " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", + " }", + " ],", + " \"provision\": {", + " \"type\": \"permit\",", + " \"actor\": [", + " {", + " \"reference\": {", + " \"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\"", + " }", + " },", + " \"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.grantee\",", + " \"valueReference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000022\"", + " }", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " }", + " ]", + "}", + "", + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " const responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{api_base_url}}/Consent?patient:identifier=9000000100", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "patient:identifier", + "value": "9000000100" + } + ] + } + }, + "response": [] + }, + { + "name": "Multiple proxy relationships single patient include performer and patient", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"resourceType\": \"Bundle\",", + " \"timestamp\": \"2026-01-16T14:00:00+00:00\",", + " \"total\": 3,", + " \"type\": \"searchset\",", + " \"link\": [", + " {", + " \"relation\": \"self\",", + " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?patient:identifier=9000000100&_include=Consent:performer&_include=Consent:patient\"", + " }", + " ],", + " \"entry\": [", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/A3CC67E2\",", + " \"resource\": {", + " \"resourceType\": \"Patient\",", + " \"id\": \"A3CC67E2\",", + " \"meta\": {", + " \"security\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\",", + " \"code\": \"P9\",", + " \"display\": \"High level verification (P9)\"", + " }", + " ]", + " },", + " \"identifier\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000100\"", + " }", + " ],", + " \"name\": [", + " {", + " \"use\": \"usual\",", + " \"period\": {", + " \"start\": \"2020-01-01\",", + " \"end\": \"2021-12-31\"", + " },", + " \"given\": [", + " \"Samantha\"", + " ],", + " \"family\": \"Adams\",", + " \"prefix\": [", + " \"Miss\"", + " ]", + " }", + " ],", + " \"birthDate\": \"1963-11-02\",", + " \"generalPractitioner\": [", + " {", + " \"identifier\": {", + " \"value\": \"ODS12345\",", + " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"include\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/BE974742\",", + " \"resource\": {", + " \"resourceType\": \"RelatedPerson\",", + " \"id\": \"BE974742\",", + " \"identifier\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000020\"", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000100\"", + " }", + " },", + " \"relationship\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", + " \"code\": \"PRN\",", + " \"display\": \"parent\"", + " }", + " ]", + " },", + " {", + " \"coding\": [", + " {", + " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", + " \"code\": \"MTH\",", + " \"display\": \"mother\"", + " }", + " ]", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"include\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBCC67E9\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"BBCC67E9\",", + " \"status\": \"active\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ]", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", + " \"code\": \"INFA\",", + " \"display\": \"information access\"", + " }", + " ]", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000100\"", + " }", + " },", + " \"dateTime\": \"2024-07-21T17:32:28Z\",", + " \"policy\": [", + " {", + " \"authority\": \"https://www.england.nhs.uk\",", + " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", + " }", + " ],", + " \"provision\": {", + " \"type\": \"permit\",", + " \"actor\": [", + " {", + " \"reference\": {", + " \"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\"", + " }", + " },", + " \"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.grantee\",", + " \"valueReference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000020\"", + " }", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/BE974742\",", + " \"resource\": {", + " \"resourceType\": \"RelatedPerson\",", + " \"id\": \"BE974742\",", + " \"identifier\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000021\"", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000100\"", + " }", + " },", + " \"relationship\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", + " \"code\": \"Personal\",", + " \"display\": \"Personal relationship with the patient\"", + " }", + " ]", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"include\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/WWCC67T1\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"WWCC67T1\",", + " \"status\": \"active\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ]", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", + " \"code\": \"INFA\",", + " \"display\": \"information access\"", + " }", + " ]", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000100\"", + " }", + " },", + " \"dateTime\": \"2024-07-21T17:32:28Z\",", + " \"policy\": [", + " {", + " \"authority\": \"https://www.england.nhs.uk\",", + " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", + " }", + " ],", + " \"provision\": {", + " \"type\": \"permit\",", + " \"actor\": [", + " {", + " \"reference\": {", + " \"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\"", + " }", + " },", + " \"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.grantee\",", + " \"valueReference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000021\"", + " }", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/BE974742\",", + " \"resource\": {", + " \"resourceType\": \"RelatedPerson\",", + " \"id\": \"BE974742\",", + " \"identifier\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000022\"", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000100\"", + " }", + " },", + " \"relationship\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", + " \"code\": \"Personal\",", + " \"display\": \"Personal relationship with the patient\"", + " }", + " ]", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"include\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/AATD11A1\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"AATD11A1\",", + " \"status\": \"inactive\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ]", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", + " \"code\": \"INFA\",", + " \"display\": \"information access\"", + " }", + " ]", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000100\"", + " }", + " },", + " \"dateTime\": \"2024-07-21T17:32:28Z\",", + " \"policy\": [", + " {", + " \"authority\": \"https://www.england.nhs.uk\",", + " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", + " }", + " ],", + " \"provision\": {", + " \"type\": \"permit\",", + " \"actor\": [", + " {", + " \"reference\": {", + " \"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\"", + " }", + " },", + " \"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.grantee\",", + " \"valueReference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000022\"", + " }", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " }", + " ]", + "}", + "", + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " const responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{api_base_url}}/Consent?patient:identifier=9000000100&_include=Consent:performer&_include=Consent:patient", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "patient:identifier", + "value": "9000000100" + }, + { + "key": "_include", + "value": "Consent:performer" + }, + { + "key": "_include", + "value": "Consent:patient" + } + ] + } + }, + "response": [] + }, + { + "name": "Multiple proxy relationships single patient include performer", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"resourceType\": \"Bundle\",", + " \"timestamp\": \"2026-01-16T14:00:00+00:00\",", + " \"total\": 3,", + " \"type\": \"searchset\",", + " \"link\": [", + " {", + " \"relation\": \"self\",", + " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?patient:identifier=9000000100&_include=Consent:performer\"", + " }", + " ],", + " \"entry\": [", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/BE974742\",", + " \"resource\": {", + " \"resourceType\": \"RelatedPerson\",", + " \"id\": \"BE974742\",", + " \"identifier\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000020\"", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000100\"", + " }", + " },", + " \"relationship\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", + " \"code\": \"PRN\",", + " \"display\": \"parent\"", + " }", + " ]", + " },", + " {", + " \"coding\": [", + " {", + " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", + " \"code\": \"MTH\",", + " \"display\": \"mother\"", + " }", + " ]", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"include\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBCC67E9\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"BBCC67E9\",", + " \"status\": \"active\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ]", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", + " \"code\": \"INFA\",", + " \"display\": \"information access\"", + " }", + " ]", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000100\"", + " }", + " },", + " \"dateTime\": \"2024-07-21T17:32:28Z\",", + " \"policy\": [", + " {", + " \"authority\": \"https://www.england.nhs.uk\",", + " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", + " }", + " ],", + " \"provision\": {", + " \"type\": \"permit\",", + " \"actor\": [", + " {", + " \"reference\": {", + " \"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\"", + " }", + " },", + " \"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.grantee\",", + " \"valueReference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000020\"", + " }", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/BE974742\",", + " \"resource\": {", + " \"resourceType\": \"RelatedPerson\",", + " \"id\": \"BE974742\",", + " \"identifier\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000021\"", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000100\"", + " }", + " },", + " \"relationship\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", + " \"code\": \"Personal\",", + " \"display\": \"Personal relationship with the patient\"", + " }", + " ]", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"include\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/WWCC67T1\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"WWCC67T1\",", + " \"status\": \"active\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ]", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", + " \"code\": \"INFA\",", + " \"display\": \"information access\"", + " }", + " ]", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000100\"", + " }", + " },", + " \"dateTime\": \"2024-07-21T17:32:28Z\",", + " \"policy\": [", + " {", + " \"authority\": \"https://www.england.nhs.uk\",", + " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", + " }", + " ],", + " \"provision\": {", + " \"type\": \"permit\",", + " \"actor\": [", + " {", + " \"reference\": {", + " \"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\"", + " }", + " },", + " \"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.grantee\",", + " \"valueReference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000021\"", + " }", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/BE974742\",", + " \"resource\": {", + " \"resourceType\": \"RelatedPerson\",", + " \"id\": \"BE974742\",", + " \"identifier\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000022\"", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000100\"", + " }", + " },", + " \"relationship\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", + " \"code\": \"Personal\",", + " \"display\": \"Personal relationship with the patient\"", + " }", + " ]", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"include\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/AATD11A1\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"AATD11A1\",", + " \"status\": \"inactive\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ]", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", + " \"code\": \"INFA\",", + " \"display\": \"information access\"", + " }", + " ]", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000100\"", + " }", + " },", + " \"dateTime\": \"2024-07-21T17:32:28Z\",", + " \"policy\": [", + " {", + " \"authority\": \"https://www.england.nhs.uk\",", + " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", + " }", + " ],", + " \"provision\": {", + " \"type\": \"permit\",", + " \"actor\": [", + " {", + " \"reference\": {", + " \"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\"", + " }", + " },", + " \"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.grantee\",", + " \"valueReference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000022\"", + " }", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " }", + " ]", + "}", + "", + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " const responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{api_base_url}}/Consent?patient:identifier=9000000100&_include=Consent:performer", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "patient:identifier", + "value": "9000000100" + }, + { + "key": "_include", + "value": "Consent:performer" + } + ] + } + }, + "response": [] + }, + { + "name": "Multiple proxy relationships single patient include patient", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"resourceType\": \"Bundle\",", + " \"timestamp\": \"2026-01-16T14:00:00+00:00\",", + " \"total\": 3,", + " \"type\": \"searchset\",", + " \"link\": [", + " {", + " \"relation\": \"self\",", + " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?patient:identifier=9000000100&_include=Consent:patient\"", + " }", + " ],", + " \"entry\": [", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/A3CC67E2\",", + " \"resource\": {", + " \"resourceType\": \"Patient\",", + " \"id\": \"A3CC67E2\",", + " \"meta\": {", + " \"security\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\",", + " \"code\": \"P9\",", + " \"display\": \"High level verification (P9)\"", + " }", + " ]", + " },", + " \"identifier\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000100\"", + " }", + " ],", + " \"name\": [", + " {", + " \"use\": \"usual\",", + " \"period\": {", + " \"start\": \"2020-01-01\",", + " \"end\": \"2021-12-31\"", + " },", + " \"given\": [", + " \"Samantha\"", + " ],", + " \"family\": \"Adams\",", + " \"prefix\": [", + " \"Miss\"", + " ]", + " }", + " ],", + " \"birthDate\": \"1963-11-02\",", + " \"generalPractitioner\": [", + " {", + " \"identifier\": {", + " \"value\": \"ODS12345\",", + " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"include\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBCC67E9\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"BBCC67E9\",", + " \"status\": \"active\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ]", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", + " \"code\": \"INFA\",", + " \"display\": \"information access\"", + " }", + " ]", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000100\"", + " }", + " },", + " \"dateTime\": \"2024-07-21T17:32:28Z\",", + " \"policy\": [", + " {", + " \"authority\": \"https://www.england.nhs.uk\",", + " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", + " }", + " ],", + " \"provision\": {", + " \"type\": \"permit\",", + " \"actor\": [", + " {", + " \"reference\": {", + " \"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\"", + " }", + " },", + " \"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.grantee\",", + " \"valueReference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000020\"", + " }", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/WWCC67T1\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"WWCC67T1\",", + " \"status\": \"active\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ]", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", + " \"code\": \"INFA\",", + " \"display\": \"information access\"", + " }", + " ]", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000100\"", + " }", + " },", + " \"dateTime\": \"2024-07-21T17:32:28Z\",", + " \"policy\": [", + " {", + " \"authority\": \"https://www.england.nhs.uk\",", + " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", + " }", + " ],", + " \"provision\": {", + " \"type\": \"permit\",", + " \"actor\": [", + " {", + " \"reference\": {", + " \"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\"", + " }", + " },", + " \"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.grantee\",", + " \"valueReference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000021\"", + " }", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/AATD11A1\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"AATD11A1\",", + " \"status\": \"inactive\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ]", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", + " \"code\": \"INFA\",", + " \"display\": \"information access\"", + " }", + " ]", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000100\"", + " }", + " },", + " \"dateTime\": \"2024-07-21T17:32:28Z\",", + " \"policy\": [", + " {", + " \"authority\": \"https://www.england.nhs.uk\",", + " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", + " }", + " ],", + " \"provision\": {", + " \"type\": \"permit\",", + " \"actor\": [", + " {", + " \"reference\": {", + " \"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\"", + " }", + " },", + " \"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.grantee\",", + " \"valueReference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000022\"", + " }", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " }", + " ]", + "}", + "", + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " const responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{api_base_url}}/Consent?patient:identifier=9000000100&_include=Consent:patient", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "patient:identifier", + "value": "9000000100" + }, + { + "key": "_include", + "value": "Consent:patient" + } + ] + } + }, + "response": [] + }, + { + "name": "No relationships", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"resourceType\": \"Bundle\",", + " \"timestamp\": \"2026-01-16T14:00:00+00:00\",", + " \"total\": 0,", + " \"type\": \"searchset\",", + " \"link\": [", + " {", + " \"relation\": \"self\",", + " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000025&_include=Consent:performer&_include=Consent:patient\"", + " }", + " ],", + " \"entry\": []", + "}", + "", + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " const responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9000000025", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9000000025" + } + ] + } + }, + "response": [] + }, + { + "name": "Single consenting adult proxy relationship", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"resourceType\": \"Bundle\",", + " \"timestamp\": \"2026-01-16T14:00:00+00:00\",", + " \"total\": 1,", + " \"type\": \"searchset\",", + " \"link\": [", + " {", + " \"relation\": \"self\",", + " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000010\"", + " }", + " ],", + " \"entry\": [", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/WWCC67T1\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"WWCC67T1\",", + " \"status\": \"active\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ]", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", + " \"code\": \"INFA\",", + " \"display\": \"information access\"", + " }", + " ]", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000005\"", + " }", + " },", + " \"dateTime\": \"2024-07-21T17:32:28Z\",", + " \"policy\": [", + " {", + " \"authority\": \"https://www.england.nhs.uk\",", + " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", + " }", + " ],", + " \"provision\": {", + " \"type\": \"permit\",", + " \"actor\": [", + " {", + " \"reference\": {", + " \"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\"", + " }", + " },", + " \"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.grantee\",", + " \"valueReference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000010\"", + " }", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " }", + " ]", + "}", + "", + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " const responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9000000010", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9000000010" + } + ] + } + }, + "response": [] + }, + { + "name": "Single consenting adult proxy relationship include performer and patient", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"resourceType\": \"Bundle\",", + " \"timestamp\": \"2026-01-16T14:00:00+00:00\",", + " \"total\": 1,", + " \"type\": \"searchset\",", + " \"link\": [", + " {", + " \"relation\": \"self\",", + " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000010&_include=Consent:performer&_include=Consent:patient\"", + " }", + " ],", + " \"entry\": [", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/RP974720\",", + " \"resource\": {", + " \"resourceType\": \"RelatedPerson\",", + " \"id\": \"RP974720\",", + " \"identifier\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000010\"", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000005\"", + " }", + " },", + " \"relationship\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\",", + " \"code\": \"Personal\",", + " \"display\": \"Personal relationship with the patient\"", + " }", + " ]", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"include\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/DFCC67F5\",", + " \"resource\": {", + " \"resourceType\": \"Patient\",", + " \"id\": \"DFCC67F5\",", + " \"meta\": {", + " \"security\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\",", + " \"code\": \"P9\",", + " \"display\": \"High level verification (P9)\"", + " }", + " ]", + " },", + " \"identifier\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000005\"", + " }", + " ],", + " \"name\": [", + " {", + " \"use\": \"usual\",", + " \"period\": {", + " \"start\": \"2025-01-01\",", + " \"end\": \"2029-12-31\"", + " },", + " \"given\": [", + " \"Sally\"", + " ],", + " \"family\": \"Evans\",", + " \"prefix\": [", + " \"Mrs\"", + " ]", + " }", + " ],", + " \"birthDate\": \"1995-10-22\",", + " \"generalPractitioner\": [", + " {", + " \"identifier\": {", + " \"value\": \"ODS12345\",", + " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"include\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/WWCC67T1\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"WWCC67T1\",", + " \"status\": \"active\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ]", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", + " \"code\": \"INFA\",", + " \"display\": \"information access\"", + " }", + " ]", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000005\"", + " }", + " },", + " \"dateTime\": \"2024-07-21T17:32:28Z\",", + " \"policy\": [", + " {", + " \"authority\": \"https://www.england.nhs.uk\",", + " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", + " }", + " ],", + " \"provision\": {", + " \"type\": \"permit\",", + " \"actor\": [", + " {", + " \"reference\": {", + " \"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\"", + " }", + " },", + " \"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.grantee\",", + " \"valueReference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000010\"", + " }", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " }", + " ]", + "}", + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " const responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9000000010&_include=Consent:performer&_include=Consent:patient", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9000000010" + }, + { + "key": "_include", + "value": "Consent:performer" + }, + { + "key": "_include", + "value": "Consent:patient" + } + ] + } + }, + "response": [] + }, + { + "name": "Single mother-child relationship", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"resourceType\": \"Bundle\",", + " \"timestamp\": \"2026-01-16T14:00:00+00:00\",", + " \"total\": 1,", + " \"type\": \"searchset\",", + " \"link\": [", + " {", + " \"relation\": \"self\",", + " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000019\"", + " }", + " ],", + " \"entry\": [", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBCC67E9\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"BBCC67E9\",", + " \"status\": \"active\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ]", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", + " \"code\": \"INFA\",", + " \"display\": \"information access\"", + " }", + " ]", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000009\"", + " }", + " },", + " \"dateTime\": \"2024-07-21T17:32:28Z\",", + " \"policy\": [", + " {", + " \"authority\": \"https://www.england.nhs.uk\",", + " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", + " }", + " ],", + " \"provision\": {", + " \"type\": \"permit\",", + " \"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\"", + " }", + " ]", + " }", + " }", + " ],", + " \"period\": {", + " \"end\": \"2029-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.grantee\",", + " \"valueReference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000019\"", + " }", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " }", + " ]", + "}", + "", + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " const responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9000000019", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9000000019" + } + ] + } + }, + "response": [] + }, + { + "name": "Single mother-child relationship include performer and patient", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"resourceType\": \"Bundle\",", + " \"timestamp\": \"2026-01-16T14:00:00+00:00\",", + " \"total\": 1,", + " \"type\": \"searchset\",", + " \"link\": [", + " {", + " \"relation\": \"self\",", + " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000019&_include=Consent:performer&_include=Consent:patient\"", + " }", + " ],", + " \"entry\": [", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/BE974742\",", + " \"resource\": {", + " \"resourceType\": \"RelatedPerson\",", + " \"id\": \"BE974742\",", + " \"identifier\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000019\"", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000009\"", + " }", + " },", + " \"relationship\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", + " \"code\": \"PRN\",", + " \"display\": \"parent\"", + " }", + " ]", + " },", + " {", + " \"coding\": [", + " {", + " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", + " \"code\": \"MTH\",", + " \"display\": \"mother\"", + " }", + " ]", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"include\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/A3CC67E2\",", + " \"resource\": {", + " \"resourceType\": \"Patient\",", + " \"id\": \"A3CC67E2\",", + " \"meta\": {", + " \"security\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\",", + " \"code\": \"P9\",", + " \"display\": \"High level verification (P9)\"", + " }", + " ]", + " },", + " \"identifier\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000009\"", + " }", + " ],", + " \"name\": [", + " {", + " \"use\": \"usual\",", + " \"period\": {", + " \"start\": \"2025-01-01\",", + " \"end\": \"2029-12-31\"", + " },", + " \"given\": [", + " \"Jane Marie Anne\"", + " ],", + " \"family\": \"Smith\",", + " \"prefix\": [", + " \"Miss\"", + " ]", + " }", + " ],", + " \"birthDate\": \"2022-10-22\",", + " \"generalPractitioner\": [", + " {", + " \"identifier\": {", + " \"value\": \"ODS12345\",", + " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"include\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBCC67E9\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"BBCC67E9\",", + " \"status\": \"active\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ]", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", + " \"code\": \"INFA\",", + " \"display\": \"information access\"", + " }", + " ]", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000009\"", + " }", + " },", + " \"dateTime\": \"2024-07-21T17:32:28Z\",", + " \"policy\": [", + " {", + " \"authority\": \"https://www.england.nhs.uk\",", + " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", + " }", + " ],", + " \"provision\": {", + " \"type\": \"permit\",", + " \"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\"", + " }", + " ]", + " }", + " }", + " ],", + " \"period\": {", + " \"end\": \"2029-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.grantee\",", + " \"valueReference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000019\"", + " }", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " }", + " ]", + "}", + "", + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " const responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9000000019&_include=Consent:performer&_include=Consent:patient", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9000000019" + }, + { + "key": "_include", + "value": "Consent:performer" + }, + { + "key": "_include", + "value": "Consent:patient" + } + ] + } + }, + "response": [] + }, + { + "name": "Invalid status parameter", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"resourceType\": \"OperationOutcome\",", + " \"issue\": [", + " {", + " \"code\": \"invalid\",", + " \"details\": {", + " \"coding\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", + " \"version\": \"1\",", + " \"code\": \"INVALID_PARAMETER\",", + " \"display\": \"Required parameter(s) are invalid.\"", + " }", + " ]", + " },", + " \"diagnostics\": \"Invalid request with error - status parameter is invalid.\",", + " \"severity\": \"error\"", + " }", + " ]", + "}", + "", + "const responseJson = pm.response.json();", + "", + "pm.test(\"Status code is 422\", function () {", + " pm.response.to.have.status(422);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9000000017&status=test", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9000000017" + }, + { + "key": "status", + "value": "test" + } + ] + } + }, + "response": [] + }, + { + "name": "Invalid include parameter", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"resourceType\": \"OperationOutcome\",", + " \"issue\": [", + " {", + " \"code\": \"invalid\",", + " \"details\": {", + " \"coding\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", + " \"version\": \"1\",", + " \"code\": \"INVALID_PARAMETER\",", + " \"display\": \"Required parameter(s) are invalid.\"", + " }", + " ]", + " },", + " \"diagnostics\": \"Invalid request with error - _include parameter is invalid.\",", + " \"severity\": \"error\"", + " }", + " ]", + "}", + "", + "const responseJson = pm.response.json();", + "", + "pm.test(\"Status code is 422\", function () {", + " pm.response.to.have.status(422);", + "});", + "", + "pm.test(\"Should have correct error response\", () => {", + " pm.expect(responseJson.issue[0].details.coding[0].code).to.eql(\"INVALID_PARAMETER\");", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9000000019&_include=test", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9000000019" + }, + { + "key": "_include", + "value": "test" + } + ] + } + }, + "response": [] + }, + { + "name": "Single mother-child relationship unknown legal basis", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"resourceType\": \"Bundle\",", + " \"timestamp\": \"2026-01-16T14:00:00+00:00\",", + " \"total\": 1,", + " \"type\": \"searchset\",", + " \"link\": [", + " {", + " \"relation\": \"self\",", + " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000111\"", + " }", + " ],", + " \"entry\": [", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/AF974742\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"AF974742\",", + " \"status\": \"active\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ]", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", + " \"code\": \"INFA\",", + " \"display\": \"information access\"", + " }", + " ]", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000119\"", + " }", + " },", + " \"dateTime\": \"2024-07-21T17:32:28Z\",", + " \"policy\": [", + " {", + " \"authority\": \"https://www.england.nhs.uk\",", + " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\",", + " \"code\": \"unknown\",", + " \"display\": \"Unknown legal basis\"", + " }", + " ],", + " \"provision\": {", + " \"type\": \"permit\",", + " \"actor\": [", + " {", + " \"reference\": {", + " \"identifier\": {", + " \"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\"", + " }", + " },", + " \"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.grantee\",", + " \"valueReference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000111\"", + " }", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " }", + " ]", + "}", + "", + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " const responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9000000111", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9000000111" + } + ] + } + }, + "response": [] + }, + { + "name": "No performer record found", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"resourceType\": \"OperationOutcome\",", + " \"issue\": [", + " { ", + " \"code\": \"processing\",", + " \"details\": {", + " \"coding\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", + " \"version\": \"1\",", + " \"code\": \"INVALIDATED_RESOURCE\",", + " \"display\": \"Resource that has been marked as invalid was requested - invalid resources cannot be retrieved\"", + " }", + " ]", + " },", + " \"diagnostics\": \"Resource that has been marked as invalid was requested - invalid resources cannot be retrieved\",", + " \"severity\": \"error\",", + " ", + " }", + " ]", + "}", + "", + "const responseJson = pm.response.json();", + "", + "pm.test(\"Status code is 404\", function () {", + " pm.response.to.have.status(404);", + "});", + "", + "pm.test(\"Should have correct error response\", () => {", + " pm.expect(responseJson.issue[0].details.coding[0].code).to.eql(\"INVALIDATED_RESOURCE\");", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9000000999", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9000000999" + } + ] + } + }, + "response": [] + }, + { + "name": "Invalid performer identifier", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"issue\": [", + " {", + " \"code\": \"invalid\",", + " \"details\": {", + " \"coding\": [", + " {", + " \"code\": \"INVALID_IDENTIFIER_VALUE\",", + " \"display\": \"Required parameter(s) are invalid.\",", + " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", + " \"version\": \"1\"", + " }", + " ]", + " },", + " \"diagnostics\": \"Invalid request with error - performer:identifier or patient:identifier parameter is invalid.\",", + " \"severity\": \"error\"", + " }", + " ],", + " \"resourceType\": \"OperationOutcome\"", + "}", + "", + "const responseJson = pm.response.json();", + "", + "pm.test(\"Status code is 422\", function () {", + " pm.response.to.have.status(422);", + "});", + "", + "pm.test(\"Should have correct error response\", () => {", + " pm.expect(responseJson.issue[0].details.coding[0].code).to.eql(\"INVALID_IDENTIFIER_VALUE\");", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=90000009990", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "90000009990" + } + ] + } + }, + "response": [] + }, + { + "name": "Invalid performer identifier system", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"issue\": [", + " {", + " \"code\": \"invalid\",", + " \"details\": {", + " \"coding\": [", + " {", + " \"code\": \"INVALID_IDENTIFIER_SYSTEM\",", + " \"display\": \"Required parameter(s) are invalid.\",", + " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", + " \"version\": \"1\"", + " }", + " ]", + " },", + " \"diagnostics\": \"Invalid request with error - performer:identifier or patient:identifier system parameter is invalid.\",", + " \"severity\": \"error\"", + " }", + " ],", + " \"resourceType\": \"OperationOutcome\"", + "}", + "", + "const responseJson = pm.response.json();", + "", + "pm.test(\"Status code is 422\", function () {", + " pm.response.to.have.status(422);", + "});", + "", + "pm.test(\"Should have correct error response\", () => {", + " pm.expect(responseJson.issue[0].details.coding[0].code).to.eql(\"INVALID_IDENTIFIER_SYSTEM\");", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=https://fhir.nhs.uk/Id/nhs-number|1234567890", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "https://fhir.nhs.uk/Id/nhs-number|1234567890" + } + ] + } + }, + "response": [] + }, + { + "name": "Missing performer identifier value", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"issue\": [", + " {", + " \"code\": \"invalid\",", + " \"details\": {", + " \"coding\": [", + " {", + " \"code\": \"MISSING_IDENTIFIER_VALUE\",", + " \"display\": \"Required parameter(s) are missing.\",", + " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", + " \"version\": \"1\"", + " }", + " ]", + " },", + " \"diagnostics\": \"Invalid request with error - performer:identifier or patient:identifier parameter not found.\",", + " \"severity\": \"error\"", + " }", + " ],", + " \"resourceType\": \"OperationOutcome\"", + "}", + "", + "const responseJson = pm.response.json();", + "", + "pm.test(\"Status code is 400\", function () {", + " pm.response.to.have.status(400);", + "});", + "", + "pm.test(\"Should have correct error response\", () => {", + " pm.expect(responseJson.issue[0].details.coding[0].code).to.eql(\"MISSING_IDENTIFIER_VALUE\");", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{api_base_url}}/Consent", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ] + } + }, + "response": [] + }, + { + "name": "GP Practice not found", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"issue\": [", + " {", + " \"code\": \"processing\",", + " \"details\": {", + " \"coding\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", + " \"version\": \"1\",", + " \"code\": \"GP_PRACTICE_NOT_FOUND\",", + " \"display\": \"GP Practice could not be found - invalid resources cannot be retrieved\"", + " }", + " ]", + " },", + " \"diagnostics\": \"GP Practice could not be found\",", + " \"severity\": \"error\"", + " }", + " ],", + " \"resourceType\": \"OperationOutcome\"", + "}", + "", + "const responseJson = pm.response.json();", + "", + "pm.test(\"Status code is 404\", function () {", + " pm.response.to.have.status(404);", + "});", + "", + "pm.test(\"Should have correct error response\", () => {", + " pm.expect(responseJson.issue[0].details.coding[0].code).to.eql(\"GP_PRACTICE_NOT_FOUND\");", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{api_base_url}}/Consent?performer:identifier=9000000012", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "performer:identifier", + "value": "9000000012" + } + ] + } + }, + "response": [] + } + ], + "description": "The GET /Consent is for retrieving confirmed proxy relationships via the Validated Relationship Service.\n\nThis folder contains requests covering different scenarios for users with different types of proxy relationship. Also includes error scenarios.\n\nFor more details, please refer to the [GET Consent OAS page for the Validated Relationship Service on the NHS England website.](https://digital.nhs.uk/developer/api-catalogue/validated-relationship-service#get-/Consent)" + }, + { + "name": "Create a proxy role (Consent)", + "item": [ + { + "name": "Parent-child proxy creation", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"resourceType\": \"OperationOutcome\",", + " \"issue\": [", + " {", + " \"severity\": \"information\",", + " \"code\": \"informational\"", + " }", + " ]", + "}", + "", + "pm.test(\"Status code is 201\", function () {", + " pm.response.to.have.status(201);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " var responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});", + "", + "pm.test(\"Location header is returned\", () => {", + " pm.response.to.have.header(\"Location\", \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/90b9863e-e33c-4895-a333-fd0ea0e23205\")", + "})" + ], + "type": "text/javascript", + "packages": {}, + "requests": {} + } + } + ], + "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\": \"9000000012\"\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\": \"9000000009\"\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\": \"9000000009\"\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" + } + } + }, + "url": { + "raw": "{{api_base_url}}/Consent", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ] + } + }, + "response": [] + }, + { + "name": "Adult-adult proxy creation", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"resourceType\": \"OperationOutcome\",", + " \"issue\": [", + " {", + " \"severity\": \"information\",", + " \"code\": \"informational\"", + " }", + " ]", + "}", + "", + "pm.test(\"Status code is 201\", function () {", + " pm.response.to.have.status(201);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " var responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});", + "", + "pm.test(\"Location header is returned\", () => {", + " pm.response.to.have.header(\"Location\", \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/90b9863e-e33c-4895-a333-fd0ea0e23205\")", + "})" + ], + "type": "text/javascript", + "packages": {}, + "requests": {} + } + } + ], + "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\": \"9000000012\"\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\": \"9000000017\"\n }\n }\n ],\n \"provision\": {\n \"type\": \"permit\",\n \"period\": {\n \"start\": \"2025-02-11\"\n },\n \"actor\": [\n {\n \"role\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"GUARD\",\n \"display\": \"Guardian\"\n }\n ]\n },\n \"reference\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000017\"\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" + } + } + }, + "url": { + "raw": "{{api_base_url}}/Consent", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ] + } + }, + "response": [] + }, + { + "name": "Duplicate relationship", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"issue\": [", + " {", + " \"code\": \"invalid\",", + " \"diagnostics\": \"Proxy role already exists.\",", + " \"details\": {", + " \"coding\": [", + " {", + " \"code\": \"DUPLICATE_RELATIONSHIP\",", + " \"display\": \"Request must be for a new proxy role.\",", + " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", + " \"version\": \"1\"", + " }", + " ]", + " },", + " \"severity\": \"error\"", + " }", + " ],", + " \"resourceType\": \"OperationOutcome\"", + "}", + "", + "pm.test(\"Status code is 409\", function () {", + " pm.response.to.have.status(409);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " var responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});", + "" + ], + "type": "text/javascript", + "packages": {}, + "requests": {} + } + } + ], + "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\": \"9000000000\"\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\": \"9000000049\"\n }\n }\n ],\n \"provision\": {\n \"type\": \"permit\",\n \"period\": {\n \"start\": \"2025-02-11\"\n },\n \"actor\": [\n {\n \"role\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"GUARD\",\n \"display\": \"Guardian\"\n }\n ]\n },\n \"reference\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000049\"\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" + } + } + }, + "url": { + "raw": "{{api_base_url}}/Consent", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ] + } + }, + "response": [] + } + ], + "description": "The POST /Consent is for storing confirmed proxy relationships via the Validated Relationships Service.\n\nThis folder contains requests covering different scenarios for users with different types of proxy relationship. Also includes error scenarios.\n\nFor more details, please refer to the [POST Consent OAS page for the Validated Relationship Service on the NHS England website.](https://digital.nhs.uk/developer/api-catalogue/validated-relationship-service#post-/Consent)" + }, + { + "name": "Get proxy role (Consent)", + "item": [ + { + "name": "Retrieve consenting adult relationship", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"resourceType\": \"Bundle\",", + " \"timestamp\": \"2026-01-16T14:00:00+00:00\",", + " \"total\": 1,", + " \"type\": \"searchset\",", + " \"link\": [", + " {", + " \"relation\": \"self\",", + " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000010\"", + " }", + " ],", + " \"entry\": [", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/WWCC67T1\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"WWCC67T1\",", + " \"status\": \"active\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ]", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", + " \"code\": \"INFA\",", + " \"display\": \"information access\"", + " }", + " ]", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000005\"", + " }", + " },", + " \"dateTime\": \"2024-07-21T17:32:28Z\",", + " \"policy\": [", + " {", + " \"authority\": \"https://www.england.nhs.uk\",", + " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", + " }", + " ],", + " \"provision\": {", + " \"type\": \"permit\",", + " \"actor\": [", + " {", + " \"reference\": {", + " \"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\"", + " }", + " },", + " \"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.grantee\",", + " \"valueReference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000010\"", + " }", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " }", + " ]", + "}", + "", + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " const responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{api_base_url}}/Consent/74eed847-ca25-4e76-8cf2-f2c2d7842a7a", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent", + "74eed847-ca25-4e76-8cf2-f2c2d7842a7a" + ] + } + }, + "response": [] + }, + { + "name": "Retrieve consenting adult relationship with patient details", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"resourceType\": \"Bundle\",", + " \"timestamp\": \"2026-01-16T14:00:00+00:00\",", + " \"total\": 1,", + " \"type\": \"searchset\",", + " \"link\": [", + " {", + " \"relation\": \"self\",", + " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000010&_include=Consent:patient\"", + " }", + " ],", + " \"entry\": [", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/DFCC67F5\",", + " \"resource\": {", + " \"resourceType\": \"Patient\",", + " \"id\": \"DFCC67F5\",", + " \"meta\": {", + " \"security\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\",", + " \"code\": \"P9\",", + " \"display\": \"High level verification (P9)\"", + " }", + " ]", + " },", + " \"identifier\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000005\"", + " }", + " ],", + " \"name\": [", + " {", + " \"use\": \"usual\",", + " \"period\": {", + " \"start\": \"2024-01-01\",", + " \"end\": \"2029-12-31\"", + " },", + " \"given\": [", + " \"Sally\"", + " ],", + " \"family\": \"Evans\",", + " \"prefix\": [", + " \"Mrs\"", + " ]", + " }", + " ],", + " \"birthDate\": \"1995-10-22\",", + " \"generalPractitioner\": [", + " {", + " \"identifier\": {", + " \"value\": \"ODS12345\",", + " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"include\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/WWCC67T1\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"WWCC67T1\",", + " \"status\": \"active\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ]", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", + " \"code\": \"INFA\",", + " \"display\": \"information access\"", + " }", + " ]", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000005\"", + " }", + " },", + " \"dateTime\": \"2024-07-21T17:32:28Z\",", + " \"policy\": [", + " {", + " \"authority\": \"https://www.england.nhs.uk\",", + " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", + " }", + " ],", + " \"provision\": {", + " \"type\": \"permit\",", + " \"actor\": [", + " {", + " \"reference\": {", + " \"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\"", + " }", + " },", + " \"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.grantee\",", + " \"valueReference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000010\"", + " }", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " }", + " ]", + "}", + "", + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " const responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{api_base_url}}/Consent/74eed847-ca25-4e76-8cf2-f2c2d7842a7a?_include=Consent:patient", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent", + "74eed847-ca25-4e76-8cf2-f2c2d7842a7a" + ], + "query": [ + { + "key": "_include", + "value": "Consent:patient" + } + ] + } + }, + "response": [] + }, + { + "name": "Retrieve consenting adult relationship with performer details", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"resourceType\": \"Bundle\",", + " \"timestamp\": \"2026-01-16T14:00:00+00:00\",", + " \"total\": 1,", + " \"type\": \"searchset\",", + " \"link\": [", + " {", + " \"relation\": \"self\",", + " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000010&_include=Consent:performer\"", + " }", + " ],", + " \"entry\": [", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/RP974720\",", + " \"resource\": {", + " \"resourceType\": \"RelatedPerson\",", + " \"id\": \"RP974720\",", + " \"identifier\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000010\"", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000005\"", + " }", + " },", + " \"relationship\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\",", + " \"code\": \"Personal\",", + " \"display\": \"Personal relationship with the patient\"", + " }", + " ]", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"include\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/WWCC67T1\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"WWCC67T1\",", + " \"status\": \"active\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ]", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", + " \"code\": \"INFA\",", + " \"display\": \"information access\"", + " }", + " ]", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000005\"", + " }", + " },", + " \"dateTime\": \"2024-07-21T17:32:28Z\",", + " \"policy\": [", + " {", + " \"authority\": \"https://www.england.nhs.uk\",", + " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", + " }", + " ],", + " \"provision\": {", + " \"type\": \"permit\",", + " \"actor\": [", + " {", + " \"reference\": {", + " \"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\"", + " }", + " },", + " \"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.grantee\",", + " \"valueReference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000010\"", + " }", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " }", + " ]", + "}", + "", + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " const responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{api_base_url}}/Consent/74eed847-ca25-4e76-8cf2-f2c2d7842a7a?_include=Consent:performer", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent", + "74eed847-ca25-4e76-8cf2-f2c2d7842a7a" + ], + "query": [ + { + "key": "_include", + "value": "Consent:performer" + } + ] + } + }, + "response": [] + }, + { + "name": "Retrieve consenting adult relationship with performer and patient details", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"resourceType\": \"Bundle\",", + " \"timestamp\": \"2026-01-16T14:00:00+00:00\",", + " \"total\": 1,", + " \"type\": \"searchset\",", + " \"link\": [", + " {", + " \"relation\": \"self\",", + " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000010&_include=Consent:performer&_include=Consent:patient\"", + " }", + " ],", + " \"entry\": [", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/RP974720\",", + " \"resource\": {", + " \"resourceType\": \"RelatedPerson\",", + " \"id\": \"RP974720\",", + " \"identifier\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000010\"", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000005\"", + " }", + " },", + " \"relationship\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\",", + " \"code\": \"Personal\",", + " \"display\": \"Personal relationship with the patient\"", + " }", + " ]", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"include\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/DFCC67F5\",", + " \"resource\": {", + " \"resourceType\": \"Patient\",", + " \"id\": \"DFCC67F5\",", + " \"meta\": {", + " \"security\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\",", + " \"code\": \"P9\",", + " \"display\": \"High level verification (P9)\"", + " }", + " ]", + " },", + " \"identifier\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000005\"", + " }", + " ],", + " \"name\": [", + " {", + " \"use\": \"usual\",", + " \"period\": {", + " \"start\": \"2025-01-01\",", + " \"end\": \"2029-12-31\"", + " },", + " \"given\": [", + " \"Sally\"", + " ],", + " \"family\": \"Evans\",", + " \"prefix\": [", + " \"Mrs\"", + " ]", + " }", + " ],", + " \"birthDate\": \"1995-10-22\",", + " \"generalPractitioner\": [", + " {", + " \"identifier\": {", + " \"value\": \"ODS12345\",", + " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"include\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/WWCC67T1\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"WWCC67T1\",", + " \"status\": \"active\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ]", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", + " \"code\": \"INFA\",", + " \"display\": \"information access\"", + " }", + " ]", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000005\"", + " }", + " },", + " \"dateTime\": \"2024-07-21T17:32:28Z\",", + " \"policy\": [", + " {", + " \"authority\": \"https://www.england.nhs.uk\",", + " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", + " }", + " ],", + " \"provision\": {", + " \"type\": \"permit\",", + " \"actor\": [", + " {", + " \"reference\": {", + " \"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\"", + " }", + " },", + " \"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.grantee\",", + " \"valueReference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000010\"", + " }", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " }", + " ]", + "}", + "", + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " const responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{api_base_url}}/Consent/74eed847-ca25-4e76-8cf2-f2c2d7842a7a?_include=Consent:performer&_include=Consent:patient", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent", + "74eed847-ca25-4e76-8cf2-f2c2d7842a7a" + ], + "query": [ + { + "key": "_include", + "value": "Consent:performer" + }, + { + "key": "_include", + "value": "Consent:patient" + } + ] + } + }, + "response": [] + }, + { + "name": "Retrieve mother-child relationship", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"resourceType\": \"Bundle\",", + " \"timestamp\": \"2026-01-16T14:00:00+00:00\",", + " \"total\": 1,", + " \"type\": \"searchset\",", + " \"link\": [", + " {", + " \"relation\": \"self\",", + " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000019\"", + " }", + " ],", + " \"entry\": [", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBCC67E9\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"BBCC67E9\",", + " \"status\": \"active\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ]", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", + " \"code\": \"INFA\",", + " \"display\": \"information access\"", + " }", + " ]", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000009\"", + " }", + " },", + " \"dateTime\": \"2024-07-21T17:32:28Z\",", + " \"policy\": [", + " {", + " \"authority\": \"https://www.england.nhs.uk\",", + " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", + " }", + " ],", + " \"provision\": {", + " \"type\": \"permit\",", + " \"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\"", + " }", + " ]", + " }", + " }", + " ],", + " \"period\": {", + " \"end\": \"2029-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.grantee\",", + " \"valueReference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000019\"", + " }", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " }", + " ]", + "}", + "", + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " const responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{api_base_url}}/Consent/39df03a2-1b14-4d19-b1dc-d5d8cbf96948", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent", + "39df03a2-1b14-4d19-b1dc-d5d8cbf96948" + ] + } + }, + "response": [] + }, + { + "name": "Retrieve mother-child relationship with patient details", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"resourceType\": \"Bundle\",", + " \"timestamp\": \"2026-01-16T14:00:00+00:00\",", + " \"total\": 1,", + " \"type\": \"searchset\",", + " \"link\": [", + " {", + " \"relation\": \"self\",", + " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000019&_include=Consent:patient\"", + " }", + " ],", + " \"entry\": [", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/A3CC67E2\",", + " \"resource\": {", + " \"resourceType\": \"Patient\",", + " \"id\": \"A3CC67E2\",", + " \"meta\": {", + " \"security\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\",", + " \"code\": \"P9\",", + " \"display\": \"High level verification (P9)\"", + " }", + " ]", + " },", + " \"identifier\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000009\"", + " }", + " ],", + " \"name\": [", + " {", + " \"use\": \"usual\",", + " \"period\": {", + " \"start\": \"2025-01-01\",", + " \"end\": \"2029-12-31\"", + " },", + " \"given\": [", + " \"Jane Marie Anne\"", + " ],", + " \"family\": \"Smith\",", + " \"prefix\": [", + " \"Miss\"", + " ]", + " }", + " ],", + " \"birthDate\": \"2022-10-22\",", + " \"generalPractitioner\": [", + " {", + " \"identifier\": {", + " \"value\": \"ODS12345\",", + " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"include\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBCC67E9\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"BBCC67E9\",", + " \"status\": \"active\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ]", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", + " \"code\": \"INFA\",", + " \"display\": \"information access\"", + " }", + " ]", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000009\"", + " }", + " },", + " \"dateTime\": \"2024-07-21T17:32:28Z\",", + " \"policy\": [", + " {", + " \"authority\": \"https://www.england.nhs.uk\",", + " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", + " }", + " ],", + " \"provision\": {", + " \"type\": \"permit\",", + " \"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\"", + " }", + " ]", + " }", + " }", + " ]", + " },", + " \"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.grantee\",", + " \"valueReference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000019\"", + " }", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " }", + " ]", + "}", + "", + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " const responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{api_base_url}}/Consent/39df03a2-1b14-4d19-b1dc-d5d8cbf96948?_include=Consent:patient", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent", + "39df03a2-1b14-4d19-b1dc-d5d8cbf96948" + ], + "query": [ + { + "key": "_include", + "value": "Consent:patient" + } + ] + } + }, + "response": [] + }, + { + "name": "Retrieve mother-child relationship with performer details", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"resourceType\": \"Bundle\",", + " \"timestamp\": \"2026-01-16T14:00:00+00:00\",", + " \"total\": 1,", + " \"type\": \"searchset\",", + " \"link\": [", + " {", + " \"relation\": \"self\",", + " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000019&_include=Consent:performer\"", + " }", + " ],", + " \"entry\": [", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/BE974742\",", + " \"resource\": {", + " \"resourceType\": \"RelatedPerson\",", + " \"id\": \"BE974742\",", + " \"identifier\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000019\"", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000009\"", + " }", + " },", + " \"relationship\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", + " \"code\": \"PRN\",", + " \"display\": \"parent\"", + " }", + " ]", + " },", + " {", + " \"coding\": [", + " {", + " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", + " \"code\": \"MTH\",", + " \"display\": \"mother\"", + " }", + " ]", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"include\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBCC67E9\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"BBCC67E9\",", + " \"status\": \"active\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ]", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", + " \"code\": \"INFA\",", + " \"display\": \"information access\"", + " }", + " ]", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000009\"", + " }", + " },", + " \"dateTime\": \"2024-07-21T17:32:28Z\",", + " \"policy\": [", + " {", + " \"authority\": \"https://www.england.nhs.uk\",", + " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", + " }", + " ],", + " \"provision\": {", + " \"type\": \"permit\",", + " \"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\"", + " }", + " ]", + " }", + " }", + " ],", + " \"period\": {", + " \"end\": \"2029-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.grantee\",", + " \"valueReference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000019\"", + " }", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " }", + " ]", + "}", + "", + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " const responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{api_base_url}}/Consent/39df03a2-1b14-4d19-b1dc-d5d8cbf96948?_include=Consent:performer", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent", + "39df03a2-1b14-4d19-b1dc-d5d8cbf96948" + ], + "query": [ + { + "key": "_include", + "value": "Consent:performer" + } + ] + } + }, + "response": [] + }, + { + "name": "Retrieve mother-child relationship with performer and patient details", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"resourceType\": \"Bundle\",", + " \"timestamp\": \"2026-01-16T14:00:00+00:00\",", + " \"total\": 1,", + " \"type\": \"searchset\",", + " \"link\": [", + " {", + " \"relation\": \"self\",", + " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000019&_include=Consent:performer&_include=Consent:patient\"", + " }", + " ],", + " \"entry\": [", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/BE974742\",", + " \"resource\": {", + " \"resourceType\": \"RelatedPerson\",", + " \"id\": \"BE974742\",", + " \"identifier\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000019\"", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000009\"", + " }", + " },", + " \"relationship\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", + " \"code\": \"PRN\",", + " \"display\": \"parent\"", + " }", + " ]", + " },", + " {", + " \"coding\": [", + " {", + " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", + " \"code\": \"MTH\",", + " \"display\": \"mother\"", + " }", + " ]", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"include\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/A3CC67E2\",", + " \"resource\": {", + " \"resourceType\": \"Patient\",", + " \"id\": \"A3CC67E2\",", + " \"meta\": {", + " \"security\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\",", + " \"code\": \"P9\",", + " \"display\": \"High level verification (P9)\"", + " }", + " ]", + " },", + " \"identifier\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000009\"", + " }", + " ],", + " \"name\": [", + " {", + " \"use\": \"usual\",", + " \"period\": {", + " \"start\": \"2025-01-01\",", + " \"end\": \"2029-12-31\"", + " },", + " \"given\": [", + " \"Jane Marie Anne\"", + " ],", + " \"family\": \"Smith\",", + " \"prefix\": [", + " \"Miss\"", + " ]", + " }", + " ],", + " \"birthDate\": \"2022-10-22\",", + " \"generalPractitioner\": [", + " {", + " \"identifier\": {", + " \"value\": \"ODS12345\",", + " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"include\"", + " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBCC67E9\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"BBCC67E9\",", + " \"status\": \"active\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ]", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", + " \"code\": \"INFA\",", + " \"display\": \"information access\"", + " }", + " ]", + " }", + " ],", + " \"patient\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000009\"", + " }", + " },", + " \"dateTime\": \"2024-07-21T17:32:28Z\",", + " \"policy\": [", + " {", + " \"authority\": \"https://www.england.nhs.uk\",", + " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", + " }", + " ],", + " \"provision\": {", + " \"type\": \"permit\",", + " \"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\"", + " }", + " ]", + " }", + " }", + " ],", + " \"period\": {", + " \"end\": \"2029-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.grantee\",", + " \"valueReference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000019\"", + " }", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " }", + " ]", + "}", + "", + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " const responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{api_base_url}}/Consent/39df03a2-1b14-4d19-b1dc-d5d8cbf96948?_include=Consent:performer&_include=Consent:patient", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent", + "39df03a2-1b14-4d19-b1dc-d5d8cbf96948" + ], + "query": [ + { + "key": "_include", + "value": "Consent:performer" + }, + { + "key": "_include", + "value": "Consent:patient" + } + ] + } + }, + "response": [] + }, + { + "name": "Invalid consent ID", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"issue\": [", + " {", + " \"code\": \"invalid\",", + " \"details\": {", + " \"coding\": [", + " {", + " \"code\": \"INVALID_ID_VALUE\",", + " \"display\": \"Required parameter(s) are invalid.\",", + " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", + " \"version\": \"1\"", + " }", + " ]", + " },", + " \"diagnostics\": \"Invalid request with error - ID must be a valid UUID.\",", + " \"severity\": \"error\"", + " }", + " ],", + " \"resourceType\": \"OperationOutcome\"", + "}", + "", + "const responseJson = pm.response.json();", + "", + "pm.test(\"Status code is 400\", function () {", + " pm.response.to.have.status(400);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{api_base_url}}/Consent/invalid-identifier", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent", + "invalid-identifier" + ] + } + }, + "response": [] + }, + { + "name": "Invalid include parameter", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"resourceType\": \"OperationOutcome\",", + " \"issue\": [", + " {", + " \"code\": \"invalid\",", + " \"details\": {", + " \"coding\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", + " \"version\": \"1\",", + " \"code\": \"INVALID_PARAMETER\",", + " \"display\": \"Required parameter(s) are invalid.\"", + " }", + " ]", + " },", + " \"diagnostics\": \"Invalid request with error - _include parameter is invalid.\",", + " \"severity\": \"error\"", + " ", + " }", + " ],", + "}", + "", + "const responseJson = pm.response.json();", + "", + "pm.test(\"Status code is 422\", function () {", + " pm.response.to.have.status(422);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{api_base_url}}/Consent/39df03a2-1b14-4d19-b1dc-d5d8cbf96948?_include=Consent:invalid", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent", + "39df03a2-1b14-4d19-b1dc-d5d8cbf96948" + ], + "query": [ + { + "key": "_include", + "value": "Consent:invalid" + } + ] + } + }, + "response": [] + }, + { + "name": "Invalid parameters", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"resourceType\": \"OperationOutcome\",", + " \"issue\": [", + " {", + " \"code\": \"invalid\",", + " \"details\": {", + " \"coding\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", + " \"version\": \"1\",", + " \"code\": \"INVALID_PARAMETER\",", + " \"display\": \"Required parameter(s) are invalid.\"", + " }", + " ]", + " },", + " \"diagnostics\": \"Invalid request with error - _include parameter is invalid.\",", + " \"severity\": \"error\"", + " }", + " ],", + "}", + "", + "const responseJson = pm.response.json();", + "", + "pm.test(\"Status code is 422\", function () {", + " pm.response.to.have.status(422);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{api_base_url}}/Consent/74eed847-ca25-4e76-8cf2-f2c2d7842a7a?_unknown=true", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent", + "74eed847-ca25-4e76-8cf2-f2c2d7842a7a" + ], + "query": [ + { + "key": "_unknown", + "value": "true" + } + ] + } + }, + "response": [] + }, + { + "name": "Proxy role not found", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"issue\": [", + " {", + " \"code\": \"processing\",", + " \"details\": {", + " \"coding\": [", + " {", + " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", + " \"version\": \"1\",", + " \"code\": \"INVALIDATED_RESOURCE\",", + " \"display\": \"Resource that has been marked as invalid was requested - invalid resources cannot be retrieved\"", + " }", + " ]", + " },", + " \"diagnostics\": \"Resource that has been marked as invalid was requested - invalid resources cannot be retrieved\",", + " \"severity\": \"error\"", + " }", + " ],", + " \"resourceType\": \"OperationOutcome\"", + "}", + "", + "const responseJson = pm.response.json();", + "", + "pm.test(\"Status code is 404\", function () {", + " pm.response.to.have.status(404);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{api_base_url}}/Consent/a0922245-1072-40c3-8f4e-a7490c10d365", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent", + "a0922245-1072-40c3-8f4e-a7490c10d365" + ] + } + }, + "response": [] + } + ], + "description": "The GET /Consent/{ID} is for retrieving the details of a single proxy relationship, including current status, based on a provided id.\n\nThis folder contains requests covering different scenarios for users with different types of proxy relationships. It also includes error scenarios.\n\nFor more details, please refer to the [GET Consent by ID OAS page for the Validated Relationship Service on the NHS England website.](https://digital.nhs.uk/developer/api-catalogue/validated-relationship-service#get-/Consent/%7Bid%7D)" + }, + { + "name": "Update a proxy role (Consent)", + "item": [ + { + "name": "Status update", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"resourceType\": \"OperationOutcome\",", + " \"issue\": [", + " {", + " \"severity\": \"information\",", + " \"code\": \"informational\"", + " }", + " ]", + "}", + "", + "pm.test(\"Status code is 201\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " var responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {}, + "requests": {} + } + } + ], + "request": { + "method": "PATCH", + "header": [], + "body": { + "mode": "raw", + "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" + } + } + }, + "url": { + "raw": "{{api_base_url}}/Consent/74eed847-ca25-4e76-8cf2-f2c2d7842a7a", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent", + "74eed847-ca25-4e76-8cf2-f2c2d7842a7a" + ] + }, + "description": "Valid patch changing status to 'active'" + }, + "response": [] + }, + { + "name": "Missing free text for Other", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"issue\": [", + " {", + " \"code\": \"invalid\",", + " \"diagnostics\": \"Free text is required when reason code is OTHER.\",", + " \"details\": {", + " \"coding\": [", + " {", + " \"code\": \"MISSING_FREE_TEXT_FOR_OTHER\",", + " \"display\": \"Free text must be provided for OTHER reason codes.\",", + " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", + " \"version\": \"1\"", + " }", + " ]", + " },", + " \"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\": \"inactive\"\n }\n]", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{api_base_url}}/Consent/d4e8a6f2-1c3b-4a7e-9d2f-8b5c7e9f1a3d", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent", + "d4e8a6f2-1c3b-4a7e-9d2f-8b5c7e9f1a3d" + ] + }, + "description": "Valid patch changing status to 'active'" + }, + "response": [] + }, + { + "name": "Access level update", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"resourceType\": \"OperationOutcome\",", + " \"issue\": [", + " {", + " \"severity\": \"information\",", + " \"code\": \"informational\"", + " }", + " ]", + "}", + "", + "pm.test(\"Status code is 201\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " var responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {}, + "requests": {} + } + } + ], + "request": { + "method": "PATCH", + "header": [], + "body": { + "mode": "raw", + "raw": "[\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/6b71ac92-baa3-4b76-b0f5-a601257e2722", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent", + "6b71ac92-baa3-4b76-b0f5-a601257e2722" + ] + }, + "description": "Valid patch modifying the role end date" + }, + "response": [] + }, + { + "name": "Multiple valid changes", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"resourceType\": \"OperationOutcome\",", + " \"issue\": [", + " {", + " \"severity\": \"information\",", + " \"code\": \"informational\"", + " }", + " ]", + "}", + "", + "pm.test(\"Status code is 201\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " var responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {}, + "requests": {} + } + } + ], + "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 },\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/43003db8-ffcd-4bd6-ab2f-b49b9656f9e5", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent", + "43003db8-ffcd-4bd6-ab2f-b49b9656f9e5" + ] + }, + "description": "Valid patch modifying the role end date" + }, + "response": [] + }, + { + "name": "Invalid status code", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"issue\": [", + " {", + " \"code\": \"invalid\",", + " \"diagnostics\": \"Invalid status code.\",", + " \"details\": {", + " \"coding\": [", + " {", + " \"code\": \"INVALID_STATUS_CODE\",", + " \"display\": \"Status code is invalid.\",", + " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", + " \"version\": \"1\"", + " }", + " ]", + " },", + " \"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": {}, + "requests": {} + } + } + ], + "request": { + "method": "PATCH", + "header": [], + "body": { + "mode": "raw", + "raw": "[\n {\n \"op\": \"replace\",\n \"path\": \"/status\",\n \"value\": \"someinvalidcode\"\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" + } + } + }, + "url": { + "raw": "{{api_base_url}}/Consent/78c35330-fa2f-4934-a5dd-fff847f38de5", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent", + "78c35330-fa2f-4934-a5dd-fff847f38de5" + ] + }, + "description": "Patch with invalid status value" + }, + "response": [] + }, + { + "name": "Invalid path", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"issue\": [", + " {", + " \"code\": \"invalid\",", + " \"diagnostics\": \"Patch targeting non-existent element.\",", + " \"details\": {", + " \"coding\": [", + " {", + " \"code\": \"INVALID_PATCH_PATH\",", + " \"display\": \"Patch target is invalid.\",", + " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", + " \"version\": \"1\"", + " }", + " ]", + " },", + " \"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": {}, + "requests": {} + } + } + ], + "request": { + "method": "PATCH", + "header": [], + "body": { + "mode": "raw", + "raw": "[\n {\n \"op\": \"replace\",\n \"path\": \"/someotherpath\",\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_DEACTIVATED_PATIENT_REQUEST\",\n \"display\": \"At patient request\"\n }\n ]\n }\n }\n ]\n }\n]", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{api_base_url}}/Consent/01abb0c5-b1ac-499d-9655-9cd0b8d3588f", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent", + "01abb0c5-b1ac-499d-9655-9cd0b8d3588f" + ] + }, + "description": "Patch targeting non-existent element" + }, + "response": [] + }, + { + "name": "Resource not found", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"issue\": [", + " {", + " \"code\": \"invalid\",", + " \"diagnostics\": \"Proxy role not found.\",", + " \"details\": {", + " \"coding\": [", + " {", + " \"code\": \"RESOURCE_NOT_FOUND\",", + " \"display\": \"Request must be for a existing proxy role.\",", + " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", + " \"version\": \"1\"", + " }", + " ]", + " },", + " \"severity\": \"error\"", + " }", + " ],", + " \"resourceType\": \"OperationOutcome\"", + "}", + "", + "pm.test(\"Status code is 404\", function () {", + " pm.response.to.have.status(404);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " var responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {}, + "requests": {} + } + } + ], + "request": { + "method": "PATCH", + "header": [], + "body": { + "mode": "raw", + "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" + } + } + }, + "url": { + "raw": "{{api_base_url}}/Consent/0000000", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent", + "0000000" + ] + }, + "description": "Patch for non-existent Consent" + }, + "response": [] + }, + { + "name": "Invalid patch format", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"issue\": [", + " {", + " \"code\": \"invalid\",", + " \"diagnostics\": \"Malformed JSON patch document.\",", + " \"details\": {", + " \"coding\": [", + " {", + " \"code\": \"INVALID_PATCH_FORMAT\",", + " \"display\": \"Request format is invalid.\",", + " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", + " \"version\": \"1\"", + " }", + " ]", + " },", + " \"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]", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{api_base_url}}/Consent/849ea584-2318-471b-a24c-cee1b5ad0137", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent", + "849ea584-2318-471b-a24c-cee1b5ad0137" + ] + }, + "description": "Malformed JSON patch document" + }, + "response": [] + }, + { + "name": "Invalid state transition", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"issue\": [", + " {", + " \"code\": \"invalid\",", + " \"diagnostics\": \"Patch attempting invalid status change.\",", + " \"details\": {", + " \"coding\": [", + " {", + " \"code\": \"INVALID_STATE_TRANSITION\",", + " \"display\": \"Status change is invalid.\",", + " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", + " \"version\": \"1\"", + " }", + " ]", + " },", + " \"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": {}, + "requests": {} + } + } + ], + "request": { + "method": "PATCH", + "header": [], + "body": { + "mode": "raw", + "raw": "[\n {\n \"op\": \"replace\",\n \"path\": \"/status\",\n \"value\": \"someinvalidcode\"\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" + } + } + }, + "url": { + "raw": "{{api_base_url}}/Consent/7b7f47b8-96e5-43eb-b733-283bf1449f2c", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent", + "7b7f47b8-96e5-43eb-b733-283bf1449f2c" + ] + } + }, + "response": [] + }, + { + "name": "Invalid Status Reason", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"issue\": [", + " {", + " \"code\": \"invalid\",", + " \"diagnostics\": \"Invalid status reason.\",", + " \"details\": {", + " \"coding\": [", + " {", + " \"code\": \"INVALID_STATUS_REASON\",", + " \"display\": \"Status reason is invalid.\",", + " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", + " \"version\": \"1\"", + " }", + " ]", + " },", + " \"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": {}, + "requests": {} + } + } + ], + "request": { + "method": "PATCH", + "header": [], + "body": { + "mode": "raw", + "raw": "[\n {\n \"op\": \"replace\",\n \"path\": \"/status\",\n \"value\": \"someinvalidcode\"\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" + } + } + }, + "url": { + "raw": "{{api_base_url}}/Consent/51fb4df5-815a-45cd-8427-04d6558336b7", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent", + "51fb4df5-815a-45cd-8427-04d6558336b7" + ] + } + }, + "response": [] + } + ], + "description": "Use this endpoint to update an existing proxy role.\n\nCommon update scenarios include:\n\n- Revocation of the role (status change from \"active\" to \"inactive\")\n- Changing the legal basis of the role (TBC)\n- Updating the end date for time-bound access\n \n\nThis folder contains requests covering different scenarios for various valid and invalid update requests.\n\nFor more details, please refer to the [PATCH Consent OAS page for the Validated Relationship Service on the NHS England website.](https://digital.nhs.uk/developer/api-catalogue/validated-relationship-service#patch-/Consent/-id-)" + } + ], + "event": [ + { + "listen": "prerequest", + "script": { + "type": "text/javascript", + "exec": [ + "" + ] + } + }, + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "pm.test(\"Response has FHIR content type\", () => {", + " pm.expect(pm.response.headers.get('Content-Type')).to.include('application/fhir+json');", + "});" + ] + } + } + ], + "variable": [ + { + "key": "api_base_url", + "value": "https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4" + } + ] } \ No newline at end of file From ad1b9fe0c71629c906b094ed567fec23533e38ec Mon Sep 17 00:00:00 2001 From: Ellie Bound <175816742+ellie-bound1-NHSD@users.noreply.github.com> Date: Tue, 27 Jan 2026 08:56:59 +0000 Subject: [PATCH 08/10] NPA-6165: Update URL for grantee extension --- ...ervice.integration.postman_collection.json | 50 +++++------ ...ip_service.sandbox.postman_collection.json | 90 +++++++++---------- .../adult_to_adult_proxy_creation.yaml | 2 +- .../parent_child_proxy_creation.yaml | 2 +- ...onships-status-active-include-details.yaml | 4 +- ...iltered-relationships-status-inactive.yaml | 4 +- ...-relationships-status-proposed-active.yaml | 8 +- ...ultiple-relationships-include-patient.yaml | 6 +- ...lationships-include-performer-patient.yaml | 6 +- ...tiple-relationships-include-performer.yaml | 6 +- ...nships-single-patient-include-patient.yaml | 6 +- ...gle-patient-include-performer-patient.yaml | 6 +- ...hips-single-patient-include-performer.yaml | 6 +- ...multiple-relationships-single-patient.yaml | 6 +- .../GET_Consent/multiple-relationships.yaml | 6 +- ...ng-adult-relationship-include-patient.yaml | 2 +- ...elationship-include-performer-patient.yaml | 2 +- ...-adult-relationship-include-performer.yaml | 2 +- .../single-consenting-adult-relationship.yaml | 2 +- ...er-child-relationship-include-patient.yaml | 2 +- ...elationship-include-performer-patient.yaml | 2 +- ...-child-relationship-include-performer.yaml | 2 +- ...hild-relationship-unknown-legal-basis.yaml | 2 +- .../single-mother-child-relationship.yaml | 2 +- 24 files changed, 113 insertions(+), 113 deletions(-) diff --git a/postman/validated_relationship_service.integration.postman_collection.json b/postman/validated_relationship_service.integration.postman_collection.json index b33af6b7..e744fe00 100644 --- a/postman/validated_relationship_service.integration.postman_collection.json +++ b/postman/validated_relationship_service.integration.postman_collection.json @@ -168,7 +168,7 @@ } ], "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T10:48:19Z\",\n \"total\": 2,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9736898148\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"resource\": {\n \"id\": \"7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n },\n {\n \"url\": \"http://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 \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T10:46:27Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/b22d6068-fe78-40f4-b71a-b916dac48c0b\",\n \"resource\": {\n \"id\": \"b22d6068-fe78-40f4-b71a-b916dac48c0b\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n },\n {\n \"url\": \"http://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 \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T10:47:43Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n }\n ]\n}" + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T10:48:19Z\",\n \"total\": 2,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9736898148\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"resource\": {\n \"id\": \"7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-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 \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T10:46:27Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/b22d6068-fe78-40f4-b71a-b916dac48c0b\",\n \"resource\": {\n \"id\": \"b22d6068-fe78-40f4-b71a-b916dac48c0b\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-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 \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T10:47:43Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n }\n ]\n}" }, { "name": "Proxy roles returned - Include patient details", @@ -263,7 +263,7 @@ } ], "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T10:50:25Z\",\n \"total\": 2,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9736898148&_include=Consent%3Apatient\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"resource\": {\n \"id\": \"7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n },\n {\n \"url\": \"http://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 \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T10:46:27Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/b22d6068-fe78-40f4-b71a-b916dac48c0b\",\n \"resource\": {\n \"id\": \"b22d6068-fe78-40f4-b71a-b916dac48c0b\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n },\n {\n \"url\": \"http://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 \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T10:47:43Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898644\",\n \"resource\": {\n \"id\": \"9736898644\",\n \"meta\": {\n \"security\": [\n {\n \"code\": \"U\",\n \"display\": \"unrestricted\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-Confidentiality\"\n },\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ],\n \"versionId\": \"4\"\n },\n \"address\": [\n {\n \"extension\": [\n {\n \"extension\": [\n {\n \"url\": \"type\",\n \"valueCoding\": {\n \"code\": \"PAF\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType\"\n }\n },\n {\n \"url\": \"value\",\n \"valueString\": \"29706100\"\n }\n ],\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey\"\n }\n ],\n \"id\": \"gDmhc\",\n \"line\": [\n \"BRAMBLE COTTAGE\",\n \"OLD VICARAGE PARK\",\n \"SCAWBY\",\n \"BRIGG\",\n \"S HUMBERSIDE\"\n ],\n \"period\": {\n \"start\": \"2021-09-10\"\n },\n \"postalCode\": \"DN20 9RL\",\n \"use\": \"home\"\n }\n ],\n \"birthDate\": \"2015-09-26\",\n \"gender\": \"female\",\n \"generalPractitioner\": [\n {\n \"id\": \"gDHTb\",\n \"identifier\": {\n \"period\": {\n \"start\": \"2018-08-22\"\n },\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A20047\"\n }\n }\n ],\n \"identifier\": [\n {\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"01\",\n \"display\": \"Number present and verified\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\n \"version\": \"1.0.0\"\n }\n ]\n }\n }\n ],\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n ],\n \"name\": [\n {\n \"family\": \"SHEPP\",\n \"given\": [\n \"Ashley\",\n \"Ellen\"\n ],\n \"period\": {\n \"start\": \"2025-08-06\"\n },\n \"prefix\": [\n \"MS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898717\",\n \"resource\": {\n \"id\": \"9736898717\",\n \"meta\": {\n \"security\": [\n {\n \"code\": \"U\",\n \"display\": \"unrestricted\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-Confidentiality\"\n },\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ],\n \"versionId\": \"4\"\n },\n \"address\": [\n {\n \"extension\": [\n {\n \"extension\": [\n {\n \"url\": \"type\",\n \"valueCoding\": {\n \"code\": \"PAF\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType\"\n }\n },\n {\n \"url\": \"value\",\n \"valueString\": \"16654057\"\n }\n ],\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey\"\n }\n ],\n \"id\": \"YoGEf\",\n \"line\": [\n \"GLENVILLE\",\n \"FERRY ROAD\",\n \"GOXHILL\",\n \"BARROW-UPON-HUMBER\",\n \"S HUMBERSIDE\"\n ],\n \"period\": {\n \"start\": \"2016-04-09\"\n },\n \"postalCode\": \"DN19 7JY\",\n \"use\": \"home\"\n }\n ],\n \"birthDate\": \"2010-05-31\",\n \"gender\": \"male\",\n \"generalPractitioner\": [\n {\n \"id\": \"bYoHa\",\n \"identifier\": {\n \"period\": {\n \"start\": \"2016-02-12\"\n },\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A20047\"\n }\n }\n ],\n \"identifier\": [\n {\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"01\",\n \"display\": \"Number present and verified\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\n \"version\": \"1.0.0\"\n }\n ]\n }\n }\n ],\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n ],\n \"name\": [\n {\n \"family\": \"CASH\",\n \"given\": [\n \"Jacob\",\n \"Chas\"\n ],\n \"period\": {\n \"start\": \"2025-07-22\"\n },\n \"prefix\": [\n \"MR\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T10:50:25Z\",\n \"total\": 2,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9736898148&_include=Consent%3Apatient\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"resource\": {\n \"id\": \"7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-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 \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T10:46:27Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/b22d6068-fe78-40f4-b71a-b916dac48c0b\",\n \"resource\": {\n \"id\": \"b22d6068-fe78-40f4-b71a-b916dac48c0b\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-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 \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T10:47:43Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898644\",\n \"resource\": {\n \"id\": \"9736898644\",\n \"meta\": {\n \"security\": [\n {\n \"code\": \"U\",\n \"display\": \"unrestricted\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-Confidentiality\"\n },\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ],\n \"versionId\": \"4\"\n },\n \"address\": [\n {\n \"extension\": [\n {\n \"extension\": [\n {\n \"url\": \"type\",\n \"valueCoding\": {\n \"code\": \"PAF\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType\"\n }\n },\n {\n \"url\": \"value\",\n \"valueString\": \"29706100\"\n }\n ],\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey\"\n }\n ],\n \"id\": \"gDmhc\",\n \"line\": [\n \"BRAMBLE COTTAGE\",\n \"OLD VICARAGE PARK\",\n \"SCAWBY\",\n \"BRIGG\",\n \"S HUMBERSIDE\"\n ],\n \"period\": {\n \"start\": \"2021-09-10\"\n },\n \"postalCode\": \"DN20 9RL\",\n \"use\": \"home\"\n }\n ],\n \"birthDate\": \"2015-09-26\",\n \"gender\": \"female\",\n \"generalPractitioner\": [\n {\n \"id\": \"gDHTb\",\n \"identifier\": {\n \"period\": {\n \"start\": \"2018-08-22\"\n },\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A20047\"\n }\n }\n ],\n \"identifier\": [\n {\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"01\",\n \"display\": \"Number present and verified\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\n \"version\": \"1.0.0\"\n }\n ]\n }\n }\n ],\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n ],\n \"name\": [\n {\n \"family\": \"SHEPP\",\n \"given\": [\n \"Ashley\",\n \"Ellen\"\n ],\n \"period\": {\n \"start\": \"2025-08-06\"\n },\n \"prefix\": [\n \"MS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898717\",\n \"resource\": {\n \"id\": \"9736898717\",\n \"meta\": {\n \"security\": [\n {\n \"code\": \"U\",\n \"display\": \"unrestricted\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-Confidentiality\"\n },\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ],\n \"versionId\": \"4\"\n },\n \"address\": [\n {\n \"extension\": [\n {\n \"extension\": [\n {\n \"url\": \"type\",\n \"valueCoding\": {\n \"code\": \"PAF\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType\"\n }\n },\n {\n \"url\": \"value\",\n \"valueString\": \"16654057\"\n }\n ],\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey\"\n }\n ],\n \"id\": \"YoGEf\",\n \"line\": [\n \"GLENVILLE\",\n \"FERRY ROAD\",\n \"GOXHILL\",\n \"BARROW-UPON-HUMBER\",\n \"S HUMBERSIDE\"\n ],\n \"period\": {\n \"start\": \"2016-04-09\"\n },\n \"postalCode\": \"DN19 7JY\",\n \"use\": \"home\"\n }\n ],\n \"birthDate\": \"2010-05-31\",\n \"gender\": \"male\",\n \"generalPractitioner\": [\n {\n \"id\": \"bYoHa\",\n \"identifier\": {\n \"period\": {\n \"start\": \"2016-02-12\"\n },\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A20047\"\n }\n }\n ],\n \"identifier\": [\n {\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"01\",\n \"display\": \"Number present and verified\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\n \"version\": \"1.0.0\"\n }\n ]\n }\n }\n ],\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n ],\n \"name\": [\n {\n \"family\": \"CASH\",\n \"given\": [\n \"Jacob\",\n \"Chas\"\n ],\n \"period\": {\n \"start\": \"2025-07-22\"\n },\n \"prefix\": [\n \"MR\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" }, { "name": "Proxy roles returned - Include performer details", @@ -358,7 +358,7 @@ } ], "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T10:50:45Z\",\n \"total\": 2,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9736898148&_include=Consent%3Aperformer\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"resource\": {\n \"id\": \"7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n },\n {\n \"url\": \"http://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 \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T10:46:27Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/b22d6068-fe78-40f4-b71a-b916dac48c0b\",\n \"resource\": {\n \"id\": \"b22d6068-fe78-40f4-b71a-b916dac48c0b\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n },\n {\n \"url\": \"http://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 \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T10:47:43Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/ZfgKO\",\n \"resource\": {\n \"id\": \"ZfgKO\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/UwTCq\",\n \"resource\": {\n \"id\": \"UwTCq\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T10:50:45Z\",\n \"total\": 2,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9736898148&_include=Consent%3Aperformer\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"resource\": {\n \"id\": \"7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-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 \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T10:46:27Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/b22d6068-fe78-40f4-b71a-b916dac48c0b\",\n \"resource\": {\n \"id\": \"b22d6068-fe78-40f4-b71a-b916dac48c0b\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-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 \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T10:47:43Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/ZfgKO\",\n \"resource\": {\n \"id\": \"ZfgKO\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/UwTCq\",\n \"resource\": {\n \"id\": \"UwTCq\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" }, { "name": "Proxy roles returned - Include patient and performer details", @@ -457,7 +457,7 @@ } ], "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T10:51:06Z\",\n \"total\": 2,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9736898148&_include=Consent%3Aperformer&_include=Consent%3Apatient\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"resource\": {\n \"id\": \"7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n },\n {\n \"url\": \"http://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 \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T10:46:27Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/b22d6068-fe78-40f4-b71a-b916dac48c0b\",\n \"resource\": {\n \"id\": \"b22d6068-fe78-40f4-b71a-b916dac48c0b\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n },\n {\n \"url\": \"http://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 \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T10:47:43Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898644\",\n \"resource\": {\n \"id\": \"9736898644\",\n \"meta\": {\n \"security\": [\n {\n \"code\": \"U\",\n \"display\": \"unrestricted\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-Confidentiality\"\n },\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ],\n \"versionId\": \"4\"\n },\n \"address\": [\n {\n \"extension\": [\n {\n \"extension\": [\n {\n \"url\": \"type\",\n \"valueCoding\": {\n \"code\": \"PAF\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType\"\n }\n },\n {\n \"url\": \"value\",\n \"valueString\": \"29706100\"\n }\n ],\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey\"\n }\n ],\n \"id\": \"gDmhc\",\n \"line\": [\n \"BRAMBLE COTTAGE\",\n \"OLD VICARAGE PARK\",\n \"SCAWBY\",\n \"BRIGG\",\n \"S HUMBERSIDE\"\n ],\n \"period\": {\n \"start\": \"2021-09-10\"\n },\n \"postalCode\": \"DN20 9RL\",\n \"use\": \"home\"\n }\n ],\n \"birthDate\": \"2015-09-26\",\n \"gender\": \"female\",\n \"generalPractitioner\": [\n {\n \"id\": \"gDHTb\",\n \"identifier\": {\n \"period\": {\n \"start\": \"2018-08-22\"\n },\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A20047\"\n }\n }\n ],\n \"identifier\": [\n {\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"01\",\n \"display\": \"Number present and verified\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\n \"version\": \"1.0.0\"\n }\n ]\n }\n }\n ],\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n ],\n \"name\": [\n {\n \"family\": \"SHEPP\",\n \"given\": [\n \"Ashley\",\n \"Ellen\"\n ],\n \"period\": {\n \"start\": \"2025-08-06\"\n },\n \"prefix\": [\n \"MS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898717\",\n \"resource\": {\n \"id\": \"9736898717\",\n \"meta\": {\n \"security\": [\n {\n \"code\": \"U\",\n \"display\": \"unrestricted\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-Confidentiality\"\n },\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ],\n \"versionId\": \"4\"\n },\n \"address\": [\n {\n \"extension\": [\n {\n \"extension\": [\n {\n \"url\": \"type\",\n \"valueCoding\": {\n \"code\": \"PAF\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType\"\n }\n },\n {\n \"url\": \"value\",\n \"valueString\": \"16654057\"\n }\n ],\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey\"\n }\n ],\n \"id\": \"YoGEf\",\n \"line\": [\n \"GLENVILLE\",\n \"FERRY ROAD\",\n \"GOXHILL\",\n \"BARROW-UPON-HUMBER\",\n \"S HUMBERSIDE\"\n ],\n \"period\": {\n \"start\": \"2016-04-09\"\n },\n \"postalCode\": \"DN19 7JY\",\n \"use\": \"home\"\n }\n ],\n \"birthDate\": \"2010-05-31\",\n \"gender\": \"male\",\n \"generalPractitioner\": [\n {\n \"id\": \"bYoHa\",\n \"identifier\": {\n \"period\": {\n \"start\": \"2016-02-12\"\n },\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A20047\"\n }\n }\n ],\n \"identifier\": [\n {\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"01\",\n \"display\": \"Number present and verified\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\n \"version\": \"1.0.0\"\n }\n ]\n }\n }\n ],\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n ],\n \"name\": [\n {\n \"family\": \"CASH\",\n \"given\": [\n \"Jacob\",\n \"Chas\"\n ],\n \"period\": {\n \"start\": \"2025-07-22\"\n },\n \"prefix\": [\n \"MR\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/ZfgKO\",\n \"resource\": {\n \"id\": \"ZfgKO\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/UwTCq\",\n \"resource\": {\n \"id\": \"UwTCq\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T10:51:06Z\",\n \"total\": 2,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9736898148&_include=Consent%3Aperformer&_include=Consent%3Apatient\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"resource\": {\n \"id\": \"7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-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 \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T10:46:27Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/b22d6068-fe78-40f4-b71a-b916dac48c0b\",\n \"resource\": {\n \"id\": \"b22d6068-fe78-40f4-b71a-b916dac48c0b\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-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 \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T10:47:43Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898644\",\n \"resource\": {\n \"id\": \"9736898644\",\n \"meta\": {\n \"security\": [\n {\n \"code\": \"U\",\n \"display\": \"unrestricted\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-Confidentiality\"\n },\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ],\n \"versionId\": \"4\"\n },\n \"address\": [\n {\n \"extension\": [\n {\n \"extension\": [\n {\n \"url\": \"type\",\n \"valueCoding\": {\n \"code\": \"PAF\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType\"\n }\n },\n {\n \"url\": \"value\",\n \"valueString\": \"29706100\"\n }\n ],\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey\"\n }\n ],\n \"id\": \"gDmhc\",\n \"line\": [\n \"BRAMBLE COTTAGE\",\n \"OLD VICARAGE PARK\",\n \"SCAWBY\",\n \"BRIGG\",\n \"S HUMBERSIDE\"\n ],\n \"period\": {\n \"start\": \"2021-09-10\"\n },\n \"postalCode\": \"DN20 9RL\",\n \"use\": \"home\"\n }\n ],\n \"birthDate\": \"2015-09-26\",\n \"gender\": \"female\",\n \"generalPractitioner\": [\n {\n \"id\": \"gDHTb\",\n \"identifier\": {\n \"period\": {\n \"start\": \"2018-08-22\"\n },\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A20047\"\n }\n }\n ],\n \"identifier\": [\n {\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"01\",\n \"display\": \"Number present and verified\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\n \"version\": \"1.0.0\"\n }\n ]\n }\n }\n ],\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n ],\n \"name\": [\n {\n \"family\": \"SHEPP\",\n \"given\": [\n \"Ashley\",\n \"Ellen\"\n ],\n \"period\": {\n \"start\": \"2025-08-06\"\n },\n \"prefix\": [\n \"MS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898717\",\n \"resource\": {\n \"id\": \"9736898717\",\n \"meta\": {\n \"security\": [\n {\n \"code\": \"U\",\n \"display\": \"unrestricted\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-Confidentiality\"\n },\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ],\n \"versionId\": \"4\"\n },\n \"address\": [\n {\n \"extension\": [\n {\n \"extension\": [\n {\n \"url\": \"type\",\n \"valueCoding\": {\n \"code\": \"PAF\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType\"\n }\n },\n {\n \"url\": \"value\",\n \"valueString\": \"16654057\"\n }\n ],\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey\"\n }\n ],\n \"id\": \"YoGEf\",\n \"line\": [\n \"GLENVILLE\",\n \"FERRY ROAD\",\n \"GOXHILL\",\n \"BARROW-UPON-HUMBER\",\n \"S HUMBERSIDE\"\n ],\n \"period\": {\n \"start\": \"2016-04-09\"\n },\n \"postalCode\": \"DN19 7JY\",\n \"use\": \"home\"\n }\n ],\n \"birthDate\": \"2010-05-31\",\n \"gender\": \"male\",\n \"generalPractitioner\": [\n {\n \"id\": \"bYoHa\",\n \"identifier\": {\n \"period\": {\n \"start\": \"2016-02-12\"\n },\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A20047\"\n }\n }\n ],\n \"identifier\": [\n {\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"01\",\n \"display\": \"Number present and verified\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\n \"version\": \"1.0.0\"\n }\n ]\n }\n }\n ],\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n ],\n \"name\": [\n {\n \"family\": \"CASH\",\n \"given\": [\n \"Jacob\",\n \"Chas\"\n ],\n \"period\": {\n \"start\": \"2025-07-22\"\n },\n \"prefix\": [\n \"MR\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/ZfgKO\",\n \"resource\": {\n \"id\": \"ZfgKO\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/UwTCq\",\n \"resource\": {\n \"id\": \"UwTCq\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" }, { "name": "Proxy roles returned - Filtered by status 'inactive'", @@ -552,7 +552,7 @@ } ], "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:09:14Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9736898156&status=inactive\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/750cb586-eb9b-46c7-a1a5-711307a087af\",\n \"resource\": {\n \"id\": \"750cb586-eb9b-46c7-a1a5-711307a087af\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T10:55:53Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898652\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2025-12-05\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"inactive\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n }\n ]\n}" + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:09:14Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9736898156&status=inactive\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/750cb586-eb9b-46c7-a1a5-711307a087af\",\n \"resource\": {\n \"id\": \"750cb586-eb9b-46c7-a1a5-711307a087af\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-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\": \"9736898156\"\n }\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T10:55:53Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898652\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2025-12-05\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"inactive\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n }\n ]\n}" }, { "name": "Proxy roles returned - Filtered by status 'active' and include patient and performer details", @@ -655,7 +655,7 @@ } ], "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:09:40Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9736898156&status=active&_include=Consent%3Aperformer&_include=Consent%3Apatient\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40\",\n \"resource\": {\n \"id\": \"4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:08:46Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898660\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-12-05\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898660\",\n \"resource\": {\n \"id\": \"9736898660\",\n \"meta\": {\n \"security\": [\n {\n \"code\": \"U\",\n \"display\": \"unrestricted\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-Confidentiality\"\n },\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ],\n \"versionId\": \"4\"\n },\n \"address\": [\n {\n \"extension\": [\n {\n \"extension\": [\n {\n \"url\": \"type\",\n \"valueCoding\": {\n \"code\": \"PAF\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType\"\n }\n },\n {\n \"url\": \"value\",\n \"valueString\": \"19976537\"\n }\n ],\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey\"\n }\n ],\n \"id\": \"pBQDr\",\n \"line\": [\n \"CARLTON\",\n \"VICARAGE LANE\",\n \"REDBOURNE\",\n \"GAINSBOROUGH\",\n \"LINCS\"\n ],\n \"period\": {\n \"start\": \"2025-07-15\"\n },\n \"postalCode\": \"DN21 4QW\",\n \"use\": \"home\"\n }\n ],\n \"birthDate\": \"2012-04-24\",\n \"gender\": \"female\",\n \"generalPractitioner\": [\n {\n \"id\": \"xSEnH\",\n \"identifier\": {\n \"period\": {\n \"start\": \"2024-11-06\"\n },\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A20047\"\n }\n }\n ],\n \"identifier\": [\n {\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"01\",\n \"display\": \"Number present and verified\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\n \"version\": \"1.0.0\"\n }\n ]\n }\n }\n ],\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898660\"\n }\n ],\n \"name\": [\n {\n \"family\": \"GODREY\",\n \"given\": [\n \"Davina\",\n \"Linda\"\n ],\n \"period\": {\n \"start\": \"2017-04-22\"\n },\n \"prefix\": [\n \"MISS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/nVLgl\",\n \"resource\": {\n \"id\": \"nVLgl\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898660\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:09:40Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9736898156&status=active&_include=Consent%3Aperformer&_include=Consent%3Apatient\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40\",\n \"resource\": {\n \"id\": \"4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-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\": \"9736898156\"\n }\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:08:46Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898660\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-12-05\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898660\",\n \"resource\": {\n \"id\": \"9736898660\",\n \"meta\": {\n \"security\": [\n {\n \"code\": \"U\",\n \"display\": \"unrestricted\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-Confidentiality\"\n },\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ],\n \"versionId\": \"4\"\n },\n \"address\": [\n {\n \"extension\": [\n {\n \"extension\": [\n {\n \"url\": \"type\",\n \"valueCoding\": {\n \"code\": \"PAF\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType\"\n }\n },\n {\n \"url\": \"value\",\n \"valueString\": \"19976537\"\n }\n ],\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey\"\n }\n ],\n \"id\": \"pBQDr\",\n \"line\": [\n \"CARLTON\",\n \"VICARAGE LANE\",\n \"REDBOURNE\",\n \"GAINSBOROUGH\",\n \"LINCS\"\n ],\n \"period\": {\n \"start\": \"2025-07-15\"\n },\n \"postalCode\": \"DN21 4QW\",\n \"use\": \"home\"\n }\n ],\n \"birthDate\": \"2012-04-24\",\n \"gender\": \"female\",\n \"generalPractitioner\": [\n {\n \"id\": \"xSEnH\",\n \"identifier\": {\n \"period\": {\n \"start\": \"2024-11-06\"\n },\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A20047\"\n }\n }\n ],\n \"identifier\": [\n {\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"01\",\n \"display\": \"Number present and verified\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\n \"version\": \"1.0.0\"\n }\n ]\n }\n }\n ],\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898660\"\n }\n ],\n \"name\": [\n {\n \"family\": \"GODREY\",\n \"given\": [\n \"Davina\",\n \"Linda\"\n ],\n \"period\": {\n \"start\": \"2017-04-22\"\n },\n \"prefix\": [\n \"MISS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/nVLgl\",\n \"resource\": {\n \"id\": \"nVLgl\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898660\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" } ] }, @@ -817,7 +817,7 @@ } ], "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:17:19Z\",\n \"total\": 2,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?patient%3Aidentifier=9736898644\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"resource\": {\n \"id\": \"7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n },\n {\n \"url\": \"http://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 \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T10:46:27Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"resource\": {\n \"id\": \"553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:15:26Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n }\n ]\n}" + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:17:19Z\",\n \"total\": 2,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?patient%3Aidentifier=9736898644\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"resource\": {\n \"id\": \"7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-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 \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T10:46:27Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"resource\": {\n \"id\": \"553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-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\": \"9736898121\"\n }\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:15:26Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n }\n ]\n}" }, { "name": "Proxy roles returned - Include performer details", @@ -912,7 +912,7 @@ } ], "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:17:45Z\",\n \"total\": 2,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?patient%3Aidentifier=9736898644&_include=Consent%3Aperformer\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"resource\": {\n \"id\": \"7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n },\n {\n \"url\": \"http://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 \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T10:46:27Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"resource\": {\n \"id\": \"553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:15:26Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/ZfgKO\",\n \"resource\": {\n \"id\": \"ZfgKO\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/EAONj\",\n \"resource\": {\n \"id\": \"EAONj\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:17:45Z\",\n \"total\": 2,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?patient%3Aidentifier=9736898644&_include=Consent%3Aperformer\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"resource\": {\n \"id\": \"7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-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 \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T10:46:27Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"resource\": {\n \"id\": \"553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-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\": \"9736898121\"\n }\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:15:26Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/ZfgKO\",\n \"resource\": {\n \"id\": \"ZfgKO\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/EAONj\",\n \"resource\": {\n \"id\": \"EAONj\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" }, { "name": "Proxy roles returned - Include patient details", @@ -1007,7 +1007,7 @@ } ], "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:18:02Z\",\n \"total\": 2,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?patient%3Aidentifier=9736898644&_include=Consent%3Apatient\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"resource\": {\n \"id\": \"7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n },\n {\n \"url\": \"http://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 \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T10:46:27Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"resource\": {\n \"id\": \"553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:15:26Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898644\",\n \"resource\": {\n \"id\": \"9736898644\",\n \"meta\": {\n \"security\": [\n {\n \"code\": \"U\",\n \"display\": \"unrestricted\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-Confidentiality\"\n },\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ],\n \"versionId\": \"4\"\n },\n \"address\": [\n {\n \"extension\": [\n {\n \"extension\": [\n {\n \"url\": \"type\",\n \"valueCoding\": {\n \"code\": \"PAF\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType\"\n }\n },\n {\n \"url\": \"value\",\n \"valueString\": \"29706100\"\n }\n ],\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey\"\n }\n ],\n \"id\": \"gDmhc\",\n \"line\": [\n \"BRAMBLE COTTAGE\",\n \"OLD VICARAGE PARK\",\n \"SCAWBY\",\n \"BRIGG\",\n \"S HUMBERSIDE\"\n ],\n \"period\": {\n \"start\": \"2021-09-10\"\n },\n \"postalCode\": \"DN20 9RL\",\n \"use\": \"home\"\n }\n ],\n \"birthDate\": \"2015-09-26\",\n \"gender\": \"female\",\n \"generalPractitioner\": [\n {\n \"id\": \"gDHTb\",\n \"identifier\": {\n \"period\": {\n \"start\": \"2018-08-22\"\n },\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A20047\"\n }\n }\n ],\n \"identifier\": [\n {\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"01\",\n \"display\": \"Number present and verified\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\n \"version\": \"1.0.0\"\n }\n ]\n }\n }\n ],\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n ],\n \"name\": [\n {\n \"family\": \"SHEPP\",\n \"given\": [\n \"Ashley\",\n \"Ellen\"\n ],\n \"period\": {\n \"start\": \"2025-08-06\"\n },\n \"prefix\": [\n \"MS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:18:02Z\",\n \"total\": 2,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?patient%3Aidentifier=9736898644&_include=Consent%3Apatient\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"resource\": {\n \"id\": \"7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-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 \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T10:46:27Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"resource\": {\n \"id\": \"553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-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\": \"9736898121\"\n }\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:15:26Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898644\",\n \"resource\": {\n \"id\": \"9736898644\",\n \"meta\": {\n \"security\": [\n {\n \"code\": \"U\",\n \"display\": \"unrestricted\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-Confidentiality\"\n },\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ],\n \"versionId\": \"4\"\n },\n \"address\": [\n {\n \"extension\": [\n {\n \"extension\": [\n {\n \"url\": \"type\",\n \"valueCoding\": {\n \"code\": \"PAF\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType\"\n }\n },\n {\n \"url\": \"value\",\n \"valueString\": \"29706100\"\n }\n ],\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey\"\n }\n ],\n \"id\": \"gDmhc\",\n \"line\": [\n \"BRAMBLE COTTAGE\",\n \"OLD VICARAGE PARK\",\n \"SCAWBY\",\n \"BRIGG\",\n \"S HUMBERSIDE\"\n ],\n \"period\": {\n \"start\": \"2021-09-10\"\n },\n \"postalCode\": \"DN20 9RL\",\n \"use\": \"home\"\n }\n ],\n \"birthDate\": \"2015-09-26\",\n \"gender\": \"female\",\n \"generalPractitioner\": [\n {\n \"id\": \"gDHTb\",\n \"identifier\": {\n \"period\": {\n \"start\": \"2018-08-22\"\n },\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A20047\"\n }\n }\n ],\n \"identifier\": [\n {\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"01\",\n \"display\": \"Number present and verified\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\n \"version\": \"1.0.0\"\n }\n ]\n }\n }\n ],\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n ],\n \"name\": [\n {\n \"family\": \"SHEPP\",\n \"given\": [\n \"Ashley\",\n \"Ellen\"\n ],\n \"period\": {\n \"start\": \"2025-08-06\"\n },\n \"prefix\": [\n \"MS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" }, { "name": "Proxy roles returned - Include patient and performer details", @@ -1106,7 +1106,7 @@ } ], "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:18:17Z\",\n \"total\": 2,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?patient%3Aidentifier=9736898644&_include=Consent%3Aperformer&_include=Consent%3Apatient\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"resource\": {\n \"id\": \"7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n },\n {\n \"url\": \"http://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 \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T10:46:27Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"resource\": {\n \"id\": \"553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:15:26Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898644\",\n \"resource\": {\n \"id\": \"9736898644\",\n \"meta\": {\n \"security\": [\n {\n \"code\": \"U\",\n \"display\": \"unrestricted\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-Confidentiality\"\n },\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ],\n \"versionId\": \"4\"\n },\n \"address\": [\n {\n \"extension\": [\n {\n \"extension\": [\n {\n \"url\": \"type\",\n \"valueCoding\": {\n \"code\": \"PAF\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType\"\n }\n },\n {\n \"url\": \"value\",\n \"valueString\": \"29706100\"\n }\n ],\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey\"\n }\n ],\n \"id\": \"gDmhc\",\n \"line\": [\n \"BRAMBLE COTTAGE\",\n \"OLD VICARAGE PARK\",\n \"SCAWBY\",\n \"BRIGG\",\n \"S HUMBERSIDE\"\n ],\n \"period\": {\n \"start\": \"2021-09-10\"\n },\n \"postalCode\": \"DN20 9RL\",\n \"use\": \"home\"\n }\n ],\n \"birthDate\": \"2015-09-26\",\n \"gender\": \"female\",\n \"generalPractitioner\": [\n {\n \"id\": \"gDHTb\",\n \"identifier\": {\n \"period\": {\n \"start\": \"2018-08-22\"\n },\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A20047\"\n }\n }\n ],\n \"identifier\": [\n {\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"01\",\n \"display\": \"Number present and verified\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\n \"version\": \"1.0.0\"\n }\n ]\n }\n }\n ],\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n ],\n \"name\": [\n {\n \"family\": \"SHEPP\",\n \"given\": [\n \"Ashley\",\n \"Ellen\"\n ],\n \"period\": {\n \"start\": \"2025-08-06\"\n },\n \"prefix\": [\n \"MS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/ZfgKO\",\n \"resource\": {\n \"id\": \"ZfgKO\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/EAONj\",\n \"resource\": {\n \"id\": \"EAONj\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:18:17Z\",\n \"total\": 2,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?patient%3Aidentifier=9736898644&_include=Consent%3Aperformer&_include=Consent%3Apatient\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"resource\": {\n \"id\": \"7597397b-ac6e-4eb7-b49e-bb1636115d2e\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-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 \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T10:46:27Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"resource\": {\n \"id\": \"553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-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\": \"9736898121\"\n }\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:15:26Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898644\",\n \"resource\": {\n \"id\": \"9736898644\",\n \"meta\": {\n \"security\": [\n {\n \"code\": \"U\",\n \"display\": \"unrestricted\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-Confidentiality\"\n },\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ],\n \"versionId\": \"4\"\n },\n \"address\": [\n {\n \"extension\": [\n {\n \"extension\": [\n {\n \"url\": \"type\",\n \"valueCoding\": {\n \"code\": \"PAF\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType\"\n }\n },\n {\n \"url\": \"value\",\n \"valueString\": \"29706100\"\n }\n ],\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey\"\n }\n ],\n \"id\": \"gDmhc\",\n \"line\": [\n \"BRAMBLE COTTAGE\",\n \"OLD VICARAGE PARK\",\n \"SCAWBY\",\n \"BRIGG\",\n \"S HUMBERSIDE\"\n ],\n \"period\": {\n \"start\": \"2021-09-10\"\n },\n \"postalCode\": \"DN20 9RL\",\n \"use\": \"home\"\n }\n ],\n \"birthDate\": \"2015-09-26\",\n \"gender\": \"female\",\n \"generalPractitioner\": [\n {\n \"id\": \"gDHTb\",\n \"identifier\": {\n \"period\": {\n \"start\": \"2018-08-22\"\n },\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A20047\"\n }\n }\n ],\n \"identifier\": [\n {\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"01\",\n \"display\": \"Number present and verified\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\n \"version\": \"1.0.0\"\n }\n ]\n }\n }\n ],\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n ],\n \"name\": [\n {\n \"family\": \"SHEPP\",\n \"given\": [\n \"Ashley\",\n \"Ellen\"\n ],\n \"period\": {\n \"start\": \"2025-08-06\"\n },\n \"prefix\": [\n \"MS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/ZfgKO\",\n \"resource\": {\n \"id\": \"ZfgKO\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/EAONj\",\n \"resource\": {\n \"id\": \"EAONj\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" }, { "name": "Proxy roles returned - Filtered by status 'inactive'", @@ -1201,7 +1201,7 @@ } ], "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:18:37Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?patient%3Aidentifier=9736898717&status=inactive\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/cf7bc8e6-f8e0-41c5-8d08-1741eee5a256\",\n \"resource\": {\n \"id\": \"cf7bc8e6-f8e0-41c5-8d08-1741eee5a256\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:16:43Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"inactive\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n }\n ]\n}" + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:18:37Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?patient%3Aidentifier=9736898717&status=inactive\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/cf7bc8e6-f8e0-41c5-8d08-1741eee5a256\",\n \"resource\": {\n \"id\": \"cf7bc8e6-f8e0-41c5-8d08-1741eee5a256\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-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\": \"9736898121\"\n }\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:16:43Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"inactive\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n }\n ]\n}" }, { "name": "Proxy roles returned - Filtered by status 'active' and include patient and performer details", @@ -1304,7 +1304,7 @@ } ], "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:18:51Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?patient%3Aidentifier=9736898717&status=active&_include=Consent%3Aperformer&_include=Consent%3Apatient\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/b22d6068-fe78-40f4-b71a-b916dac48c0b\",\n \"resource\": {\n \"id\": \"b22d6068-fe78-40f4-b71a-b916dac48c0b\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n },\n {\n \"url\": \"http://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 \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T10:47:43Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898717\",\n \"resource\": {\n \"id\": \"9736898717\",\n \"meta\": {\n \"security\": [\n {\n \"code\": \"U\",\n \"display\": \"unrestricted\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-Confidentiality\"\n },\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ],\n \"versionId\": \"4\"\n },\n \"address\": [\n {\n \"extension\": [\n {\n \"extension\": [\n {\n \"url\": \"type\",\n \"valueCoding\": {\n \"code\": \"PAF\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType\"\n }\n },\n {\n \"url\": \"value\",\n \"valueString\": \"16654057\"\n }\n ],\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey\"\n }\n ],\n \"id\": \"YoGEf\",\n \"line\": [\n \"GLENVILLE\",\n \"FERRY ROAD\",\n \"GOXHILL\",\n \"BARROW-UPON-HUMBER\",\n \"S HUMBERSIDE\"\n ],\n \"period\": {\n \"start\": \"2016-04-09\"\n },\n \"postalCode\": \"DN19 7JY\",\n \"use\": \"home\"\n }\n ],\n \"birthDate\": \"2010-05-31\",\n \"gender\": \"male\",\n \"generalPractitioner\": [\n {\n \"id\": \"bYoHa\",\n \"identifier\": {\n \"period\": {\n \"start\": \"2016-02-12\"\n },\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A20047\"\n }\n }\n ],\n \"identifier\": [\n {\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"01\",\n \"display\": \"Number present and verified\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\n \"version\": \"1.0.0\"\n }\n ]\n }\n }\n ],\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n ],\n \"name\": [\n {\n \"family\": \"CASH\",\n \"given\": [\n \"Jacob\",\n \"Chas\"\n ],\n \"period\": {\n \"start\": \"2025-07-22\"\n },\n \"prefix\": [\n \"MR\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/UwTCq\",\n \"resource\": {\n \"id\": \"UwTCq\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:18:51Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?patient%3Aidentifier=9736898717&status=active&_include=Consent%3Aperformer&_include=Consent%3Apatient\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/b22d6068-fe78-40f4-b71a-b916dac48c0b\",\n \"resource\": {\n \"id\": \"b22d6068-fe78-40f4-b71a-b916dac48c0b\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-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 \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T10:47:43Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898717\",\n \"resource\": {\n \"id\": \"9736898717\",\n \"meta\": {\n \"security\": [\n {\n \"code\": \"U\",\n \"display\": \"unrestricted\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-Confidentiality\"\n },\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ],\n \"versionId\": \"4\"\n },\n \"address\": [\n {\n \"extension\": [\n {\n \"extension\": [\n {\n \"url\": \"type\",\n \"valueCoding\": {\n \"code\": \"PAF\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType\"\n }\n },\n {\n \"url\": \"value\",\n \"valueString\": \"16654057\"\n }\n ],\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey\"\n }\n ],\n \"id\": \"YoGEf\",\n \"line\": [\n \"GLENVILLE\",\n \"FERRY ROAD\",\n \"GOXHILL\",\n \"BARROW-UPON-HUMBER\",\n \"S HUMBERSIDE\"\n ],\n \"period\": {\n \"start\": \"2016-04-09\"\n },\n \"postalCode\": \"DN19 7JY\",\n \"use\": \"home\"\n }\n ],\n \"birthDate\": \"2010-05-31\",\n \"gender\": \"male\",\n \"generalPractitioner\": [\n {\n \"id\": \"bYoHa\",\n \"identifier\": {\n \"period\": {\n \"start\": \"2016-02-12\"\n },\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A20047\"\n }\n }\n ],\n \"identifier\": [\n {\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"01\",\n \"display\": \"Number present and verified\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\n \"version\": \"1.0.0\"\n }\n ]\n }\n }\n ],\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n ],\n \"name\": [\n {\n \"family\": \"CASH\",\n \"given\": [\n \"Jacob\",\n \"Chas\"\n ],\n \"period\": {\n \"start\": \"2025-07-22\"\n },\n \"prefix\": [\n \"MR\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/UwTCq\",\n \"resource\": {\n \"id\": \"UwTCq\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898717\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" } ] }, @@ -1474,7 +1474,7 @@ } ], "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:19:27Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9736898121&patient%3Aidentifier=9736898644\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"resource\": {\n \"id\": \"553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:15:26Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n }\n ]\n}" + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:19:27Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9736898121&patient%3Aidentifier=9736898644\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"resource\": {\n \"id\": \"553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-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\": \"9736898121\"\n }\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:15:26Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n }\n ]\n}" }, { "name": "Proxy roles returned - Include performer details", @@ -1573,7 +1573,7 @@ } ], "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:19:44Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9736898121&patient%3Aidentifier=9736898644&_include=Consent%3Aperformer\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"resource\": {\n \"id\": \"553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:15:26Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/EAONj\",\n \"resource\": {\n \"id\": \"EAONj\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:19:44Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9736898121&patient%3Aidentifier=9736898644&_include=Consent%3Aperformer\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"resource\": {\n \"id\": \"553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-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\": \"9736898121\"\n }\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:15:26Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/EAONj\",\n \"resource\": {\n \"id\": \"EAONj\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" }, { "name": "Proxy roles returned - Include patient details", @@ -1672,7 +1672,7 @@ } ], "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:19:56Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9736898121&patient%3Aidentifier=9736898644&_include=Consent%3Apatient\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"resource\": {\n \"id\": \"553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:15:26Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898644\",\n \"resource\": {\n \"id\": \"9736898644\",\n \"meta\": {\n \"security\": [\n {\n \"code\": \"U\",\n \"display\": \"unrestricted\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-Confidentiality\"\n },\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ],\n \"versionId\": \"4\"\n },\n \"address\": [\n {\n \"extension\": [\n {\n \"extension\": [\n {\n \"url\": \"type\",\n \"valueCoding\": {\n \"code\": \"PAF\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType\"\n }\n },\n {\n \"url\": \"value\",\n \"valueString\": \"29706100\"\n }\n ],\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey\"\n }\n ],\n \"id\": \"gDmhc\",\n \"line\": [\n \"BRAMBLE COTTAGE\",\n \"OLD VICARAGE PARK\",\n \"SCAWBY\",\n \"BRIGG\",\n \"S HUMBERSIDE\"\n ],\n \"period\": {\n \"start\": \"2021-09-10\"\n },\n \"postalCode\": \"DN20 9RL\",\n \"use\": \"home\"\n }\n ],\n \"birthDate\": \"2015-09-26\",\n \"gender\": \"female\",\n \"generalPractitioner\": [\n {\n \"id\": \"gDHTb\",\n \"identifier\": {\n \"period\": {\n \"start\": \"2018-08-22\"\n },\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A20047\"\n }\n }\n ],\n \"identifier\": [\n {\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"01\",\n \"display\": \"Number present and verified\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\n \"version\": \"1.0.0\"\n }\n ]\n }\n }\n ],\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n ],\n \"name\": [\n {\n \"family\": \"SHEPP\",\n \"given\": [\n \"Ashley\",\n \"Ellen\"\n ],\n \"period\": {\n \"start\": \"2025-08-06\"\n },\n \"prefix\": [\n \"MS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:19:56Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9736898121&patient%3Aidentifier=9736898644&_include=Consent%3Apatient\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"resource\": {\n \"id\": \"553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-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\": \"9736898121\"\n }\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:15:26Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898644\",\n \"resource\": {\n \"id\": \"9736898644\",\n \"meta\": {\n \"security\": [\n {\n \"code\": \"U\",\n \"display\": \"unrestricted\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-Confidentiality\"\n },\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ],\n \"versionId\": \"4\"\n },\n \"address\": [\n {\n \"extension\": [\n {\n \"extension\": [\n {\n \"url\": \"type\",\n \"valueCoding\": {\n \"code\": \"PAF\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType\"\n }\n },\n {\n \"url\": \"value\",\n \"valueString\": \"29706100\"\n }\n ],\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey\"\n }\n ],\n \"id\": \"gDmhc\",\n \"line\": [\n \"BRAMBLE COTTAGE\",\n \"OLD VICARAGE PARK\",\n \"SCAWBY\",\n \"BRIGG\",\n \"S HUMBERSIDE\"\n ],\n \"period\": {\n \"start\": \"2021-09-10\"\n },\n \"postalCode\": \"DN20 9RL\",\n \"use\": \"home\"\n }\n ],\n \"birthDate\": \"2015-09-26\",\n \"gender\": \"female\",\n \"generalPractitioner\": [\n {\n \"id\": \"gDHTb\",\n \"identifier\": {\n \"period\": {\n \"start\": \"2018-08-22\"\n },\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A20047\"\n }\n }\n ],\n \"identifier\": [\n {\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"01\",\n \"display\": \"Number present and verified\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\n \"version\": \"1.0.0\"\n }\n ]\n }\n }\n ],\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n ],\n \"name\": [\n {\n \"family\": \"SHEPP\",\n \"given\": [\n \"Ashley\",\n \"Ellen\"\n ],\n \"period\": {\n \"start\": \"2025-08-06\"\n },\n \"prefix\": [\n \"MS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" }, { "name": "Proxy roles returned - Include patient and performer details", @@ -1775,7 +1775,7 @@ } ], "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:20:24Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9736898121&patient%3Aidentifier=9736898644&_include=Consent%3Aperformer&_include=Consent%3Apatient\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"resource\": {\n \"id\": \"553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:15:26Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898644\",\n \"resource\": {\n \"id\": \"9736898644\",\n \"meta\": {\n \"security\": [\n {\n \"code\": \"U\",\n \"display\": \"unrestricted\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-Confidentiality\"\n },\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ],\n \"versionId\": \"4\"\n },\n \"address\": [\n {\n \"extension\": [\n {\n \"extension\": [\n {\n \"url\": \"type\",\n \"valueCoding\": {\n \"code\": \"PAF\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType\"\n }\n },\n {\n \"url\": \"value\",\n \"valueString\": \"29706100\"\n }\n ],\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey\"\n }\n ],\n \"id\": \"gDmhc\",\n \"line\": [\n \"BRAMBLE COTTAGE\",\n \"OLD VICARAGE PARK\",\n \"SCAWBY\",\n \"BRIGG\",\n \"S HUMBERSIDE\"\n ],\n \"period\": {\n \"start\": \"2021-09-10\"\n },\n \"postalCode\": \"DN20 9RL\",\n \"use\": \"home\"\n }\n ],\n \"birthDate\": \"2015-09-26\",\n \"gender\": \"female\",\n \"generalPractitioner\": [\n {\n \"id\": \"gDHTb\",\n \"identifier\": {\n \"period\": {\n \"start\": \"2018-08-22\"\n },\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A20047\"\n }\n }\n ],\n \"identifier\": [\n {\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"01\",\n \"display\": \"Number present and verified\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\n \"version\": \"1.0.0\"\n }\n ]\n }\n }\n ],\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n ],\n \"name\": [\n {\n \"family\": \"SHEPP\",\n \"given\": [\n \"Ashley\",\n \"Ellen\"\n ],\n \"period\": {\n \"start\": \"2025-08-06\"\n },\n \"prefix\": [\n \"MS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/EAONj\",\n \"resource\": {\n \"id\": \"EAONj\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:20:24Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9736898121&patient%3Aidentifier=9736898644&_include=Consent%3Aperformer&_include=Consent%3Apatient\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"resource\": {\n \"id\": \"553ee1cd-1acd-48bb-a918-4a6434ab39b2\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-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\": \"9736898121\"\n }\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:15:26Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898121\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-11-23\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898644\",\n \"resource\": {\n \"id\": \"9736898644\",\n \"meta\": {\n \"security\": [\n {\n \"code\": \"U\",\n \"display\": \"unrestricted\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-Confidentiality\"\n },\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ],\n \"versionId\": \"4\"\n },\n \"address\": [\n {\n \"extension\": [\n {\n \"extension\": [\n {\n \"url\": \"type\",\n \"valueCoding\": {\n \"code\": \"PAF\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType\"\n }\n },\n {\n \"url\": \"value\",\n \"valueString\": \"29706100\"\n }\n ],\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey\"\n }\n ],\n \"id\": \"gDmhc\",\n \"line\": [\n \"BRAMBLE COTTAGE\",\n \"OLD VICARAGE PARK\",\n \"SCAWBY\",\n \"BRIGG\",\n \"S HUMBERSIDE\"\n ],\n \"period\": {\n \"start\": \"2021-09-10\"\n },\n \"postalCode\": \"DN20 9RL\",\n \"use\": \"home\"\n }\n ],\n \"birthDate\": \"2015-09-26\",\n \"gender\": \"female\",\n \"generalPractitioner\": [\n {\n \"id\": \"gDHTb\",\n \"identifier\": {\n \"period\": {\n \"start\": \"2018-08-22\"\n },\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A20047\"\n }\n }\n ],\n \"identifier\": [\n {\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"01\",\n \"display\": \"Number present and verified\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\n \"version\": \"1.0.0\"\n }\n ]\n }\n }\n ],\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n ],\n \"name\": [\n {\n \"family\": \"SHEPP\",\n \"given\": [\n \"Ashley\",\n \"Ellen\"\n ],\n \"period\": {\n \"start\": \"2025-08-06\"\n },\n \"prefix\": [\n \"MS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/EAONj\",\n \"resource\": {\n \"id\": \"EAONj\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898644\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" }, { "name": "Proxy roles returned - Filtered by status 'inactive'", @@ -1874,7 +1874,7 @@ } ], "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:21:09Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9736898156&patient%3Aidentifier=9736898652&status=inactive\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/750cb586-eb9b-46c7-a1a5-711307a087af\",\n \"resource\": {\n \"id\": \"750cb586-eb9b-46c7-a1a5-711307a087af\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T10:55:53Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898652\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2025-12-05\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"inactive\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n }\n ]\n}" + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:21:09Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9736898156&patient%3Aidentifier=9736898652&status=inactive\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/750cb586-eb9b-46c7-a1a5-711307a087af\",\n \"resource\": {\n \"id\": \"750cb586-eb9b-46c7-a1a5-711307a087af\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-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\": \"9736898156\"\n }\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T10:55:53Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898652\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2025-12-05\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"inactive\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n }\n ]\n}" }, { "name": "Proxy roles returned - Filtered by status 'active' and include patient and performer details", @@ -2246,7 +2246,7 @@ } ], "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:22:15Z\",\n \"total\": 2,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9674998454&_include=Consent%3Apatient\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/92a66114\",\n \"resource\": {\n \"id\": \"92a66114\",\n \"extension\": [\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998454\"\n }\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:22:15.290954+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998640\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998454\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/0b02be0a\",\n \"resource\": {\n \"id\": \"0b02be0a\",\n \"extension\": [\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998454\"\n }\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:22:15.290994+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998543\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998454\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/934bfd54\",\n \"resource\": {\n \"id\": \"934bfd54\",\n \"meta\": {\n \"profile\": [\n \"https://fhir.hl7.org.uk/StructureDefinition/UKCore-Patient\"\n ],\n \"security\": [\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ]\n },\n \"birthDate\": \"1998-11-14\",\n \"generalPractitioner\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A82648\"\n }\n }\n ],\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998640\"\n }\n ],\n \"name\": [\n {\n \"text\": \"Mr Harry Hood\",\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/29b6ab39\",\n \"resource\": {\n \"id\": \"29b6ab39\",\n \"meta\": {\n \"profile\": [\n \"https://fhir.hl7.org.uk/StructureDefinition/UKCore-Patient\"\n ],\n \"security\": [\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ]\n },\n \"birthDate\": \"1930-11-02\",\n \"generalPractitioner\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A82648\"\n }\n }\n ],\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998543\"\n }\n ],\n \"name\": [\n {\n \"text\": \"Miss Lisa Hankey\",\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:22:15Z\",\n \"total\": 2,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9674998454&_include=Consent%3Apatient\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/92a66114\",\n \"resource\": {\n \"id\": \"92a66114\",\n \"extension\": [\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\": \"9674998454\"\n }\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:22:15.290954+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998640\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998454\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/0b02be0a\",\n \"resource\": {\n \"id\": \"0b02be0a\",\n \"extension\": [\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\": \"9674998454\"\n }\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:22:15.290994+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998543\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998454\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/934bfd54\",\n \"resource\": {\n \"id\": \"934bfd54\",\n \"meta\": {\n \"profile\": [\n \"https://fhir.hl7.org.uk/StructureDefinition/UKCore-Patient\"\n ],\n \"security\": [\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ]\n },\n \"birthDate\": \"1998-11-14\",\n \"generalPractitioner\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A82648\"\n }\n }\n ],\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998640\"\n }\n ],\n \"name\": [\n {\n \"text\": \"Mr Harry Hood\",\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/29b6ab39\",\n \"resource\": {\n \"id\": \"29b6ab39\",\n \"meta\": {\n \"profile\": [\n \"https://fhir.hl7.org.uk/StructureDefinition/UKCore-Patient\"\n ],\n \"security\": [\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ]\n },\n \"birthDate\": \"1930-11-02\",\n \"generalPractitioner\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A82648\"\n }\n }\n ],\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998543\"\n }\n ],\n \"name\": [\n {\n \"text\": \"Miss Lisa Hankey\",\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" }, { "name": "No linked profiles returned from NAM - EMIS user", @@ -2441,7 +2441,7 @@ } ], "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:24:08Z\",\n \"total\": 9,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9692113698&_include=Consent%3Aperformer\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/2993b769\",\n \"resource\": {\n \"id\": \"2993b769\",\n \"extension\": [\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:24:07.874676+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9661034451\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/c0d48822\",\n \"resource\": {\n \"id\": \"c0d48822\",\n \"extension\": [\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:24:07.874715+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998403\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/75d0c9dc\",\n \"resource\": {\n \"id\": \"75d0c9dc\",\n \"extension\": [\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:24:07.874739+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9661034400\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/2bed6c1e\",\n \"resource\": {\n \"id\": \"2bed6c1e\",\n \"extension\": [\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:24:07.874762+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9661034168\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/ed77c791\",\n \"resource\": {\n \"id\": \"ed77c791\",\n \"extension\": [\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:24:07.874785+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9253046414\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/02e9fe06\",\n \"resource\": {\n \"id\": \"02e9fe06\",\n \"extension\": [\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:24:07.874807+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9930725970\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/70f274ba\",\n \"resource\": {\n \"id\": \"70f274ba\",\n \"extension\": [\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:24:07.874830+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9803007025\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/87501704\",\n \"resource\": {\n \"id\": \"87501704\",\n \"extension\": [\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:24:07.874852+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9734615173\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/022a7290\",\n \"resource\": {\n \"id\": \"022a7290\",\n \"extension\": [\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:24:07.874874+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9694154065\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/4931d7ae\",\n \"resource\": {\n \"id\": \"4931d7ae\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9661034451\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/34e6ba88\",\n \"resource\": {\n \"id\": \"34e6ba88\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998403\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/1b0f7204\",\n \"resource\": {\n \"id\": \"1b0f7204\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9661034400\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/7115d670\",\n \"resource\": {\n \"id\": \"7115d670\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9661034168\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/63bd0423\",\n \"resource\": {\n \"id\": \"63bd0423\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9253046414\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/04683858\",\n \"resource\": {\n \"id\": \"04683858\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9930725970\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/e0cff956\",\n \"resource\": {\n \"id\": \"e0cff956\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9803007025\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/a9f54c1c\",\n \"resource\": {\n \"id\": \"a9f54c1c\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9734615173\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/8b794ba5\",\n \"resource\": {\n \"id\": \"8b794ba5\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9694154065\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:24:08Z\",\n \"total\": 9,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9692113698&_include=Consent%3Aperformer\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/2993b769\",\n \"resource\": {\n \"id\": \"2993b769\",\n \"extension\": [\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\": \"5785592290\"\n }\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:24:07.874676+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9661034451\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/c0d48822\",\n \"resource\": {\n \"id\": \"c0d48822\",\n \"extension\": [\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\": \"5785592290\"\n }\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:24:07.874715+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998403\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/75d0c9dc\",\n \"resource\": {\n \"id\": \"75d0c9dc\",\n \"extension\": [\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\": \"5785592290\"\n }\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:24:07.874739+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9661034400\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/2bed6c1e\",\n \"resource\": {\n \"id\": \"2bed6c1e\",\n \"extension\": [\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\": \"5785592290\"\n }\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:24:07.874762+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9661034168\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/ed77c791\",\n \"resource\": {\n \"id\": \"ed77c791\",\n \"extension\": [\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\": \"5785592290\"\n }\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:24:07.874785+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9253046414\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/02e9fe06\",\n \"resource\": {\n \"id\": \"02e9fe06\",\n \"extension\": [\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\": \"5785592290\"\n }\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:24:07.874807+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9930725970\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/70f274ba\",\n \"resource\": {\n \"id\": \"70f274ba\",\n \"extension\": [\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\": \"5785592290\"\n }\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:24:07.874830+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9803007025\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/87501704\",\n \"resource\": {\n \"id\": \"87501704\",\n \"extension\": [\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\": \"5785592290\"\n }\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:24:07.874852+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9734615173\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/022a7290\",\n \"resource\": {\n \"id\": \"022a7290\",\n \"extension\": [\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\": \"5785592290\"\n }\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:24:07.874874+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9694154065\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/4931d7ae\",\n \"resource\": {\n \"id\": \"4931d7ae\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9661034451\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/34e6ba88\",\n \"resource\": {\n \"id\": \"34e6ba88\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998403\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/1b0f7204\",\n \"resource\": {\n \"id\": \"1b0f7204\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9661034400\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/7115d670\",\n \"resource\": {\n \"id\": \"7115d670\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9661034168\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/63bd0423\",\n \"resource\": {\n \"id\": \"63bd0423\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9253046414\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/04683858\",\n \"resource\": {\n \"id\": \"04683858\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9930725970\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/e0cff956\",\n \"resource\": {\n \"id\": \"e0cff956\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9803007025\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/a9f54c1c\",\n \"resource\": {\n \"id\": \"a9f54c1c\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9734615173\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/8b794ba5\",\n \"resource\": {\n \"id\": \"8b794ba5\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"5785592290\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9694154065\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" } ] }, @@ -3786,7 +3786,7 @@ } ], "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:28:18Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40\",\n \"resource\": {\n \"id\": \"4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:08:46Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898660\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-12-05\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n }\n ]\n}" + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:28:18Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40\",\n \"resource\": {\n \"id\": \"4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-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\": \"9736898156\"\n }\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:08:46Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898660\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-12-05\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n }\n ]\n}" }, { "name": "Proxy role returned - Include performer details", @@ -3873,7 +3873,7 @@ } ], "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:28:47Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40?_include=Consent%3Aperformer\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40\",\n \"resource\": {\n \"id\": \"4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:08:46Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898660\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-12-05\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/nVLgl\",\n \"resource\": {\n \"id\": \"nVLgl\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898660\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:28:47Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40?_include=Consent%3Aperformer\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40\",\n \"resource\": {\n \"id\": \"4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-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\": \"9736898156\"\n }\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:08:46Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898660\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-12-05\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/nVLgl\",\n \"resource\": {\n \"id\": \"nVLgl\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898660\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" }, { "name": "Proxy role returned - Include patient details", @@ -3960,7 +3960,7 @@ } ], "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:29:08Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40?_include=Consent%3Apatient\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40\",\n \"resource\": {\n \"id\": \"4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:08:46Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898660\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-12-05\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898660\",\n \"resource\": {\n \"id\": \"9736898660\",\n \"meta\": {\n \"security\": [\n {\n \"code\": \"U\",\n \"display\": \"unrestricted\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-Confidentiality\"\n },\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ],\n \"versionId\": \"4\"\n },\n \"address\": [\n {\n \"extension\": [\n {\n \"extension\": [\n {\n \"url\": \"type\",\n \"valueCoding\": {\n \"code\": \"PAF\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType\"\n }\n },\n {\n \"url\": \"value\",\n \"valueString\": \"19976537\"\n }\n ],\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey\"\n }\n ],\n \"id\": \"pBQDr\",\n \"line\": [\n \"CARLTON\",\n \"VICARAGE LANE\",\n \"REDBOURNE\",\n \"GAINSBOROUGH\",\n \"LINCS\"\n ],\n \"period\": {\n \"start\": \"2025-07-15\"\n },\n \"postalCode\": \"DN21 4QW\",\n \"use\": \"home\"\n }\n ],\n \"birthDate\": \"2012-04-24\",\n \"gender\": \"female\",\n \"generalPractitioner\": [\n {\n \"id\": \"xSEnH\",\n \"identifier\": {\n \"period\": {\n \"start\": \"2024-11-06\"\n },\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A20047\"\n }\n }\n ],\n \"identifier\": [\n {\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"01\",\n \"display\": \"Number present and verified\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\n \"version\": \"1.0.0\"\n }\n ]\n }\n }\n ],\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898660\"\n }\n ],\n \"name\": [\n {\n \"family\": \"GODREY\",\n \"given\": [\n \"Davina\",\n \"Linda\"\n ],\n \"period\": {\n \"start\": \"2017-04-22\"\n },\n \"prefix\": [\n \"MISS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:29:08Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40?_include=Consent%3Apatient\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40\",\n \"resource\": {\n \"id\": \"4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-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\": \"9736898156\"\n }\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:08:46Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898660\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-12-05\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898660\",\n \"resource\": {\n \"id\": \"9736898660\",\n \"meta\": {\n \"security\": [\n {\n \"code\": \"U\",\n \"display\": \"unrestricted\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-Confidentiality\"\n },\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ],\n \"versionId\": \"4\"\n },\n \"address\": [\n {\n \"extension\": [\n {\n \"extension\": [\n {\n \"url\": \"type\",\n \"valueCoding\": {\n \"code\": \"PAF\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType\"\n }\n },\n {\n \"url\": \"value\",\n \"valueString\": \"19976537\"\n }\n ],\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey\"\n }\n ],\n \"id\": \"pBQDr\",\n \"line\": [\n \"CARLTON\",\n \"VICARAGE LANE\",\n \"REDBOURNE\",\n \"GAINSBOROUGH\",\n \"LINCS\"\n ],\n \"period\": {\n \"start\": \"2025-07-15\"\n },\n \"postalCode\": \"DN21 4QW\",\n \"use\": \"home\"\n }\n ],\n \"birthDate\": \"2012-04-24\",\n \"gender\": \"female\",\n \"generalPractitioner\": [\n {\n \"id\": \"xSEnH\",\n \"identifier\": {\n \"period\": {\n \"start\": \"2024-11-06\"\n },\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A20047\"\n }\n }\n ],\n \"identifier\": [\n {\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"01\",\n \"display\": \"Number present and verified\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\n \"version\": \"1.0.0\"\n }\n ]\n }\n }\n ],\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898660\"\n }\n ],\n \"name\": [\n {\n \"family\": \"GODREY\",\n \"given\": [\n \"Davina\",\n \"Linda\"\n ],\n \"period\": {\n \"start\": \"2017-04-22\"\n },\n \"prefix\": [\n \"MISS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" }, { "name": "Proxy role returned - Include performer and patient details", @@ -4051,7 +4051,7 @@ } ], "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:29:26Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40?_include=Consent%3Apatient&_include=Consent%3Aperformer\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40\",\n \"resource\": {\n \"id\": \"4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-reason\"\n }\n ]\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:08:46Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898660\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-12-05\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898660\",\n \"resource\": {\n \"id\": \"9736898660\",\n \"meta\": {\n \"security\": [\n {\n \"code\": \"U\",\n \"display\": \"unrestricted\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-Confidentiality\"\n },\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ],\n \"versionId\": \"4\"\n },\n \"address\": [\n {\n \"extension\": [\n {\n \"extension\": [\n {\n \"url\": \"type\",\n \"valueCoding\": {\n \"code\": \"PAF\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType\"\n }\n },\n {\n \"url\": \"value\",\n \"valueString\": \"19976537\"\n }\n ],\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey\"\n }\n ],\n \"id\": \"pBQDr\",\n \"line\": [\n \"CARLTON\",\n \"VICARAGE LANE\",\n \"REDBOURNE\",\n \"GAINSBOROUGH\",\n \"LINCS\"\n ],\n \"period\": {\n \"start\": \"2025-07-15\"\n },\n \"postalCode\": \"DN21 4QW\",\n \"use\": \"home\"\n }\n ],\n \"birthDate\": \"2012-04-24\",\n \"gender\": \"female\",\n \"generalPractitioner\": [\n {\n \"id\": \"xSEnH\",\n \"identifier\": {\n \"period\": {\n \"start\": \"2024-11-06\"\n },\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A20047\"\n }\n }\n ],\n \"identifier\": [\n {\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"01\",\n \"display\": \"Number present and verified\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\n \"version\": \"1.0.0\"\n }\n ]\n }\n }\n ],\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898660\"\n }\n ],\n \"name\": [\n {\n \"family\": \"GODREY\",\n \"given\": [\n \"Davina\",\n \"Linda\"\n ],\n \"period\": {\n \"start\": \"2017-04-22\"\n },\n \"prefix\": [\n \"MISS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/nVLgl\",\n \"resource\": {\n \"id\": \"nVLgl\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898660\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:29:26Z\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40?_include=Consent%3Apatient&_include=Consent%3Aperformer\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40\",\n \"resource\": {\n \"id\": \"4ee397cb-f4b8-4b8e-adfc-8d63a2b68b40\",\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consent-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\": \"9736898156\"\n }\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:08:46Z\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898660\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898156\"\n }\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"\n }\n ]\n }\n }\n ],\n \"period\": {\n \"end\": \"2030-12-05\",\n \"start\": \"2025-12-02\"\n }\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9736898660\",\n \"resource\": {\n \"id\": \"9736898660\",\n \"meta\": {\n \"security\": [\n {\n \"code\": \"U\",\n \"display\": \"unrestricted\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-Confidentiality\"\n },\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ],\n \"versionId\": \"4\"\n },\n \"address\": [\n {\n \"extension\": [\n {\n \"extension\": [\n {\n \"url\": \"type\",\n \"valueCoding\": {\n \"code\": \"PAF\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType\"\n }\n },\n {\n \"url\": \"value\",\n \"valueString\": \"19976537\"\n }\n ],\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey\"\n }\n ],\n \"id\": \"pBQDr\",\n \"line\": [\n \"CARLTON\",\n \"VICARAGE LANE\",\n \"REDBOURNE\",\n \"GAINSBOROUGH\",\n \"LINCS\"\n ],\n \"period\": {\n \"start\": \"2025-07-15\"\n },\n \"postalCode\": \"DN21 4QW\",\n \"use\": \"home\"\n }\n ],\n \"birthDate\": \"2012-04-24\",\n \"gender\": \"female\",\n \"generalPractitioner\": [\n {\n \"id\": \"xSEnH\",\n \"identifier\": {\n \"period\": {\n \"start\": \"2024-11-06\"\n },\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A20047\"\n }\n }\n ],\n \"identifier\": [\n {\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"code\": \"01\",\n \"display\": \"Number present and verified\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\n \"version\": \"1.0.0\"\n }\n ]\n }\n }\n ],\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898660\"\n }\n ],\n \"name\": [\n {\n \"family\": \"GODREY\",\n \"given\": [\n \"Davina\",\n \"Linda\"\n ],\n \"period\": {\n \"start\": \"2017-04-22\"\n },\n \"prefix\": [\n \"MISS\"\n ],\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/nVLgl\",\n \"resource\": {\n \"id\": \"nVLgl\",\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-CopyCorrespondenceIndicator\",\n \"valueBoolean\": true\n }\n ],\n \"active\": true,\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898660\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"CHILD\",\n \"display\": \"child\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/UKCore-AdditionalRelatedPersonRole\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"N\",\n \"display\": \"Next-of-Kin\",\n \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" } ] }, @@ -5817,7 +5817,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.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\": \"{{$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" @@ -5909,7 +5909,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.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.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898164\"\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\": \"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.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\": \"9736898164\"\n }\n }\n }\n ]\n}\n", "options": { "raw": { "language": "json" diff --git a/postman/validated_relationship_service.sandbox.postman_collection.json b/postman/validated_relationship_service.sandbox.postman_collection.json index 0a034e3d..84a9f64a 100644 --- a/postman/validated_relationship_service.sandbox.postman_collection.json +++ b/postman/validated_relationship_service.sandbox.postman_collection.json @@ -2231,7 +2231,7 @@ " }", " },", " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", + " \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", " \"valueReference\": {", " \"identifier\": {", " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", @@ -2407,7 +2407,7 @@ " }", " },", " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", + " \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", " \"valueReference\": {", " \"identifier\": {", " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", @@ -2591,7 +2591,7 @@ " }", " },", " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", + " \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", " \"valueReference\": {", " \"identifier\": {", " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", @@ -2685,7 +2685,7 @@ " }", " },", " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", + " \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", " \"valueReference\": {", " \"identifier\": {", " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", @@ -2849,7 +2849,7 @@ " }", " },", " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", + " \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", " \"valueReference\": {", " \"identifier\": {", " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", @@ -2942,7 +2942,7 @@ " }", " },", " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", + " \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", " \"valueReference\": {", " \"identifier\": {", " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", @@ -3035,7 +3035,7 @@ " }", " },", " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", + " \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", " \"valueReference\": {", " \"identifier\": {", " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", @@ -3128,7 +3128,7 @@ " }", " },", " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", + " \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", " \"valueReference\": {", " \"identifier\": {", " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", @@ -3290,7 +3290,7 @@ " }", " },", " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", + " \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", " \"valueReference\": {", " \"identifier\": {", " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", @@ -3383,7 +3383,7 @@ " }", " },", " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", + " \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", " \"valueReference\": {", " \"identifier\": {", " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", @@ -3476,7 +3476,7 @@ " }", " },", " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", + " \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", " \"valueReference\": {", " \"identifier\": {", " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", @@ -3680,7 +3680,7 @@ " }", " },", " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", + " \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", " \"valueReference\": {", " \"identifier\": {", " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", @@ -3823,7 +3823,7 @@ " }", " },", " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", + " \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", " \"valueReference\": {", " \"identifier\": {", " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", @@ -3966,7 +3966,7 @@ " }", " },", " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", + " \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", " \"valueReference\": {", " \"identifier\": {", " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", @@ -4162,7 +4162,7 @@ " }", " },", " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", + " \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", " \"valueReference\": {", " \"identifier\": {", " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", @@ -4288,7 +4288,7 @@ " }", " },", " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", + " \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", " \"valueReference\": {", " \"identifier\": {", " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", @@ -4414,7 +4414,7 @@ " }", " },", " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", + " \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", " \"valueReference\": {", " \"identifier\": {", " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", @@ -4664,7 +4664,7 @@ " }", " },", " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", + " \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", " \"valueReference\": {", " \"identifier\": {", " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", @@ -4840,7 +4840,7 @@ " }", " },", " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", + " \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", " \"valueReference\": {", " \"identifier\": {", " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", @@ -5016,7 +5016,7 @@ " }", " },", " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", + " \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", " \"valueReference\": {", " \"identifier\": {", " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", @@ -5174,7 +5174,7 @@ " }", " },", " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", + " \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", " \"valueReference\": {", " \"identifier\": {", " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", @@ -5267,7 +5267,7 @@ " }", " },", " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", + " \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", " \"valueReference\": {", " \"identifier\": {", " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", @@ -5360,7 +5360,7 @@ " }", " },", " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", + " \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", " \"valueReference\": {", " \"identifier\": {", " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", @@ -5602,7 +5602,7 @@ " }", " },", " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", + " \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", " \"valueReference\": {", " \"identifier\": {", " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", @@ -5728,7 +5728,7 @@ " }", " },", " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", + " \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", " \"valueReference\": {", " \"identifier\": {", " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", @@ -5854,7 +5854,7 @@ " }", " },", " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", + " \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", " \"valueReference\": {", " \"identifier\": {", " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", @@ -6054,7 +6054,7 @@ " }", " },", " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", + " \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", " \"valueReference\": {", " \"identifier\": {", " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", @@ -6180,7 +6180,7 @@ " }", " },", " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", + " \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", " \"valueReference\": {", " \"identifier\": {", " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", @@ -6306,7 +6306,7 @@ " }", " },", " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", + " \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", " \"valueReference\": {", " \"identifier\": {", " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", @@ -6510,7 +6510,7 @@ " }", " },", " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", + " \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", " \"valueReference\": {", " \"identifier\": {", " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", @@ -6603,7 +6603,7 @@ " }", " },", " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", + " \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", " \"valueReference\": {", " \"identifier\": {", " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", @@ -6696,7 +6696,7 @@ " }", " },", " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", + " \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", " \"valueReference\": {", " \"identifier\": {", " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", @@ -6906,7 +6906,7 @@ " }", " },", " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", + " \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", " \"valueReference\": {", " \"identifier\": {", " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", @@ -7139,7 +7139,7 @@ " }", " },", " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", + " \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", " \"valueReference\": {", " \"identifier\": {", " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", @@ -7296,7 +7296,7 @@ " }", " },", " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", + " \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", " \"valueReference\": {", " \"identifier\": {", " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", @@ -7538,7 +7538,7 @@ " }", " },", " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", + " \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", " \"valueReference\": {", " \"identifier\": {", " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", @@ -7839,7 +7839,7 @@ " }", " },", " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", + " \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", " \"valueReference\": {", " \"identifier\": {", " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", @@ -8524,7 +8524,7 @@ " }", " },", " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", + " \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", " \"valueReference\": {", " \"identifier\": {", " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", @@ -8719,7 +8719,7 @@ " }", " },", " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", + " \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", " \"valueReference\": {", " \"identifier\": {", " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", @@ -8903,7 +8903,7 @@ " }", " },", " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", + " \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", " \"valueReference\": {", " \"identifier\": {", " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", @@ -9137,7 +9137,7 @@ " }", " },", " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", + " \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", " \"valueReference\": {", " \"identifier\": {", " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", @@ -9292,7 +9292,7 @@ " }", " },", " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", + " \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", " \"valueReference\": {", " \"identifier\": {", " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", @@ -9483,7 +9483,7 @@ " }", " },", " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", + " \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", " \"valueReference\": {", " \"identifier\": {", " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", @@ -9676,7 +9676,7 @@ " }", " },", " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", + " \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", " \"valueReference\": {", " \"identifier\": {", " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", @@ -9919,7 +9919,7 @@ " }", " },", " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", + " \"url\": \"https://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/adult_to_adult_proxy_creation.yaml b/specification/examples/requests/POST_Consent/adult_to_adult_proxy_creation.yaml index 312f3b48..55b5d2c9 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 @@ -41,7 +41,7 @@ ConsentAdultToAdultGuardianRequest: - 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.grantee + - url: https://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 2d1eea54..d58d9b96 100644 --- a/specification/examples/requests/POST_Consent/parent_child_proxy_creation.yaml +++ b/specification/examples/requests/POST_Consent/parent_child_proxy_creation.yaml @@ -42,7 +42,7 @@ ConsentParentChildProxyCreationRequest: - 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.grantee + - url: https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee valueReference: identifier: system: https://fhir.nhs.uk/Id/nhs-number 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 7f848e73..5803a95b 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,7 +111,7 @@ 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.grantee + - url: https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee valueReference: identifier: system: https://fhir.nhs.uk/Id/nhs-number @@ -210,7 +210,7 @@ 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.grantee + - url: https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee valueReference: identifier: system: https://fhir.nhs.uk/Id/nhs-number 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 dac68b97..12afd03f 100644 --- a/specification/examples/responses/GET_Consent/filtered-relationships-status-inactive.yaml +++ b/specification/examples/responses/GET_Consent/filtered-relationships-status-inactive.yaml @@ -55,7 +55,7 @@ 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.grantee + - url: https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee valueReference: identifier: system: https://fhir.nhs.uk/Id/nhs-number @@ -108,7 +108,7 @@ ConsentMultipleRelationshipsStatusInactiveBundle: code: OTHER display: Other reason text: Patient would not respond to phone calls - - url: http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee + - url: https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee valueReference: identifier: system: https://fhir.nhs.uk/Id/nhs-number 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 b2cd14da..60c19d1e 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 @@ -55,7 +55,7 @@ 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.grantee + - url: https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee valueReference: identifier: system: https://fhir.nhs.uk/Id/nhs-number @@ -108,7 +108,7 @@ 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.grantee + - url: https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee valueReference: identifier: system: https://fhir.nhs.uk/Id/nhs-number @@ -161,7 +161,7 @@ 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.grantee + - url: https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee valueReference: identifier: system: https://fhir.nhs.uk/Id/nhs-number @@ -214,7 +214,7 @@ 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.grantee + - url: https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee valueReference: identifier: system: https://fhir.nhs.uk/Id/nhs-number 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 bac8e74c..9c445bd4 100644 --- a/specification/examples/responses/GET_Consent/multiple-relationships-include-patient.yaml +++ b/specification/examples/responses/GET_Consent/multiple-relationships-include-patient.yaml @@ -87,7 +87,7 @@ 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.grantee + - url: https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee valueReference: identifier: system: https://fhir.nhs.uk/Id/nhs-number @@ -168,7 +168,7 @@ 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.grantee + - url: https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee valueReference: identifier: system: https://fhir.nhs.uk/Id/nhs-number @@ -249,7 +249,7 @@ 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.grantee + - url: https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee valueReference: identifier: system: https://fhir.nhs.uk/Id/nhs-number 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 244eb73c..0df8cb27 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 @@ -111,7 +111,7 @@ 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.grantee + - url: https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee valueReference: identifier: system: https://fhir.nhs.uk/Id/nhs-number @@ -211,7 +211,7 @@ 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.grantee + - url: https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee valueReference: identifier: system: https://fhir.nhs.uk/Id/nhs-number @@ -311,7 +311,7 @@ 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.grantee + - url: https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee valueReference: identifier: system: https://fhir.nhs.uk/Id/nhs-number 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 fcfae9cb..fb445e4c 100644 --- a/specification/examples/responses/GET_Consent/multiple-relationships-include-performer.yaml +++ b/specification/examples/responses/GET_Consent/multiple-relationships-include-performer.yaml @@ -80,7 +80,7 @@ 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.grantee + - url: https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee valueReference: identifier: system: https://fhir.nhs.uk/Id/nhs-number @@ -153,7 +153,7 @@ 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.grantee + - url: https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee valueReference: identifier: system: https://fhir.nhs.uk/Id/nhs-number @@ -226,7 +226,7 @@ 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.grantee + - url: https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee valueReference: identifier: system: https://fhir.nhs.uk/Id/nhs-number 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 d46ff1d5..4f489055 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 @@ -84,7 +84,7 @@ 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.grantee + - url: https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee valueReference: identifier: system: https://fhir.nhs.uk/Id/nhs-number @@ -136,7 +136,7 @@ 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.grantee + - url: https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee valueReference: identifier: system: https://fhir.nhs.uk/Id/nhs-number @@ -188,7 +188,7 @@ 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.grantee + - url: https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee valueReference: identifier: system: https://fhir.nhs.uk/Id/nhs-number 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 5fb586bd..ee9e5514 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 @@ -106,7 +106,7 @@ 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.grantee + - url: https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee valueReference: identifier: system: https://fhir.nhs.uk/Id/nhs-number @@ -176,7 +176,7 @@ 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.grantee + - url: https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee valueReference: identifier: system: https://fhir.nhs.uk/Id/nhs-number @@ -246,7 +246,7 @@ 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.grantee + - url: https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee valueReference: identifier: system: https://fhir.nhs.uk/Id/nhs-number 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 075ade50..b975bb6e 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 @@ -77,7 +77,7 @@ 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.grantee + - url: https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee valueReference: identifier: system: https://fhir.nhs.uk/Id/nhs-number @@ -147,7 +147,7 @@ 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.grantee + - url: https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee valueReference: identifier: system: https://fhir.nhs.uk/Id/nhs-number @@ -217,7 +217,7 @@ 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.grantee + - url: https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee valueReference: identifier: system: https://fhir.nhs.uk/Id/nhs-number 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 a83b1fae..dbe3b5be 100644 --- a/specification/examples/responses/GET_Consent/multiple-relationships-single-patient.yaml +++ b/specification/examples/responses/GET_Consent/multiple-relationships-single-patient.yaml @@ -55,7 +55,7 @@ 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.grantee + - url: https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee valueReference: identifier: system: https://fhir.nhs.uk/Id/nhs-number @@ -107,7 +107,7 @@ 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.grantee + - url: https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee valueReference: identifier: system: https://fhir.nhs.uk/Id/nhs-number @@ -159,7 +159,7 @@ 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.grantee + - url: https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee valueReference: identifier: system: https://fhir.nhs.uk/Id/nhs-number diff --git a/specification/examples/responses/GET_Consent/multiple-relationships.yaml b/specification/examples/responses/GET_Consent/multiple-relationships.yaml index 588d747e..9fbd4aa4 100644 --- a/specification/examples/responses/GET_Consent/multiple-relationships.yaml +++ b/specification/examples/responses/GET_Consent/multiple-relationships.yaml @@ -55,7 +55,7 @@ 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.grantee + - url: https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee valueReference: identifier: system: https://fhir.nhs.uk/Id/nhs-number @@ -107,7 +107,7 @@ 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.grantee + - url: https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee valueReference: identifier: system: https://fhir.nhs.uk/Id/nhs-number @@ -159,7 +159,7 @@ 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.grantee + - url: https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee valueReference: identifier: system: https://fhir.nhs.uk/Id/nhs-number 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 d5a2ada5..6cc811be 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 @@ -84,7 +84,7 @@ 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.grantee + - url: https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee valueReference: identifier: system: https://fhir.nhs.uk/Id/nhs-number 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 2803b290..36c58382 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 @@ -105,7 +105,7 @@ 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.grantee + - url: https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee valueReference: identifier: system: https://fhir.nhs.uk/Id/nhs-number 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 183eb6b3..58e2b537 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 @@ -75,7 +75,7 @@ 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.grantee + - url: https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee valueReference: identifier: system: https://fhir.nhs.uk/Id/nhs-number 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 beb1a5c7..eaabf4a8 100644 --- a/specification/examples/responses/GET_Consent/single-consenting-adult-relationship.yaml +++ b/specification/examples/responses/GET_Consent/single-consenting-adult-relationship.yaml @@ -55,7 +55,7 @@ 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.grantee + - url: https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee valueReference: identifier: system: https://fhir.nhs.uk/Id/nhs-number 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 8578b91a..3a37e754 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 @@ -81,7 +81,7 @@ 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.grantee + - url: https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee valueReference: identifier: system: https://fhir.nhs.uk/Id/nhs-number 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 a8768949..9ec8c047 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 @@ -109,7 +109,7 @@ 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.grantee + - url: https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee valueReference: identifier: system: https://fhir.nhs.uk/Id/nhs-number 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 1484158b..bd8ea7ff 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 @@ -78,7 +78,7 @@ 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.grantee + - url: https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee valueReference: identifier: system: https://fhir.nhs.uk/Id/nhs-number 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 d7109185..a6f64a22 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 @@ -58,7 +58,7 @@ 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.grantee + - url: https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee valueReference: identifier: system: https://fhir.nhs.uk/Id/nhs-number 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 2846d996..140b9151 100644 --- a/specification/examples/responses/GET_Consent/single-mother-child-relationship.yaml +++ b/specification/examples/responses/GET_Consent/single-mother-child-relationship.yaml @@ -55,7 +55,7 @@ ConsentSingleAdultChildRelationshipBundle: - 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.grantee + - url: https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee valueReference: identifier: system: https://fhir.nhs.uk/Id/nhs-number From 7de193aeecefc92ed5192a76984abb5f257094dd Mon Sep 17 00:00:00 2001 From: Ellie Bound <175816742+ellie-bound1-NHSD@users.noreply.github.com> Date: Tue, 27 Jan 2026 09:09:20 +0000 Subject: [PATCH 09/10] NPA-6165: Fix spec --- specification/validated-relationships-service-api.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/specification/validated-relationships-service-api.yaml b/specification/validated-relationships-service-api.yaml index d1bbd16b..6c50e768 100644 --- a/specification/validated-relationships-service-api.yaml +++ b/specification/validated-relationships-service-api.yaml @@ -2370,8 +2370,10 @@ components: enum: - "https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee" valueReference: - $ref: "#/components/schemas/Identifier" - description: Details for proxy. + properties: + identifier: + $ref: "#/components/schemas/Identifier" + description: Details for proxy. OperationOutcome: type: object From 6169833dc9e05074bbdc9dce0b4746b88f009a6f Mon Sep 17 00:00:00 2001 From: Ellie Bound <175816742+ellie-bound1-NHSD@users.noreply.github.com> Date: Thu, 29 Jan 2026 09:08:19 +0000 Subject: [PATCH 10/10] NPA-6165: Review Comments --- ...ervice.integration.postman_collection.json | 24 +++++++++---------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/postman/validated_relationship_service.integration.postman_collection.json b/postman/validated_relationship_service.integration.postman_collection.json index e744fe00..0e4d5b57 100644 --- a/postman/validated_relationship_service.integration.postman_collection.json +++ b/postman/validated_relationship_service.integration.postman_collection.json @@ -1,6 +1,6 @@ { "info": { - "_postman_id": "78e44fe9-e7fc-4c60-a2d6-4a6c76745191", + "_postman_id": "704f7379-8104-427d-b21b-fe479ee93cb3", "name": "Validated Relationship Service - Integration - 29/01/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 \n- App-restricted - for service-to-service authorization\n \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 \n- get_cis2_access_token_int.py - for CIS2 authorization\n \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\n \n2. Go to the Authorization tab for this Postman request\n \n3. Select 'Bearer token' from the drop-down\n \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 \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", @@ -2151,7 +2151,7 @@ } ], "cookie": [], - "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:22:00Z\",\n \"total\": 2,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9674998535&_include=Consent%3Aperformer&_include=Consent%3Apatient\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/3a86ad92\",\n \"resource\": {\n \"id\": \"3a86ad92\",\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:21:58.915488+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9692113736\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998535\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998535\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/5c0c47d9\",\n \"resource\": {\n \"id\": \"5c0c47d9\",\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:21:58.915640+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998454\"\n }\n },\n \"performer\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998535\"\n }\n }\n ],\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998535\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/0b36c4e0\",\n \"resource\": {\n \"id\": \"0b36c4e0\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998535\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9692113736\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/bd6da0a0\",\n \"resource\": {\n \"id\": \"bd6da0a0\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998535\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998454\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/e41dfa63\",\n \"resource\": {\n \"id\": \"e41dfa63\",\n \"meta\": {\n \"profile\": [\n \"https://fhir.hl7.org.uk/StructureDefinition/UKCore-Patient\"\n ],\n \"security\": [\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ]\n },\n \"birthDate\": \"1985-05-29\",\n \"generalPractitioner\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A82648\"\n }\n }\n ],\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9692113736\"\n }\n ],\n \"name\": [\n {\n \"text\": \"Mr Kevin Barry\",\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/2d10a3d9\",\n \"resource\": {\n \"id\": \"2d10a3d9\",\n \"meta\": {\n \"profile\": [\n \"https://fhir.hl7.org.uk/StructureDefinition/UKCore-Patient\"\n ],\n \"security\": [\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ]\n },\n \"birthDate\": \"1921-10-17\",\n \"generalPractitioner\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A82648\"\n }\n }\n ],\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998454\"\n }\n ],\n \"name\": [\n {\n \"text\": \"Mr Landon Fahey\",\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" + "body": "{\n \"resourceType\": \"Bundle\",\n \"type\": \"searchset\",\n \"timestamp\": \"2026-16-01T11:22:00Z\",\n \"total\": 2,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer%3Aidentifier=9674998535&_include=Consent%3Aperformer&_include=Consent%3Apatient\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/3a86ad92\",\n \"resource\": {\n \"id\": \"3a86ad92\",\n \"extension\": [\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\": \"9674998535\"\n }\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:21:58.915488+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9692113736\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998535\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/5c0c47d9\",\n \"resource\": {\n \"id\": \"5c0c47d9\",\n \"extension\": [\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\": \"9674998535\"\n }\n }\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"INFA\",\n \"display\": \"information access\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\"\n }\n ]\n }\n ],\n \"dateTime\": \"2025-12-04T11:21:58.915640+00:00\",\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998454\"\n }\n },\n \"policy\": [\n {\n \"authority\": \"https://www.england.nhs.uk\",\n \"uri\": \"\"\n }\n ],\n \"provision\": {\n \"actor\": [\n {\n \"reference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998535\"\n },\n \"type\": \"RelatedPerson\"\n },\n \"role\": {\n \"coding\": [\n {\n \"code\": \"unknown\",\n \"display\": \"Unknown\",\n \"system\": \"https://fhir.nhs.uk/CodeSystem/proxy-legal-basis\"\n }\n ]\n }\n }\n ]\n },\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"status\": \"active\",\n \"resourceType\": \"Consent\"\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/0b36c4e0\",\n \"resource\": {\n \"id\": \"0b36c4e0\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998535\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9692113736\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/bd6da0a0\",\n \"resource\": {\n \"id\": \"bd6da0a0\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998535\"\n }\n ],\n \"patient\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998454\"\n }\n },\n \"relationship\": [\n {\n \"coding\": [\n {\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\",\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\"\n }\n ]\n }\n ],\n \"resourceType\": \"RelatedPerson\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/e41dfa63\",\n \"resource\": {\n \"id\": \"e41dfa63\",\n \"meta\": {\n \"profile\": [\n \"https://fhir.hl7.org.uk/StructureDefinition/UKCore-Patient\"\n ],\n \"security\": [\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ]\n },\n \"birthDate\": \"1985-05-29\",\n \"generalPractitioner\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A82648\"\n }\n }\n ],\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9692113736\"\n }\n ],\n \"name\": [\n {\n \"text\": \"Mr Kevin Barry\",\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/2d10a3d9\",\n \"resource\": {\n \"id\": \"2d10a3d9\",\n \"meta\": {\n \"profile\": [\n \"https://fhir.hl7.org.uk/StructureDefinition/UKCore-Patient\"\n ],\n \"security\": [\n {\n \"code\": \"P9\",\n \"display\": \"High level verification (P9)\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\"\n }\n ]\n },\n \"birthDate\": \"1921-10-17\",\n \"generalPractitioner\": [\n {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"A82648\"\n }\n }\n ],\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9674998454\"\n }\n ],\n \"name\": [\n {\n \"text\": \"Mr Landon Fahey\",\n \"use\": \"usual\"\n }\n ],\n \"resourceType\": \"Patient\"\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" }, { "name": "Linked profiles returned from NAM - TPP user", @@ -5775,7 +5775,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 \t\"system\":\"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",\n \t\"code\":\"parental-responsibility\",\n \t\"display\":\"Parental responsibility\"\n }\n ]\n },\n \t\"reference\":{\"type\":\"RelatedPerson\",\"identifier\":{\"system\":\"https://fhir.nhs.uk/Id/nhs-number\",\"value\":\"9736898148\"}}\n }\n ]\n },\n \t\"extension\":[{\n\t\t\"url\":\"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n\t\t\"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 \t\"system\":\"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",\n \t\"code\":\"parental-responsibility\",\n \t\"display\":\"Parental responsibility\"\n }\n ]\n },\n \t\"reference\":{\"type\":\"RelatedPerson\",\"identifier\":{\"system\":\"https://fhir.nhs.uk/Id/nhs-number\",\"value\":\"9736898148\"}}\n }\n ]\n },\n \t\"extension\":[{\n\t\t\"url\":\"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n\t\t\"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}\n", "options": { "raw": { "language": "json" @@ -6023,8 +6023,7 @@ "}); " ], "type": "text/javascript", - "packages": {}, - "requests": {} + "packages": {} } } ], @@ -6059,7 +6058,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 \"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.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\",\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}", "options": { "raw": { "language": "json" @@ -6201,7 +6200,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 \"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" @@ -6333,7 +6332,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\": \"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" @@ -6464,7 +6463,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\": \"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" @@ -6582,8 +6581,7 @@ "" ], "type": "text/javascript", - "packages": {}, - "requests": {} + "packages": {} } } ], @@ -6618,7 +6616,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 \"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" @@ -6750,7 +6748,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 \"performer\": [\n {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number/invalid\",\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\": \"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/invalid\",\n \"value\": \"9736898148\"\n }\n }\n }\n ]\n}", "options": { "raw": { "language": "json"