diff --git a/postman/Validate Relationship Service Sandbox.postman_collection.json b/postman/Validate Relationship Service Sandbox.postman_collection.json index 311c2e4b..4a240a9a 100644 --- a/postman/Validate Relationship Service Sandbox.postman_collection.json +++ b/postman/Validate Relationship Service Sandbox.postman_collection.json @@ -1,11 +1,11 @@ { "info": { - "_postman_id": "4442b3f9-8d89-4aae-a5a9-8a5eda755ead", - "name": "Validate Relationship Service Sandbox 09/06/25", + "_postman_id": "8a3d3121-ca56-4ac8-9d14-cd375ee158fc", + "name": "Validate Relationship Service Sandbox 10/06/25", "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": "34042403", - "_collection_link": "https://www.postman.com/jackplowman2/validated-relationship-service-sandbox-09-06-25/collection/yzbxyur/validate-relationship-service-sandbox-09-06-25?action=share&source=collection_link&creator=34042403" + "_exporter_id": "45653607", + "_collection_link": "https://www.postman.com/lukeelliott-8674106/workspace/validated-relationship-service-sandbox-10-06-2025/collection/45653607-8a3d3121-ca56-4ac8-9d14-cd375ee158fc?action=share&source=collection_link&creator=45653607" }, "item": [ { @@ -1902,299 +1902,371 @@ "script": { "exec": [ "const expectedResponseBody = {", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", - " \"total\": 6,", - " \"type\": \"searchset\",", - " \"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\": {", - " \"type\": \"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\"", - " },", - " {", - " \"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\",", - " \"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\": [", - " {", - " \"id\": \"123456\",", - " \"use\": \"usual\",", - " \"period\": {", - " \"start\": \"2020-01-01\",", - " \"end\": \"2021-12-31\"", + " \"resourceType\": \"Bundle\",", + " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", + " \"total\": 6,", + " \"type\": \"searchset\",", + " \"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\": {", + " \"type\": \"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\"", + " },", + " {", + " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", + " \"code\": \"MTH\",", + " \"display\": \"mother\"", + " }", + " ]", + " }", + " ]", " },", - " \"given\": [", - " \"Jane Marie Anne\"", - " ],", - " \"family\": \"Smith\",", - " \"prefix\": [", - " \"Mrs\"", - " ],", - " \"suffix\": [", - " \"MBE\",", - " \"PhD\"", - " ]", - " }", - " ],", - " \"birthDate\": \"2022-10-22\",", - " \"generalPractitioner\": [", - " {", - " \"type\": \"Organization\",", - " \"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\": \"http://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", + " \"search\": {", + " \"mode\": \"include\"", " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"http://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\"", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/A3CC67E2\",", + " \"resource\": {", + " \"resourceType\": \"Patient\",", + " \"id\": \"A3CC67E2\",", + " \"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\": [", + " {", + " \"id\": \"123456\",", + " \"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\": [", + " {", + " \"type\": \"Organization\",", + " \"identifier\": {", + " \"value\": \"ODS12345\",", + " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"include\"", " }", - " }", - " ],", - " },", - " \"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\": {", - " \"type\": \"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\",", - " \"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\": [", - " {", - " \"id\": \"123456\",", - " \"use\": \"usual\",", - " \"period\": {", - " \"start\": \"2020-01-01\",", - " \"end\": \"2021-12-31\"", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBCC67E9\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"BBCC67E9\",", + " \"status\": \"active\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ],", + " \"text\": \"Patient Privacy Consent\"", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"http://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\"", + " }", + " }", + " ],", + " \"provision\": {", + " \"actor\": [", + " {", + " \"reference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000017\"", + " },", + " \"type\": \"RelatedPerson\"", + " },", + " \"role\": {", + " \"coding\": [", + " {", + " \"code\": \"PRN\",", + " \"display\": \"Parent\",", + " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\"", + " }", + " ]", + " }", + " }", + " ],", + " \"period\": {", + " \"end\": \"2026-02-11\",", + " \"start\": \"2025-02-11\"", + " }", + " },", + " \"extension\": [", + " {", + " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", + " \"valueCodeableConcept\": [", + " {", + " \"coding\": [", + " {", + " \"code\": \"TBC\",", + " \"display\": \"TBC\",", + " \"system\": \"http://terminology.hl7.org/CodeSystem/consent-reason\"", + " }", + " ]", + " }", + " ]", + " }", + " ]", " },", - " \"given\": [", - " \"Sally\"", - " ],", - " \"family\": \"Evans\",", - " \"prefix\": [", - " \"Mrs\"", - " ]", - " }", - " ],", - " \"birthDate\": \"1995-10-22\",", - " \"generalPractitioner\": [", - " {", - " \"type\": \"Organization\",", - " \"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\": \"http://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", + " \"search\": {", + " \"mode\": \"match\"", " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"http://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\"", - " }", + " {", + " \"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\": {", + " \"type\": \"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\"", + " }", " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"performer\": [", - " {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000017\"", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/DFCC67F5\",", + " \"resource\": {", + " \"resourceType\": \"Patient\",", + " \"id\": \"DFCC67F5\",", + " \"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\": [", + " {", + " \"id\": \"123456\",", + " \"use\": \"usual\",", + " \"period\": {", + " \"start\": \"2020-01-01\",", + " \"end\": \"2021-12-31\"", + " },", + " \"given\": [", + " \"Sally\"", + " ],", + " \"family\": \"Evans\",", + " \"prefix\": [", + " \"Mrs\"", + " ]", + " }", + " ],", + " \"birthDate\": \"1995-10-22\",", + " \"generalPractitioner\": [", + " {", + " \"type\": \"Organization\",", + " \"identifier\": {", + " \"value\": \"ODS12345\",", + " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"include\"", " }", - " }", - " ],", - " \"verification\": [", - " {", - " \"verified\": true,", - " \"verifiedWith\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000005\"", - " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/WWCC67T1\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"WWCC67T1\",", + " \"status\": \"active\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ],", + " \"text\": \"Patient Privacy Consent\"", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"http://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\"", + " }", + " }", + " ],", + " \"provision\": {", + " \"actor\": [", + " {", + " \"reference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000017\"", + " },", + " \"type\": \"RelatedPerson\"", + " },", + " \"role\": {", + " \"coding\": [", + " {", + " \"code\": \"PRN\",", + " \"display\": \"Parent\",", + " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\"", + " }", + " ]", + " }", + " }", + " ],", + " \"period\": {", + " \"end\": \"2026-02-11\",", + " \"start\": \"2025-02-11\"", + " }", + " },", + " \"extension\": [", + " {", + " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", + " \"valueCodeableConcept\": [", + " {", + " \"coding\": [", + " {", + " \"code\": \"TBC\",", + " \"display\": \"TBC\",", + " \"system\": \"http://terminology.hl7.org/CodeSystem/consent-reason\"", + " }", + " ]", + " }", + " ]", + " }", + " ]", " },", - " \"verificationDate\": \"2024-07-21T17:32:28Z\"", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " }", - " ]", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " }", + " ]", "}", "", "pm.test(\"Status code is 200\", function () {", @@ -2211,9 +2283,21 @@ } } ], + "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": [ @@ -2252,132 +2336,192 @@ "script": { "exec": [ "const expectedResponseBody = {", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", - " \"total\": 2,", - " \"type\": \"searchset\",", - " \"entry\": [", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/AATD11A1\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"AATD11A1\",", - " \"status\": \"inactive\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"http://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\"", - " }", - " }", - " ],", - " \"verification\": [", - " {", - " \"verified\": true,", - " \"verifiedWith\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000006\"", - " }", + " \"resourceType\": \"Bundle\",", + " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", + " \"total\": 2,", + " \"type\": \"searchset\",", + " \"entry\": [", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/AATD11A1\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"AATD11A1\",", + " \"status\": \"inactive\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ],", + " \"text\": \"Patient Privacy Consent\"", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"http://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\"", + " }", + " }", + " ],", + " \"provision\": {", + " \"actor\": [", + " {", + " \"reference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000017\"", + " },", + " \"type\": \"RelatedPerson\"", + " },", + " \"role\": {", + " \"coding\": [", + " {", + " \"code\": \"PRN\",", + " \"display\": \"Parent\",", + " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\"", + " }", + " ]", + " }", + " }", + " ],", + " \"period\": {", + " \"end\": \"2026-02-11\",", + " \"start\": \"2025-02-11\"", + " }", + " },", + " \"extension\": [", + " {", + " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", + " \"valueCodeableConcept\": [", + " {", + " \"coding\": [", + " {", + " \"code\": \"TBC\",", + " \"display\": \"TBC\",", + " \"system\": \"http://terminology.hl7.org/CodeSystem/consent-reason\"", + " }", + " ]", + " }", + " ]", + " }", + " ]", " },", - " \"verificationDate\": \"2024-07-21T17:32:28Z\"", - " }", - " ]", - " },", - " \"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\": \"http://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", + " \"search\": {", + " \"mode\": \"match\"", " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"http://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\"", - " }", - " }", - " ],", - " \"verification\": [", - " {", - " \"verified\": true,", - " \"verifiedWith\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000007\"", - " }", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/ABCD12B3\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"ABCD12B3\",", + " \"status\": \"inactive\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ],", + " \"text\": \"Patient Privacy Consent\"", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"http://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\"", + " }", + " }", + " ],", + " \"provision\": {", + " \"actor\": [", + " {", + " \"reference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000017\"", + " },", + " \"type\": \"RelatedPerson\"", + " },", + " \"role\": {", + " \"coding\": [", + " {", + " \"code\": \"PRN\",", + " \"display\": \"Parent\",", + " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\"", + " }", + " ]", + " }", + " }", + " ],", + " \"period\": {", + " \"end\": \"2026-02-11\",", + " \"start\": \"2025-02-11\"", + " }", + " },", + " \"extension\": [", + " {", + " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", + " \"valueCodeableConcept\": [", + " {", + " \"coding\": [", + " {", + " \"code\": \"TBC\",", + " \"display\": \"TBC\",", + " \"system\": \"http://terminology.hl7.org/CodeSystem/consent-reason\"", + " }", + " ]", + " }", + " ]", + " }", + " ]", " },", - " \"verificationDate\": \"2024-07-21T17:32:28Z\"", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " }", - " ]", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " }", + " ]", "}", "", "pm.test(\"Status code is 200\", function () {", @@ -2389,6 +2533,14 @@ " pm.expect(responseJson).to.eql(expectedResponseBody);", "});" ], + "type": "text/javascript", + "packages": {} + } + }, + { + "listen": "prerequest", + "script": { + "packages": {}, "type": "text/javascript" } } @@ -2426,240 +2578,372 @@ "script": { "exec": [ "const expectedResponseBody = {", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", - " \"total\": 4,", - " \"type\": \"searchset\",", - " \"entry\": [", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBCC67E9\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"BBCC67E9\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"http://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\"", - " }", - " }", - " ],", - " },", - " \"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\": \"http://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"http://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\"", - " }", - " }", - " ],", - " \"verification\": [", - " {", - " \"verified\": true,", - " \"verifiedWith\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000005\"", - " }", + " \"resourceType\": \"Bundle\",", + " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", + " \"total\": 4,", + " \"type\": \"searchset\",", + " \"entry\": [", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBCC67E9\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"BBCC67E9\",", + " \"status\": \"active\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ],", + " \"text\": \"Patient Privacy Consent\"", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"http://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\"", + " }", + " }", + " ],", + " \"provision\": {", + " \"actor\": [", + " {", + " \"reference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000017\"", + " },", + " \"type\": \"RelatedPerson\"", + " },", + " \"role\": {", + " \"coding\": [", + " {", + " \"code\": \"PRN\",", + " \"display\": \"Parent\",", + " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\"", + " }", + " ]", + " }", + " }", + " ],", + " \"period\": {", + " \"end\": \"2026-02-11\",", + " \"start\": \"2025-02-11\"", + " }", + " },", + " \"extension\": [", + " {", + " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", + " \"valueCodeableConcept\": [", + " {", + " \"coding\": [", + " {", + " \"code\": \"TBC\",", + " \"display\": \"TBC\",", + " \"system\": \"http://terminology.hl7.org/CodeSystem/consent-reason\"", + " }", + " ]", + " }", + " ]", + " }", + " ]", " },", - " \"verificationDate\": \"2024-07-21T17:32:28Z\"", - " }", - " ]", - " },", - " \"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\": \"http://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", + " \"search\": {", + " \"mode\": \"match\"", " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"http://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\"", - " }", - " }", - " ],", - " \"verification\": [", - " {", - " \"verified\": true,", - " \"verifiedWith\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000020\"", - " }", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/WWCC67T1\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"WWCC67T1\",", + " \"status\": \"active\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ],", + " \"text\": \"Patient Privacy Consent\"", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"http://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\"", + " }", + " }", + " ],", + " \"provision\": {", + " \"actor\": [", + " {", + " \"reference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000017\"", + " },", + " \"type\": \"RelatedPerson\"", + " },", + " \"role\": {", + " \"coding\": [", + " {", + " \"code\": \"PRN\",", + " \"display\": \"Parent\",", + " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\"", + " }", + " ]", + " }", + " }", + " ],", + " \"period\": {", + " \"end\": \"2026-02-11\",", + " \"start\": \"2025-02-11\"", + " }", + " },", + " \"extension\": [", + " {", + " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", + " \"valueCodeableConcept\": [", + " {", + " \"coding\": [", + " {", + " \"code\": \"TBC\",", + " \"display\": \"TBC\",", + " \"system\": \"http://terminology.hl7.org/CodeSystem/consent-reason\"", + " }", + " ]", + " }", + " ]", + " }", + " ]", " },", - " \"verificationDate\": \"2024-07-21T17:32:28Z\"", - " }", - " ]", - " },", - " \"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\": \"http://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", + " \"search\": {", + " \"mode\": \"match\"", " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"http://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\"", - " }", - " }", - " ],", - " \"verification\": [", - " {", - " \"verified\": true,", - " \"verifiedWith\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000021\"", - " }", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBGY55L2\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"BBGY55L2\",", + " \"status\": \"proposed\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ],", + " \"text\": \"Patient Privacy Consent\"", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"http://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\"", + " }", + " }", + " ],", + " \"provision\": {", + " \"actor\": [", + " {", + " \"reference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000017\"", + " },", + " \"type\": \"RelatedPerson\"", + " },", + " \"role\": {", + " \"coding\": [", + " {", + " \"code\": \"PRN\",", + " \"display\": \"Parent\",", + " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\"", + " }", + " ]", + " }", + " }", + " ],", + " \"period\": {", + " \"end\": \"2026-02-11\",", + " \"start\": \"2025-02-11\"", + " }", + " },", + " \"extension\": [", + " {", + " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", + " \"valueCodeableConcept\": [", + " {", + " \"coding\": [", + " {", + " \"code\": \"TBC\",", + " \"display\": \"TBC\",", + " \"system\": \"http://terminology.hl7.org/CodeSystem/consent-reason\"", + " }", + " ]", + " }", + " ]", + " }", + " ]", " },", - " \"verificationDate\": \"2024-07-21T17:32:28Z\"", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " }", - " ]", + " \"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\": \"http://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ],", + " \"text\": \"Patient Privacy Consent\"", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"http://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\"", + " }", + " }", + " ],", + " \"provision\": {", + " \"actor\": [", + " {", + " \"reference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000017\"", + " },", + " \"type\": \"RelatedPerson\"", + " },", + " \"role\": {", + " \"coding\": [", + " {", + " \"code\": \"PRN\",", + " \"display\": \"Parent\",", + " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\"", + " }", + " ]", + " }", + " }", + " ],", + " \"period\": {", + " \"end\": \"2026-02-11\",", + " \"start\": \"2025-02-11\"", + " }", + " },", + " \"extension\": [", + " {", + " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", + " \"valueCodeableConcept\": [", + " {", + " \"coding\": [", + " {", + " \"code\": \"TBC\",", + " \"display\": \"TBC\",", + " \"system\": \"http://terminology.hl7.org/CodeSystem/consent-reason\"", + " }", + " ]", + " }", + " ]", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " }", + " ]", "}", "", "pm.test(\"Status code is 200\", function () {", @@ -2671,7 +2955,8 @@ " pm.expect(responseJson).to.eql(expectedResponseBody);", "});" ], - "type": "text/javascript" + "type": "text/javascript", + "packages": {} } } ], @@ -2716,180 +3001,282 @@ "script": { "exec": [ "const expectedResponseBody = {", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", - " \"total\": 3,", - " \"type\": \"searchset\",", - " \"entry\": [", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBCC67E9\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"BBCC67E9\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"http://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\"", - " }", - " }", - " ],", - " },", - " \"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\": \"http://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", + " \"resourceType\": \"Bundle\",", + " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", + " \"total\": 3,", + " \"type\": \"searchset\",", + " \"entry\": [", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBCC67E9\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"BBCC67E9\",", + " \"status\": \"active\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ],", + " \"text\": \"Patient Privacy Consent\"", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"http://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\"", + " }", + " }", + " ],", + " \"provision\": {", + " \"actor\": [", + " {", + " \"reference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000022\"", + " },", + " \"type\": \"RelatedPerson\"", + " },", + " \"role\": {", + " \"coding\": [", + " {", + " \"code\": \"PRN\",", + " \"display\": \"Parent\",", + " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\"", + " }", + " ]", + " }", + " }", + " ],", + " \"period\": {", + " \"end\": \"2026-02-11\",", + " \"start\": \"2025-02-11\"", + " }", + " },", + " \"extension\": [", + " {", + " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", + " \"valueCodeableConcept\": [", + " {", + " \"coding\": [", + " {", + " \"code\": \"TBC\",", + " \"display\": \"TBC\",", + " \"system\": \"http://terminology.hl7.org/CodeSystem/consent-reason\"", + " }", + " ]", + " }", + " ]", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"http://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\"", - " }", - " }", - " ],", - " \"verification\": [", - " {", - " \"verified\": true,", - " \"verifiedWith\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000005\"", - " }", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/WWCC67T1\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"WWCC67T1\",", + " \"status\": \"active\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ],", + " \"text\": \"Patient Privacy Consent\"", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"http://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\"", + " }", + " }", + " ],", + " \"provision\": {", + " \"actor\": [", + " {", + " \"reference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000022\"", + " },", + " \"type\": \"RelatedPerson\"", + " },", + " \"role\": {", + " \"coding\": [", + " {", + " \"code\": \"PRN\",", + " \"display\": \"Parent\",", + " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\"", + " }", + " ]", + " }", + " }", + " ],", + " \"period\": {", + " \"end\": \"2026-02-11\",", + " \"start\": \"2025-02-11\"", + " }", + " },", + " \"extension\": [", + " {", + " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", + " \"valueCodeableConcept\": [", + " {", + " \"coding\": [", + " {", + " \"code\": \"TBC\",", + " \"display\": \"TBC\",", + " \"system\": \"http://terminology.hl7.org/CodeSystem/consent-reason\"", + " }", + " ]", + " }", + " ]", + " }", + " ]", " },", - " \"verificationDate\": \"2024-07-21T17:32:28Z\"", - " }", - " ]", - " },", - " \"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\": \"http://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", + " \"search\": {", + " \"mode\": \"match\"", " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"http://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\"", - " }", - " }", - " ],", - " \"verification\": [", - " {", - " \"verified\": true,", - " \"verifiedWith\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000006\"", - " }", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/AATD11A1\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"AATD11A1\",", + " \"status\": \"inactive\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ],", + " \"text\": \"Patient Privacy Consent\"", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"http://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\"", + " }", + " }", + " ],", + " \"provision\": {", + " \"actor\": [", + " {", + " \"reference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000022\"", + " },", + " \"type\": \"RelatedPerson\"", + " },", + " \"role\": {", + " \"coding\": [", + " {", + " \"code\": \"PRN\",", + " \"display\": \"Parent\",", + " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\"", + " }", + " ]", + " }", + " }", + " ],", + " \"period\": {", + " \"end\": \"2026-02-11\",", + " \"start\": \"2025-02-11\"", + " }", + " },", + " \"extension\": [", + " {", + " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", + " \"valueCodeableConcept\": [", + " {", + " \"coding\": [", + " {", + " \"code\": \"TBC\",", + " \"display\": \"TBC\",", + " \"system\": \"http://terminology.hl7.org/CodeSystem/consent-reason\"", + " }", + " ]", + " }", + " ]", + " }", + " ]", " },", - " \"verificationDate\": \"2024-07-21T17:32:28Z\"", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " }", - " ]", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " }", + " ]", "}", "", "pm.test(\"Status code is 200\", function () {", @@ -2901,7 +3288,8 @@ " pm.expect(responseJson).to.eql(expectedResponseBody);", "});" ], - "type": "text/javascript" + "type": "text/javascript", + "packages": {} } } ], @@ -2934,325 +3322,427 @@ "script": { "exec": [ "const expectedResponseBody = {", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", - " \"total\": 6,", - " \"type\": \"searchset\",", - " \"entry\": [", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/A3CC67E2\",", - " \"resource\": {", - " \"resourceType\": \"Patient\",", - " \"id\": \"A3CC67E2\",", - " \"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\": [", - " {", - " \"id\": \"123456\",", - " \"use\": \"usual\",", - " \"period\": {", - " \"start\": \"2020-01-01\",", - " \"end\": \"2021-12-31\"", + " \"resourceType\": \"Bundle\",", + " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", + " \"total\": 6,", + " \"type\": \"searchset\",", + " \"entry\": [", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/A3CC67E2\",", + " \"resource\": {", + " \"resourceType\": \"Patient\",", + " \"id\": \"A3CC67E2\",", + " \"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\": [", + " {", + " \"id\": \"123456\",", + " \"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\": [", + " {", + " \"type\": \"Organization\",", + " \"identifier\": {", + " \"value\": \"ODS12345\",", + " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", + " }", + " }", + " ]", " },", - " \"given\": [", - " \"Jane Marie Anne\"", - " ],", - " \"family\": \"Smith\",", - " \"prefix\": [", - " \"Mrs\"", - " ],", - " \"suffix\": [", - " \"MBE\",", - " \"PhD\"", - " ]", - " }", - " ],", - " \"birthDate\": \"2022-10-22\",", - " \"generalPractitioner\": [", - " {", - " \"type\": \"Organization\",", - " \"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\": \"http://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", + " \"search\": {", + " \"mode\": \"include\"", " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"http://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\"", - " }", - " }", - " ],", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/DFCC67F5\",", - " \"resource\": {", - " \"resourceType\": \"Patient\",", - " \"id\": \"DFCC67F5\",", - " \"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\": [", - " {", - " \"id\": \"123456\",", - " \"use\": \"usual\",", - " \"period\": {", - " \"start\": \"2020-01-01\",", - " \"end\": \"2021-12-31\"", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBCC67E9\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"BBCC67E9\",", + " \"status\": \"active\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ],", + " \"text\": \"Patient Privacy Consent\"", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"http://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\"", + " }", + " }", + " ],", + " \"provision\": {", + " \"actor\": [", + " {", + " \"reference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000022\"", + " },", + " \"type\": \"RelatedPerson\"", + " },", + " \"role\": {", + " \"coding\": [", + " {", + " \"code\": \"PRN\",", + " \"display\": \"Parent\",", + " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\"", + " }", + " ]", + " }", + " }", + " ],", + " \"period\": {", + " \"end\": \"2026-02-11\",", + " \"start\": \"2025-02-11\"", + " }", + " },", + " \"extension\": [", + " {", + " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", + " \"valueCodeableConcept\": [", + " {", + " \"coding\": [", + " {", + " \"code\": \"TBC\",", + " \"display\": \"TBC\",", + " \"system\": \"http://terminology.hl7.org/CodeSystem/consent-reason\"", + " }", + " ]", + " }", + " ]", + " }", + " ]", " },", - " \"given\": [", - " \"Sally\"", - " ],", - " \"family\": \"Evans\",", - " \"prefix\": [", - " \"Mrs\"", - " ]", - " }", - " ],", - " \"birthDate\": \"1995-10-22\",", - " \"generalPractitioner\": [", - " {", - " \"type\": \"Organization\",", - " \"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\": \"http://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", + " \"search\": {", + " \"mode\": \"match\"", " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"http://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\"", - " }", - " }", - " ],", - " \"verification\": [", - " {", - " \"verified\": true,", - " \"verifiedWith\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000005\"", - " }", - " },", - " \"verificationDate\": \"2024-07-21T17:32:28Z\"", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/ZPTT32T3\",", - " \"resource\": {", - " \"resourceType\": \"Patient\",", - " \"id\": \"ZPTT32T3\",", - " \"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\": [", - " {", - " \"id\": \"123456\",", - " \"use\": \"usual\",", - " \"period\": {", - " \"start\": \"2020-01-01\",", - " \"end\": \"2021-12-31\"", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/DFCC67F5\",", + " \"resource\": {", + " \"resourceType\": \"Patient\",", + " \"id\": \"DFCC67F5\",", + " \"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\": [", + " {", + " \"id\": \"123456\",", + " \"use\": \"usual\",", + " \"period\": {", + " \"start\": \"2020-01-01\",", + " \"end\": \"2021-12-31\"", + " },", + " \"given\": [", + " \"Sally\"", + " ],", + " \"family\": \"Evans\",", + " \"prefix\": [", + " \"Mrs\"", + " ]", + " }", + " ],", + " \"birthDate\": \"1995-10-22\",", + " \"generalPractitioner\": [", + " {", + " \"type\": \"Organization\",", + " \"identifier\": {", + " \"value\": \"ODS12345\",", + " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", + " }", + " }", + " ]", " },", - " \"given\": [", - " \"Michael\"", - " ],", - " \"family\": \"Percy\",", - " \"prefix\": [", - " \"Mr\"", - " ]", - " }", - " ],", - " \"birthDate\": \"1991-1-13\",", - " \"generalPractitioner\": [", - " {", - " \"type\": \"Organization\",", - " \"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\": \"http://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", + " \"search\": {", + " \"mode\": \"include\"", " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"http://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\"", - " }", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/WWCC67T1\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"WWCC67T1\",", + " \"status\": \"active\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ],", + " \"text\": \"Patient Privacy Consent\"", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"http://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\"", + " }", + " }", + " ],", + " \"provision\": {", + " \"actor\": [", + " {", + " \"reference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000022\"", + " },", + " \"type\": \"RelatedPerson\"", + " },", + " \"role\": {", + " \"coding\": [", + " {", + " \"code\": \"PRN\",", + " \"display\": \"Parent\",", + " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\"", + " }", + " ]", + " }", + " }", + " ],", + " \"period\": {", + " \"end\": \"2026-02-11\",", + " \"start\": \"2025-02-11\"", + " }", + " },", + " \"extension\": [", + " {", + " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", + " \"valueCodeableConcept\": [", + " {", + " \"coding\": [", + " {", + " \"code\": \"TBC\",", + " \"display\": \"TBC\",", + " \"system\": \"http://terminology.hl7.org/CodeSystem/consent-reason\"", + " }", + " ]", + " }", + " ]", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"performer\": [", - " {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000022\"", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/ZPTT32T3\",", + " \"resource\": {", + " \"resourceType\": \"Patient\",", + " \"id\": \"ZPTT32T3\",", + " \"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\": [", + " {", + " \"id\": \"123456\",", + " \"use\": \"usual\",", + " \"period\": {", + " \"start\": \"2020-01-01\",", + " \"end\": \"2021-12-31\"", + " },", + " \"given\": [", + " \"Michael\"", + " ],", + " \"family\": \"Percy\",", + " \"prefix\": [", + " \"Mr\"", + " ]", + " }", + " ],", + " \"birthDate\": \"1991-1-13\",", + " \"generalPractitioner\": [", + " {", + " \"type\": \"Organization\",", + " \"identifier\": {", + " \"value\": \"ODS12345\",", + " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"include\"", " }", - " }", - " ],", - " \"verification\": [", - " {", - " \"verified\": true,", - " \"verifiedWith\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000006\"", - " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/AATD11A1\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"AATD11A1\",", + " \"status\": \"inactive\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ],", + " \"text\": \"Patient Privacy Consent\"", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"http://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\"", + " }", + " }", + " ],", + " \"provision\": {", + " \"actor\": [", + " {", + " \"reference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000022\"", + " },", + " \"type\": \"RelatedPerson\"", + " },", + " \"role\": {", + " \"coding\": [", + " {", + " \"code\": \"PRN\",", + " \"display\": \"Parent\",", + " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\"", + " }", + " ]", + " }", + " }", + " ],", + " \"period\": {", + " \"end\": \"2026-02-11\",", + " \"start\": \"2025-02-11\"", + " }", + " },", + " \"extension\": [", + " {", + " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", + " \"valueCodeableConcept\": [", + " {", + " \"coding\": [", + " {", + " \"code\": \"TBC\",", + " \"display\": \"TBC\",", + " \"system\": \"http://terminology.hl7.org/CodeSystem/consent-reason\"", + " }", + " ]", + " }", + " ]", + " }", + " ]", " },", - " \"verificationDate\": \"2024-07-21T17:32:28Z\"", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " }", - " ]", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " }", + " ]", "}", "", "pm.test(\"Status code is 200\", function () {", @@ -3264,7 +3754,8 @@ " pm.expect(responseJson).to.eql(expectedResponseBody);", "});" ], - "type": "text/javascript" + "type": "text/javascript", + "packages": {} } } ], @@ -3301,299 +3792,401 @@ "script": { "exec": [ "const expectedResponseBody = {", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", - " \"total\": 6,", - " \"type\": \"searchset\",", - " \"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\": {", - " \"type\": \"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\"", - " },", - " {", - " \"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\": \"http://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"http://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\"", + " \"resourceType\": \"Bundle\",", + " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", + " \"total\": 6,", + " \"type\": \"searchset\",", + " \"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\": {", + " \"type\": \"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\"", + " },", + " {", + " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", + " \"code\": \"MTH\",", + " \"display\": \"mother\"", + " }", + " ]", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"include\"", " }", - " }", - " ],", - " },", - " \"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\": {", - " \"type\": \"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\": \"http://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBCC67E9\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"BBCC67E9\",", + " \"status\": \"active\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ],", + " \"text\": \"Patient Privacy Consent\"", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"http://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\"", + " }", + " }", + " ],", + " \"provision\": {", + " \"actor\": [", + " {", + " \"reference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000022\"", + " },", + " \"type\": \"RelatedPerson\"", + " },", + " \"role\": {", + " \"coding\": [", + " {", + " \"code\": \"PRN\",", + " \"display\": \"Parent\",", + " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\"", + " }", + " ]", + " }", + " }", + " ],", + " \"period\": {", + " \"end\": \"2026-02-11\",", + " \"start\": \"2025-02-11\"", + " }", + " },", + " \"extension\": [", + " {", + " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", + " \"valueCodeableConcept\": [", + " {", + " \"coding\": [", + " {", + " \"code\": \"TBC\",", + " \"display\": \"TBC\",", + " \"system\": \"http://terminology.hl7.org/CodeSystem/consent-reason\"", + " }", + " ]", + " }", + " ]", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"http://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\"", - " }", - " }", - " ],", - " \"verification\": [", - " {", - " \"verified\": true,", - " \"verifiedWith\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000005\"", - " }", + " {", + " \"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\": {", + " \"type\": \"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\"", + " }", + " ]", + " }", + " ]", " },", - " \"verificationDate\": \"2024-07-21T17:32:28Z\"", - " }", - " ]", - " },", - " \"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\": {", - " \"type\": \"Patient\",", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000006\"", - " }", + " \"search\": {", + " \"mode\": \"include\"", + " }", " },", - " \"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\": \"http://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/WWCC67T1\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"WWCC67T1\",", + " \"status\": \"active\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ],", + " \"text\": \"Patient Privacy Consent\"", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"http://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\"", + " }", + " }", + " ],", + " \"provision\": {", + " \"actor\": [", + " {", + " \"reference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000022\"", + " },", + " \"type\": \"RelatedPerson\"", + " },", + " \"role\": {", + " \"coding\": [", + " {", + " \"code\": \"Personal\",", + " \"display\": \"Personal\",", + " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\"", + " }", + " ]", + " }", + " }", + " ],", + " \"period\": {", + " \"end\": \"2026-02-11\",", + " \"start\": \"2025-02-11\"", + " }", + " },", + " \"extension\": [", + " {", + " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", + " \"valueCodeableConcept\": [", + " {", + " \"coding\": [", + " {", + " \"code\": \"TBC\",", + " \"display\": \"TBC\",", + " \"system\": \"http://terminology.hl7.org/CodeSystem/consent-reason\"", + " }", + " ]", + " }", + " ]", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"http://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\"", + " {", + " \"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\": {", + " \"type\": \"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\"", " }", - " }", - " ],", - " \"verification\": [", - " {", - " \"verified\": true,", - " \"verifiedWith\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000006\"", - " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/AATD11A1\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"AATD11A1\",", + " \"status\": \"inactive\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ],", + " \"text\": \"Patient Privacy Consent\"", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"http://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\"", + " }", + " }", + " ],", + " \"provision\": {", + " \"actor\": [", + " {", + " \"reference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000022\"", + " },", + " \"type\": \"RelatedPerson\"", + " },", + " \"role\": {", + " \"coding\": [", + " {", + " \"code\": \"Personal\",", + " \"display\": \"Personal\",", + " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\"", + " }", + " ]", + " }", + " }", + " ],", + " \"period\": {", + " \"end\": \"2026-02-11\",", + " \"start\": \"2025-02-11\"", + " }", + " },", + " \"extension\": [", + " {", + " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", + " \"valueCodeableConcept\": [", + " {", + " \"coding\": [", + " {", + " \"code\": \"TBC\",", + " \"display\": \"TBC\",", + " \"system\": \"http://terminology.hl7.org/CodeSystem/consent-reason\"", + " }", + " ]", + " }", + " ]", + " }", + " ]", " },", - " \"verificationDate\": \"2024-07-21T17:32:28Z\"", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " }", - " ]", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " }", + " ]", "}", "", "pm.test(\"Status code is 200\", function () {", @@ -3643,444 +4236,546 @@ "script": { "exec": [ "const expectedResponseBody = {", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", - " \"total\": 9,", - " \"type\": \"searchset\",", - " \"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\": {", - " \"type\": \"Patient\",", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000009\"", - " }", + " \"resourceType\": \"Bundle\",", + " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", + " \"total\": 9,", + " \"type\": \"searchset\",", + " \"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\": {", + " \"type\": \"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\"", + " },", + " {", + " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", + " \"code\": \"MTH\",", + " \"display\": \"mother\"", + " }", + " ]", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"include\"", + " }", " },", - " \"relationship\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", - " \"code\": \"PRN\",", - " \"display\": \"parent\"", - " },", - " {", - " \"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\",", - " \"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\": [", - " {", - " \"id\": \"123456\",", - " \"use\": \"usual\",", - " \"period\": {", - " \"start\": \"2020-01-01\",", - " \"end\": \"2021-12-31\"", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/A3CC67E2\",", + " \"resource\": {", + " \"resourceType\": \"Patient\",", + " \"id\": \"A3CC67E2\",", + " \"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\": [", + " {", + " \"id\": \"123456\",", + " \"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\": [", + " {", + " \"type\": \"Organization\",", + " \"identifier\": {", + " \"value\": \"ODS12345\",", + " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", + " }", + " }", + " ]", " },", - " \"given\": [", - " \"Jane Marie Anne\"", - " ],", - " \"family\": \"Smith\",", - " \"prefix\": [", - " \"Mrs\"", - " ],", - " \"suffix\": [", - " \"MBE\",", - " \"PhD\"", - " ]", - " }", - " ],", - " \"birthDate\": \"2022-10-22\",", - " \"generalPractitioner\": [", - " {", - " \"type\": \"Organization\",", - " \"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\": \"http://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", + " \"search\": {", + " \"mode\": \"include\"", " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"http://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\"", - " }", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBCC67E9\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"BBCC67E9\",", + " \"status\": \"active\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ],", + " \"text\": \"Patient Privacy Consent\"", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"http://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\"", + " }", + " }", + " ],", + " \"provision\": {", + " \"actor\": [", + " {", + " \"reference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000022\"", + " },", + " \"type\": \"RelatedPerson\"", + " },", + " \"role\": {", + " \"coding\": [", + " {", + " \"code\": \"PRN\",", + " \"display\": \"Parent\",", + " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\"", + " }", + " ]", + " }", + " }", + " ],", + " \"period\": {", + " \"end\": \"2026-02-11\",", + " \"start\": \"2025-02-11\"", + " }", + " },", + " \"extension\": [", + " {", + " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", + " \"valueCodeableConcept\": [", + " {", + " \"coding\": [", + " {", + " \"code\": \"TBC\",", + " \"display\": \"TBC\",", + " \"system\": \"http://terminology.hl7.org/CodeSystem/consent-reason\"", + " }", + " ]", + " }", + " ]", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"performer\": [", - " {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000022\"", + " {", + " \"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\": {", + " \"type\": \"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\"", " }", - " }", - " ],", - " },", - " \"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\": {", - " \"type\": \"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\",", - " \"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\": [", - " {", - " \"id\": \"123456\",", - " \"use\": \"usual\",", - " \"period\": {", - " \"start\": \"2020-01-01\",", - " \"end\": \"2021-12-31\"", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/DFCC67F5\",", + " \"resource\": {", + " \"resourceType\": \"Patient\",", + " \"id\": \"DFCC67F5\",", + " \"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\": [", + " {", + " \"id\": \"123456\",", + " \"use\": \"usual\",", + " \"period\": {", + " \"start\": \"2020-01-01\",", + " \"end\": \"2021-12-31\"", + " },", + " \"given\": [", + " \"Sally\"", + " ],", + " \"family\": \"Evans\",", + " \"prefix\": [", + " \"Mrs\"", + " ]", + " }", + " ],", + " \"birthDate\": \"1995-10-22\",", + " \"generalPractitioner\": [", + " {", + " \"type\": \"Organization\",", + " \"identifier\": {", + " \"value\": \"ODS12345\",", + " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", + " }", + " }", + " ]", " },", - " \"given\": [", - " \"Sally\"", - " ],", - " \"family\": \"Evans\",", - " \"prefix\": [", - " \"Mrs\"", - " ]", - " }", - " ],", - " \"birthDate\": \"1995-10-22\",", - " \"generalPractitioner\": [", - " {", - " \"type\": \"Organization\",", - " \"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\": \"http://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", + " \"search\": {", + " \"mode\": \"include\"", " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"http://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\"", - " }", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/WWCC67T1\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"WWCC67T1\",", + " \"status\": \"active\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ],", + " \"text\": \"Patient Privacy Consent\"", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"http://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\"", + " }", + " }", + " ],", + " \"provision\": {", + " \"actor\": [", + " {", + " \"reference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000022\"", + " },", + " \"type\": \"RelatedPerson\"", + " },", + " \"role\": {", + " \"coding\": [", + " {", + " \"code\": \"Personal\",", + " \"display\": \"Personal\",", + " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\"", + " }", + " ]", + " }", + " }", + " ],", + " \"period\": {", + " \"end\": \"2026-02-11\",", + " \"start\": \"2025-02-11\"", + " }", + " },", + " \"extension\": [", + " {", + " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", + " \"valueCodeableConcept\": [", + " {", + " \"coding\": [", + " {", + " \"code\": \"TBC\",", + " \"display\": \"TBC\",", + " \"system\": \"http://terminology.hl7.org/CodeSystem/consent-reason\"", + " }", + " ]", + " }", + " ]", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"performer\": [", - " {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000022\"", + " {", + " \"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\": {", + " \"type\": \"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\"", " }", - " }", - " ],", - " \"verification\": [", - " {", - " \"verified\": true,", - " \"verifiedWith\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000005\"", - " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/ZPTT32T3\",", + " \"resource\": {", + " \"resourceType\": \"Patient\",", + " \"id\": \"ZPTT32T3\",", + " \"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\": [", + " {", + " \"id\": \"123456\",", + " \"use\": \"usual\",", + " \"period\": {", + " \"start\": \"2020-01-01\",", + " \"end\": \"2021-12-31\"", + " },", + " \"given\": [", + " \"Michael\"", + " ],", + " \"family\": \"Percy\",", + " \"prefix\": [", + " \"Mr\"", + " ]", + " }", + " ],", + " \"birthDate\": \"1991-1-13\",", + " \"generalPractitioner\": [", + " {", + " \"type\": \"Organization\",", + " \"identifier\": {", + " \"value\": \"ODS12345\",", + " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", + " }", + " }", + " ]", " },", - " \"verificationDate\": \"2024-07-21T17:32:28Z\"", - " }", - " ]", - " },", - " \"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\": {", - " \"type\": \"Patient\",", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000006\"", - " }", + " \"search\": {", + " \"mode\": \"include\"", + " }", " },", - " \"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\",", - " \"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\": [", - " {", - " \"id\": \"123456\",", - " \"use\": \"usual\",", - " \"period\": {", - " \"start\": \"2020-01-01\",", - " \"end\": \"2021-12-31\"", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/AATD11A1\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"AATD11A1\",", + " \"status\": \"inactive\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ],", + " \"text\": \"Patient Privacy Consent\"", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"http://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\"", + " }", + " }", + " ],", + " \"provision\": {", + " \"actor\": [", + " {", + " \"reference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000022\"", + " },", + " \"type\": \"RelatedPerson\"", + " },", + " \"role\": {", + " \"coding\": [", + " {", + " \"code\": \"Personal\",", + " \"display\": \"Personal\",", + " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\"", + " }", + " ]", + " }", + " }", + " ],", + " \"period\": {", + " \"end\": \"2026-02-11\",", + " \"start\": \"2025-02-11\"", + " }", + " },", + " \"extension\": [", + " {", + " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", + " \"valueCodeableConcept\": [", + " {", + " \"coding\": [", + " {", + " \"code\": \"TBC\",", + " \"display\": \"TBC\",", + " \"system\": \"http://terminology.hl7.org/CodeSystem/consent-reason\"", + " }", + " ]", + " }", + " ]", + " }", + " ]", " },", - " \"given\": [", - " \"Michael\"", - " ],", - " \"family\": \"Percy\",", - " \"prefix\": [", - " \"Mr\"", - " ]", - " }", - " ],", - " \"birthDate\": \"1991-1-13\",", - " \"generalPractitioner\": [", - " {", - " \"type\": \"Organization\",", - " \"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\": \"http://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"http://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\"", + " \"search\": {", + " \"mode\": \"match\"", " }", - " }", - " ],", - " \"verification\": [", - " {", - " \"verified\": true,", - " \"verifiedWith\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000006\"", - " }", - " },", - " \"verificationDate\": \"2024-07-21T17:32:28Z\"", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " }", - " ]", + " }", + " ]", "}", "", "pm.test(\"Status code is 200\", function () {", @@ -4134,180 +4829,282 @@ "script": { "exec": [ "const expectedResponseBody = {", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", - " \"total\": 3,", - " \"type\": \"searchset\",", - " \"entry\": [", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBCC67E9\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"BBCC67E9\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", + " \"resourceType\": \"Bundle\",", + " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", + " \"total\": 3,", + " \"type\": \"searchset\",", + " \"entry\": [", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBCC67E9\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"BBCC67E9\",", + " \"status\": \"active\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ],", + " \"text\": \"Patient Privacy Consent\"", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"http://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\"", + " }", + " }", + " ],", + " \"provision\": {", + " \"actor\": [", + " {", + " \"reference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000020\"", + " },", + " \"type\": \"RelatedPerson\"", + " },", + " \"role\": {", + " \"coding\": [", + " {", + " \"code\": \"PRN\",", + " \"display\": \"Parent\",", + " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\"", + " }", + " ]", + " }", + " }", + " ],", + " \"period\": {", + " \"end\": \"2026-02-11\",", + " \"start\": \"2025-02-11\"", + " }", + " },", + " \"extension\": [", + " {", + " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", + " \"valueCodeableConcept\": [", + " {", + " \"coding\": [", + " {", + " \"code\": \"TBC\",", + " \"display\": \"TBC\",", + " \"system\": \"http://terminology.hl7.org/CodeSystem/consent-reason\"", + " }", + " ]", + " }", + " ]", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"http://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\"", - " }", - " }", - " ]", - " },", - " \"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\": \"http://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"http://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\"", - " }", - " }", - " ],", - " \"verification\": [", - " {", - " \"verified\": true,", - " \"verifiedWith\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000005\"", - " }", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/WWCC67T1\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"WWCC67T1\",", + " \"status\": \"active\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ],", + " \"text\": \"Patient Privacy Consent\"", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"http://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\"", + " }", + " }", + " ],", + " \"provision\": {", + " \"actor\": [", + " {", + " \"reference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000021\"", + " },", + " \"type\": \"RelatedPerson\"", + " },", + " \"role\": {", + " \"coding\": [", + " {", + " \"code\": \"GUARD\",", + " \"display\": \"Guardian\",", + " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\"", + " }", + " ]", + " }", + " }", + " ],", + " \"period\": {", + " \"end\": \"2026-02-11\",", + " \"start\": \"2025-02-11\"", + " }", + " },", + " \"extension\": [", + " {", + " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", + " \"valueCodeableConcept\": [", + " {", + " \"coding\": [", + " {", + " \"code\": \"TBC\",", + " \"display\": \"TBC\",", + " \"system\": \"http://terminology.hl7.org/CodeSystem/consent-reason\"", + " }", + " ]", + " }", + " ]", + " }", + " ]", " },", - " \"verificationDate\": \"2024-07-21T17:32:28Z\"", - " }", - " ]", - " },", - " \"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\": \"http://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", + " \"search\": {", + " \"mode\": \"match\"", " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"http://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\"", - " }", - " }", - " ],", - " \"verification\": [", - " {", - " \"verified\": true,", - " \"verifiedWith\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000006\"", - " }", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/AATD11A1\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"AATD11A1\",", + " \"status\": \"inactive\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ],", + " \"text\": \"Patient Privacy Consent\"", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"http://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\"", + " }", + " }", + " ],", + " \"provision\": {", + " \"actor\": [", + " {", + " \"reference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000022\"", + " },", + " \"type\": \"RelatedPerson\"", + " },", + " \"role\": {", + " \"coding\": [", + " {", + " \"code\": \"CHILD\",", + " \"display\": \"Child\",", + " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\"", + " }", + " ]", + " }", + " }", + " ],", + " \"period\": {", + " \"end\": \"2026-02-11\",", + " \"start\": \"2025-02-11\"", + " }", + " },", + " \"extension\": [", + " {", + " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", + " \"valueCodeableConcept\": [", + " {", + " \"coding\": [", + " {", + " \"code\": \"TBC\",", + " \"display\": \"TBC\",", + " \"system\": \"http://terminology.hl7.org/CodeSystem/consent-reason\"", + " }", + " ]", + " }", + " ]", + " }", + " ]", " },", - " \"verificationDate\": \"2024-07-21T17:32:28Z\"", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " }", - " ]", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " }", + " ]", "}", "", "pm.test(\"Status code is 200\", function () {", @@ -4353,346 +5150,448 @@ "script": { "exec": [ "const expectedResponseBody = {", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", - " \"total\": 7,", - " \"type\": \"searchset\",", - " \"entry\": [", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/A3CC67E2\",", - " \"resource\": {", - " \"resourceType\": \"Patient\",", - " \"id\": \"A3CC67E2\",", - " \"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\": [", - " {", - " \"id\": \"123456\",", - " \"use\": \"usual\",", - " \"period\": {", - " \"start\": \"2020-01-01\",", - " \"end\": \"2021-12-31\"", + " \"resourceType\": \"Bundle\",", + " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", + " \"total\": 7,", + " \"type\": \"searchset\",", + " \"entry\": [", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/A3CC67E2\",", + " \"resource\": {", + " \"resourceType\": \"Patient\",", + " \"id\": \"A3CC67E2\",", + " \"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\": [", + " {", + " \"id\": \"123456\",", + " \"use\": \"usual\",", + " \"period\": {", + " \"start\": \"2020-01-01\",", + " \"end\": \"2021-12-31\"", + " },", + " \"given\": [", + " \"Samantha\"", + " ],", + " \"family\": \"Adams\",", + " \"prefix\": [", + " \"Miss\"", + " ]", + " }", + " ],", + " \"birthDate\": \"1963-11-02\",", + " \"generalPractitioner\": [", + " {", + " \"type\": \"Organization\",", + " \"identifier\": {", + " \"value\": \"ODS12345\",", + " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", + " }", + " }", + " ]", " },", - " \"given\": [", - " \"Samantha\"", - " ],", - " \"family\": \"Adams\",", - " \"prefix\": [", - " \"Miss\"", - " ]", - " }", - " ],", - " \"birthDate\": \"1963-11-02\",", - " \"generalPractitioner\": [", - " {", - " \"type\": \"Organization\",", - " \"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\": {", - " \"type\": \"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\"", - " },", - " {", - " \"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\": \"http://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"http://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\"", - " }", - " }", - " ]", - " },", - " \"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\": {", - " \"type\": \"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\": \"http://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", + " \"search\": {", + " \"mode\": \"include\"", " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"http://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\"", + " {", + " \"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\": {", + " \"type\": \"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\"", + " },", + " {", + " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", + " \"code\": \"MTH\",", + " \"display\": \"mother\"", + " }", + " ]", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"include\"", " }", - " }", - " ],", - " \"verification\": [", - " {", - " \"verified\": true,", - " \"verifiedWith\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000021\"", - " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBCC67E9\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"BBCC67E9\",", + " \"status\": \"active\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ],", + " \"text\": \"Patient Privacy Consent\"", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"http://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\"", + " }", + " }", + " ],", + " \"provision\": {", + " \"actor\": [", + " {", + " \"reference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000020\"", + " },", + " \"type\": \"RelatedPerson\"", + " },", + " \"role\": {", + " \"coding\": [", + " {", + " \"code\": \"CHILD\",", + " \"display\": \"Child\",", + " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\"", + " }", + " ]", + " }", + " }", + " ],", + " \"period\": {", + " \"end\": \"2026-02-11\",", + " \"start\": \"2025-02-11\"", + " }", + " },", + " \"extension\": [", + " {", + " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", + " \"valueCodeableConcept\": [", + " {", + " \"coding\": [", + " {", + " \"code\": \"TBC\",", + " \"display\": \"TBC\",", + " \"system\": \"http://terminology.hl7.org/CodeSystem/consent-reason\"", + " }", + " ]", + " }", + " ]", + " }", + " ]", " },", - " \"verificationDate\": \"2024-07-21T17:32:28Z\"", - " }", - " ]", - " },", - " \"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\": {", - " \"type\": \"Patient\",", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000100\"", - " }", + " \"search\": {", + " \"mode\": \"match\"", + " }", " },", - " \"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\": \"http://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", + " {", + " \"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\": {", + " \"type\": \"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\"", " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"http://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\"", - " }", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/WWCC67T1\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"WWCC67T1\",", + " \"status\": \"active\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ],", + " \"text\": \"Patient Privacy Consent\"", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"http://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\"", + " }", + " }", + " ],", + " \"provision\": {", + " \"actor\": [", + " {", + " \"reference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000021\"", + " },", + " \"type\": \"RelatedPerson\"", + " },", + " \"role\": {", + " \"coding\": [", + " {", + " \"code\": \"GUARD\",", + " \"display\": \"Guardian\",", + " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\"", + " }", + " ]", + " }", + " }", + " ],", + " \"period\": {", + " \"end\": \"2026-02-11\",", + " \"start\": \"2025-02-11\"", + " }", + " },", + " \"extension\": [", + " {", + " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", + " \"valueCodeableConcept\": [", + " {", + " \"coding\": [", + " {", + " \"code\": \"TBC\",", + " \"display\": \"TBC\",", + " \"system\": \"http://terminology.hl7.org/CodeSystem/consent-reason\"", + " }", + " ]", + " }", + " ]", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"performer\": [", - " {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000022\"", + " {", + " \"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\": {", + " \"type\": \"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\"", " }", - " }", - " ],", - " \"verification\": [", - " {", - " \"verified\": true,", - " \"verifiedWith\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000022\"", - " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/AATD11A1\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"AATD11A1\",", + " \"status\": \"inactive\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ],", + " \"text\": \"Patient Privacy Consent\"", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"http://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\"", + " }", + " }", + " ],", + " \"provision\": {", + " \"actor\": [", + " {", + " \"reference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000022\"", + " },", + " \"type\": \"RelatedPerson\"", + " },", + " \"role\": {", + " \"coding\": [", + " {", + " \"code\": \"PRN\",", + " \"display\": \"Parent\",", + " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\"", + " }", + " ]", + " }", + " }", + " ],", + " \"period\": {", + " \"end\": \"2026-02-11\",", + " \"start\": \"2025-02-11\"", + " }", + " },", + " \"extension\": [", + " {", + " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", + " \"valueCodeableConcept\": [", + " {", + " \"coding\": [", + " {", + " \"code\": \"TBC\",", + " \"display\": \"TBC\",", + " \"system\": \"http://terminology.hl7.org/CodeSystem/consent-reason\"", + " }", + " ]", + " }", + " ]", + " }", + " ]", " },", - " \"verificationDate\": \"2024-07-21T17:32:28Z\"", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " }", - " ]", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " }", + " ]", "}", "", "pm.test(\"Status code is 200\", function () {", @@ -4746,299 +5645,401 @@ "script": { "exec": [ "const expectedResponseBody = {", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", - " \"total\": 6,", - " \"type\": \"searchset\",", - " \"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\": {", - " \"type\": \"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\"", - " },", - " {", - " \"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\": \"http://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"http://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\"", + " \"resourceType\": \"Bundle\",", + " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", + " \"total\": 6,", + " \"type\": \"searchset\",", + " \"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\": {", + " \"type\": \"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\"", + " },", + " {", + " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", + " \"code\": \"MTH\",", + " \"display\": \"mother\"", + " }", + " ]", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"include\"", " }", - " }", - " ]", - " },", - " \"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\": {", - " \"type\": \"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\": \"http://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBCC67E9\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"BBCC67E9\",", + " \"status\": \"active\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ],", + " \"text\": \"Patient Privacy Consent\"", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"http://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\"", + " }", + " }", + " ],", + " \"provision\": {", + " \"actor\": [", + " {", + " \"reference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000020\"", + " },", + " \"type\": \"RelatedPerson\"", + " },", + " \"role\": {", + " \"coding\": [", + " {", + " \"code\": \"CHILD\",", + " \"display\": \"Child\",", + " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\"", + " }", + " ]", + " }", + " }", + " ],", + " \"period\": {", + " \"end\": \"2026-02-11\",", + " \"start\": \"2025-02-11\"", + " }", + " },", + " \"extension\": [", + " {", + " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", + " \"valueCodeableConcept\": [", + " {", + " \"coding\": [", + " {", + " \"code\": \"TBC\",", + " \"display\": \"TBC\",", + " \"system\": \"http://terminology.hl7.org/CodeSystem/consent-reason\"", + " }", + " ]", + " }", + " ]", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"http://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\"", - " }", - " }", - " ],", - " \"verification\": [", - " {", - " \"verified\": true,", - " \"verifiedWith\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000021\"", - " }", + " {", + " \"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\": {", + " \"type\": \"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\"", + " }", + " ]", + " }", + " ]", " },", - " \"verificationDate\": \"2024-07-21T17:32:28Z\"", - " }", - " ]", - " },", - " \"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\": {", - " \"type\": \"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\": \"http://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", + " \"search\": {", + " \"mode\": \"include\"", " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"http://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\"", - " }", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/WWCC67T1\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"WWCC67T1\",", + " \"status\": \"active\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ],", + " \"text\": \"Patient Privacy Consent\"", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"http://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\"", + " }", + " }", + " ],", + " \"provision\": {", + " \"actor\": [", + " {", + " \"reference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000021\"", + " },", + " \"type\": \"RelatedPerson\"", + " },", + " \"role\": {", + " \"coding\": [", + " {", + " \"code\": \"GUARD\",", + " \"display\": \"Guardian\",", + " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\"", + " }", + " ]", + " }", + " }", + " ],", + " \"period\": {", + " \"end\": \"2026-02-11\",", + " \"start\": \"2025-02-11\"", + " }", + " },", + " \"extension\": [", + " {", + " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", + " \"valueCodeableConcept\": [", + " {", + " \"coding\": [", + " {", + " \"code\": \"TBC\",", + " \"display\": \"TBC\",", + " \"system\": \"http://terminology.hl7.org/CodeSystem/consent-reason\"", + " }", + " ]", + " }", + " ]", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"performer\": [", - " {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000022\"", + " {", + " \"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\": {", + " \"type\": \"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\"", " }", - " }", - " ],", - " \"verification\": [", - " {", - " \"verified\": true,", - " \"verifiedWith\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000022\"", - " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/AATD11A1\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"AATD11A1\",", + " \"status\": \"inactive\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ],", + " \"text\": \"Patient Privacy Consent\"", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"http://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\"", + " }", + " }", + " ],", + " \"provision\": {", + " \"actor\": [", + " {", + " \"reference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000022\"", + " },", + " \"type\": \"RelatedPerson\"", + " },", + " \"role\": {", + " \"coding\": [", + " {", + " \"code\": \"PRN\",", + " \"display\": \"Parent\",", + " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\"", + " }", + " ]", + " }", + " }", + " ],", + " \"period\": {", + " \"end\": \"2026-02-11\",", + " \"start\": \"2025-02-11\"", + " }", + " },", + " \"extension\": [", + " {", + " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", + " \"valueCodeableConcept\": [", + " {", + " \"coding\": [", + " {", + " \"code\": \"TBC\",", + " \"display\": \"TBC\",", + " \"system\": \"http://terminology.hl7.org/CodeSystem/consent-reason\"", + " }", + " ]", + " }", + " ]", + " }", + " ]", " },", - " \"verificationDate\": \"2024-07-21T17:32:28Z\"", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " }", - " ]", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " }", + " ]", "}", "", "pm.test(\"Status code is 200\", function () {", @@ -5088,227 +6089,329 @@ "script": { "exec": [ "const expectedResponseBody = {", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", - " \"total\": 4,", - " \"type\": \"searchset\",", - " \"entry\": [", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/A3CC67E2\",", - " \"resource\": {", - " \"resourceType\": \"Patient\",", - " \"id\": \"A3CC67E2\",", - " \"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\": [", - " {", - " \"id\": \"123456\",", - " \"use\": \"usual\",", - " \"period\": {", - " \"start\": \"2020-01-01\",", - " \"end\": \"2021-12-31\"", + " \"resourceType\": \"Bundle\",", + " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", + " \"total\": 4,", + " \"type\": \"searchset\",", + " \"entry\": [", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/A3CC67E2\",", + " \"resource\": {", + " \"resourceType\": \"Patient\",", + " \"id\": \"A3CC67E2\",", + " \"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\": [", + " {", + " \"id\": \"123456\",", + " \"use\": \"usual\",", + " \"period\": {", + " \"start\": \"2020-01-01\",", + " \"end\": \"2021-12-31\"", + " },", + " \"given\": [", + " \"Samantha\"", + " ],", + " \"family\": \"Adams\",", + " \"prefix\": [", + " \"Miss\"", + " ]", + " }", + " ],", + " \"birthDate\": \"1963-11-02\",", + " \"generalPractitioner\": [", + " {", + " \"type\": \"Organization\",", + " \"identifier\": {", + " \"value\": \"ODS12345\",", + " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", + " }", + " }", + " ]", " },", - " \"given\": [", - " \"Samantha\"", - " ],", - " \"family\": \"Adams\",", - " \"prefix\": [", - " \"Miss\"", - " ]", - " }", - " ],", - " \"birthDate\": \"1963-11-02\",", - " \"generalPractitioner\": [", - " {", - " \"type\": \"Organization\",", - " \"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\": \"http://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"http://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\"", - " }", - " }", - " ]", - " },", - " \"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\": \"http://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", + " \"search\": {", + " \"mode\": \"include\"", " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"http://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\"", - " }", - " }", - " ],", - " \"verification\": [", - " {", - " \"verified\": true,", - " \"verifiedWith\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000021\"", - " }", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBCC67E9\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"BBCC67E9\",", + " \"status\": \"active\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ],", + " \"text\": \"Patient Privacy Consent\"", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"http://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\"", + " }", + " }", + " ],", + " \"provision\": {", + " \"actor\": [", + " {", + " \"reference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000020\"", + " },", + " \"type\": \"RelatedPerson\"", + " },", + " \"role\": {", + " \"coding\": [", + " {", + " \"code\": \"CHILD\",", + " \"display\": \"Child\",", + " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\"", + " }", + " ]", + " }", + " }", + " ],", + " \"period\": {", + " \"end\": \"2026-02-11\",", + " \"start\": \"2025-02-11\"", + " }", + " },", + " \"extension\": [", + " {", + " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", + " \"valueCodeableConcept\": [", + " {", + " \"coding\": [", + " {", + " \"code\": \"TBC\",", + " \"display\": \"TBC\",", + " \"system\": \"http://terminology.hl7.org/CodeSystem/consent-reason\"", + " }", + " ]", + " }", + " ]", + " }", + " ]", " },", - " \"verificationDate\": \"2024-07-21T17:32:28Z\"", - " }", - " ]", - " },", - " \"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\": \"http://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", + " \"search\": {", + " \"mode\": \"match\"", " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"http://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\"", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/WWCC67T1\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"WWCC67T1\",", + " \"status\": \"active\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ],", + " \"text\": \"Patient Privacy Consent\"", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"http://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\"", + " }", + " }", + " ],", + " \"provision\": {", + " \"actor\": [", + " {", + " \"reference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000021\"", + " },", + " \"type\": \"RelatedPerson\"", + " },", + " \"role\": {", + " \"coding\": [", + " {", + " \"code\": \"GUARD\",", + " \"display\": \"Guardian\",", + " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\"", + " }", + " ]", + " }", + " }", + " ],", + " \"period\": {", + " \"end\": \"2026-02-11\",", + " \"start\": \"2025-02-11\"", + " }", + " },", + " \"extension\": [", + " {", + " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", + " \"valueCodeableConcept\": [", + " {", + " \"coding\": [", + " {", + " \"code\": \"TBC\",", + " \"display\": \"TBC\",", + " \"system\": \"http://terminology.hl7.org/CodeSystem/consent-reason\"", + " }", + " ]", + " }", + " ]", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", " }", - " }", - " ],", - " \"verification\": [", - " {", - " \"verified\": true,", - " \"verifiedWith\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000022\"", - " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/AATD11A1\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"AATD11A1\",", + " \"status\": \"inactive\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ],", + " \"text\": \"Patient Privacy Consent\"", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"http://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\"", + " }", + " }", + " ],", + " \"provision\": {", + " \"actor\": [", + " {", + " \"reference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000022\"", + " },", + " \"type\": \"RelatedPerson\"", + " },", + " \"role\": {", + " \"coding\": [", + " {", + " \"code\": \"PRN\",", + " \"display\": \"Parent\",", + " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\"", + " }", + " ]", + " }", + " }", + " ],", + " \"period\": {", + " \"end\": \"2026-02-11\",", + " \"start\": \"2025-02-11\"", + " }", + " },", + " \"extension\": [", + " {", + " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", + " \"valueCodeableConcept\": [", + " {", + " \"coding\": [", + " {", + " \"code\": \"TBC\",", + " \"display\": \"TBC\",", + " \"system\": \"http://terminology.hl7.org/CodeSystem/consent-reason\"", + " }", + " ]", + " }", + " ]", + " }", + " ]", " },", - " \"verificationDate\": \"2024-07-21T17:32:28Z\"", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " }", - " ]", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " }", + " ]", "}", "", "pm.test(\"Status code is 200\", function () {", @@ -5407,72 +6510,102 @@ "script": { "exec": [ "const expectedResponseBody = {", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", - " \"total\": 1,", - " \"type\": \"searchset\",", - " \"entry\": [", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/WWCC67T1\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"WWCC67T1\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"http://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\"", - " }", - " }", - " ],", - " \"verification\": [", - " {", - " \"verified\": true,", - " \"verifiedWith\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000005\"", - " }", + " \"resourceType\": \"Bundle\",", + " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", + " \"total\": 1,", + " \"type\": \"searchset\",", + " \"entry\": [", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/WWCC67T1\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"WWCC67T1\",", + " \"status\": \"active\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ],", + " \"text\": \"Patient Privacy Consent\"", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"http://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\"", + " }", + " }", + " ],", + " \"provision\": {", + " \"actor\": [", + " {", + " \"reference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000010\"", + " },", + " \"type\": \"RelatedPerson\"", + " },", + " \"role\": {", + " \"coding\": [", + " {", + " \"code\": \"GUARD\",", + " \"display\": \"Guardian\",", + " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\"", + " }", + " ]", + " }", + " }", + " ],", + " \"period\": {", + " \"end\": \"2026-02-11\",", + " \"start\": \"2025-02-11\"", + " }", + " },", + " \"extension\": [", + " {", + " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", + " \"valueCodeableConcept\": [", + " {", + " \"coding\": [", + " {", + " \"code\": \"TBC\",", + " \"display\": \"TBC\",", + " \"system\": \"http://terminology.hl7.org/CodeSystem/consent-reason\"", + " }", + " ]", + " }", + " ]", + " }", + " ]", " },", - " \"verificationDate\": \"2024-07-21T17:32:28Z\"", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " }", - " ]", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " }", + " ]", "}", "", "pm.test(\"Status code is 200\", function () {", @@ -5484,7 +6617,8 @@ " pm.expect(responseJson).to.eql(expectedResponseBody);", "});" ], - "type": "text/javascript" + "type": "text/javascript", + "packages": {} } } ], @@ -5517,157 +6651,187 @@ "script": { "exec": [ "const expectedResponseBody = {", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", - " \"total\": 3,", - " \"type\": \"searchset\",", - " \"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\": {", - " \"type\": \"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\",", - " \"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\": [", - " {", - " \"id\": \"123456\",", - " \"use\": \"usual\",", - " \"period\": {", - " \"start\": \"2020-01-01\",", - " \"end\": \"2021-12-31\"", + " \"resourceType\": \"Bundle\",", + " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", + " \"total\": 3,", + " \"type\": \"searchset\",", + " \"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\": {", + " \"type\": \"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\"", + " }", + " ]", + " }", + " ]", " },", - " \"given\": [", - " \"Sally\"", - " ],", - " \"family\": \"Evans\",", - " \"prefix\": [", - " \"Mrs\"", - " ]", - " }", - " ],", - " \"birthDate\": \"1995-10-22\",", - " \"generalPractitioner\": [", - " {", - " \"type\": \"Organization\",", - " \"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\": \"http://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", + " \"search\": {", + " \"mode\": \"include\"", " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"http://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\"", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/DFCC67F5\",", + " \"resource\": {", + " \"resourceType\": \"Patient\",", + " \"id\": \"DFCC67F5\",", + " \"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\": [", + " {", + " \"id\": \"123456\",", + " \"use\": \"usual\",", + " \"period\": {", + " \"start\": \"2020-01-01\",", + " \"end\": \"2021-12-31\"", + " },", + " \"given\": [", + " \"Sally\"", + " ],", + " \"family\": \"Evans\",", + " \"prefix\": [", + " \"Mrs\"", + " ]", + " }", + " ],", + " \"birthDate\": \"1995-10-22\",", + " \"generalPractitioner\": [", + " {", + " \"type\": \"Organization\",", + " \"identifier\": {", + " \"value\": \"ODS12345\",", + " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"include\"", " }", - " }", - " ],", - " \"verification\": [", - " {", - " \"verified\": true,", - " \"verifiedWith\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000005\"", - " }", + " },", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/WWCC67T1\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"WWCC67T1\",", + " \"status\": \"active\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ],", + " \"text\": \"Patient Privacy Consent\"", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"http://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\"", + " }", + " }", + " ],", + " \"provision\": {", + " \"actor\": [", + " {", + " \"reference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000010\"", + " },", + " \"type\": \"RelatedPerson\"", + " },", + " \"role\": {", + " \"coding\": [", + " {", + " \"code\": \"PRN\",", + " \"display\": \"Parent\",", + " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\"", + " }", + " ]", + " }", + " }", + " ],", + " \"period\": {", + " \"end\": \"2026-02-11\",", + " \"start\": \"2025-02-11\"", + " }", + " },", + " \"extension\": [", + " {", + " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", + " \"valueCodeableConcept\": [", + " {", + " \"coding\": [", + " {", + " \"code\": \"TBC\",", + " \"display\": \"TBC\",", + " \"system\": \"http://terminology.hl7.org/CodeSystem/consent-reason\"", + " }", + " ]", + " }", + " ]", + " }", + " ]", " },", - " \"verificationDate\": \"2024-07-21T17:32:28Z\"", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " }", - " ]", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " }", + " ]", "}", "", "pm.test(\"Status code is 200\", function () {", @@ -5679,7 +6843,8 @@ " pm.expect(responseJson).to.eql(expectedResponseBody);", "});" ], - "type": "text/javascript" + "type": "text/javascript", + "packages": {} } } ], @@ -5720,252 +6885,337 @@ "script": { "exec": [ "const expectedResponseBody = {", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", - " \"total\": 1,", - " \"type\": \"searchset\",", - " \"entry\": [", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBCC67E9\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"BBCC67E9\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"http://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\"", - " }", - " }", - " ],", - " },", - " \"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" - } - } - ], - "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\": 3,", - " \"type\": \"searchset\",", - " \"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\": {", - " \"type\": \"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\"", - " },", - " {", - " \"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\",", - " \"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\": [", - " {", - " \"id\": \"123456\",", - " \"use\": \"usual\",", - " \"period\": {", - " \"start\": \"2020-01-01\",", - " \"end\": \"2021-12-31\"", + " \"resourceType\": \"Bundle\",", + " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", + " \"total\": 1,", + " \"type\": \"searchset\",", + " \"entry\": [", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBCC67E9\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"BBCC67E9\",", + " \"status\": \"active\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ],", + " \"text\": \"Patient Privacy Consent\"", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"http://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\"", + " },", + " \"type\": \"RelatedPerson\"", + " },", + " \"role\": {", + " \"coding\": [", + " {", + " \"code\": \"PRN\",", + " \"display\": \"Parent\",", + " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\"", + " }", + " ]", + " }", + " }", + " ],", + " \"period\": {", + " \"end\": \"2026-02-11\",", + " \"start\": \"2025-02-11\"", + " }", + " },", + " \"extension\": [", + " {", + " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", + " \"valueCodeableConcept\": [", + " {", + " \"coding\": [", + " {", + " \"code\": \"TBC\",", + " \"display\": \"TBC\",", + " \"system\": \"http://terminology.hl7.org/CodeSystem/consent-reason\"", + " }", + " ]", + " }", + " ]", + " }", + " ]", " },", - " \"given\": [", - " \"Jane Marie Anne\"", - " ],", - " \"family\": \"Smith\",", - " \"prefix\": [", - " \"Mrs\"", - " ],", - " \"suffix\": [", - " \"MBE\",", - " \"PhD\"", - " ]", - " }", - " ],", - " \"birthDate\": \"2022-10-22\",", - " \"generalPractitioner\": [", - " {", - " \"type\": \"Organization\",", - " \"identifier\": {", - " \"value\": \"ODS12345\",", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", + " \"search\": {", + " \"mode\": \"match\"", " }", - " }", - " ]", - " },", - " \"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\": \"http://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", + " }", + " ]", + "}", + "", + "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\": 3,", + " \"type\": \"searchset\",", + " \"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\": {", + " \"type\": \"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\"", + " },", + " {", + " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", + " \"code\": \"MTH\",", + " \"display\": \"mother\"", + " }", + " ]", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"include\"", " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"http://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\"", - " }", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/A3CC67E2\",", + " \"resource\": {", + " \"resourceType\": \"Patient\",", + " \"id\": \"A3CC67E2\",", + " \"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\": [", + " {", + " \"id\": \"123456\",", + " \"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\": [", + " {", + " \"type\": \"Organization\",", + " \"identifier\": {", + " \"value\": \"ODS12345\",", + " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", + " }", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"include\"", + " }", " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"performer\": [", - " {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000019\"", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBCC67E9\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"BBCC67E9\",", + " \"status\": \"active\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ],", + " \"text\": \"Patient Privacy Consent\"", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"http://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\"", + " },", + " \"type\": \"RelatedPerson\"", + " },", + " \"role\": {", + " \"coding\": [", + " {", + " \"code\": \"PRN\",", + " \"display\": \"Parent\",", + " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\"", + " }", + " ]", + " }", + " }", + " ],", + " \"period\": {", + " \"end\": \"2026-02-11\",", + " \"start\": \"2025-02-11\"", + " }", + " },", + " \"extension\": [", + " {", + " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", + " \"valueCodeableConcept\": [", + " {", + " \"coding\": [", + " {", + " \"code\": \"TBC\",", + " \"display\": \"TBC\",", + " \"system\": \"http://terminology.hl7.org/CodeSystem/consent-reason\"", + " }", + " ]", + " }", + " ]", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", " }", - " }", - " ],", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " }", - " ]", + " }", + " ]", "}", "", "pm.test(\"Status code is 200\", function () {", @@ -6802,16 +8052,46 @@ " }", " }", " ],", - " \"verification\": [", + " \"provision\": {", + " \"actor\": [", + " {", + " \"reference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000010\"", + " },", + " \"type\": \"RelatedPerson\"", + " },", + " \"role\": {", + " \"coding\": [", + " {", + " \"code\": \"GUARD\",", + " \"display\": \"Guardian\",", + " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\"", + " }", + " ]", + " }", + " }", + " ],", + " \"period\": {", + " \"end\": \"2026-02-11\",", + " \"start\": \"2025-02-11\"", + " }", + " },", + " \"extension\": [", " {", - " \"verified\": true,", - " \"verifiedWith\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000005\"", + " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", + " \"valueCodeableConcept\": [", + " {", + " \"coding\": [", + " {", + " \"code\": \"TBC\",", + " \"display\": \"TBC\",", + " \"system\": \"http://terminology.hl7.org/CodeSystem/consent-reason\"", + " }", + " ]", " }", - " },", - " \"verificationDate\": \"2024-07-21T17:32:28Z\"", + " ]", " }", " ]", " },", @@ -6955,18 +8235,6 @@ " }", " }", " ],", - " \"verification\": [", - " {", - " \"verified\": true,", - " \"verifiedWith\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000005\"", - " }", - " },", - " \"verificationDate\": \"2024-07-21T17:32:28Z\"", - " }", - " ]", " },", " \"search\": {", " \"mode\": \"match\"", @@ -7105,18 +8373,6 @@ " }", " }", " ],", - " \"verification\": [", - " {", - " \"verified\": true,", - " \"verifiedWith\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000005\"", - " }", - " },", - " \"verificationDate\": \"2024-07-21T17:32:28Z\"", - " }", - " ]", " },", " \"search\": {", " \"mode\": \"match\"", @@ -7169,157 +8425,187 @@ "script": { "exec": [ "const expectedResponseBody = {", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", - " \"total\": 3,", - " \"type\": \"searchset\",", - " \"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\": {", - " \"type\": \"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\",", - " \"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\": [", - " {", - " \"id\": \"123456\",", - " \"use\": \"usual\",", - " \"period\": {", - " \"start\": \"2020-01-01\",", - " \"end\": \"2021-12-31\"", + " \"resourceType\": \"Bundle\",", + " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", + " \"total\": 3,", + " \"type\": \"searchset\",", + " \"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\": {", + " \"type\": \"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\"", + " }", + " ]", + " }", + " ]", " },", - " \"given\": [", - " \"Sally\"", - " ],", - " \"family\": \"Evans\",", - " \"prefix\": [", - " \"Mrs\"", - " ]", - " }", - " ],", - " \"birthDate\": \"1995-10-22\",", - " \"generalPractitioner\": [", - " {", - " \"type\": \"Organization\",", - " \"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\": \"http://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", + " \"search\": {", + " \"mode\": \"include\"", " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"http://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\"", - " }", - " }", - " ],", - " \"verification\": [", - " {", - " \"verified\": true,", - " \"verifiedWith\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000005\"", - " }", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/DFCC67F5\",", + " \"resource\": {", + " \"resourceType\": \"Patient\",", + " \"id\": \"DFCC67F5\",", + " \"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\": [", + " {", + " \"id\": \"123456\",", + " \"use\": \"usual\",", + " \"period\": {", + " \"start\": \"2020-01-01\",", + " \"end\": \"2021-12-31\"", + " },", + " \"given\": [", + " \"Sally\"", + " ],", + " \"family\": \"Evans\",", + " \"prefix\": [", + " \"Mrs\"", + " ]", + " }", + " ],", + " \"birthDate\": \"1995-10-22\",", + " \"generalPractitioner\": [", + " {", + " \"type\": \"Organization\",", + " \"identifier\": {", + " \"value\": \"ODS12345\",", + " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", + " }", + " }", + " ]", " },", - " \"verificationDate\": \"2024-07-21T17:32:28Z\"", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " }", - " ]", + " \"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\": \"http://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ],", + " \"text\": \"Patient Privacy Consent\"", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"http://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\"", + " }", + " }", + " ],", + " \"provision\": {", + " \"actor\": [", + " {", + " \"reference\": {", + " \"identifier\": {", + " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", + " \"value\": \"9000000010\"", + " },", + " \"type\": \"RelatedPerson\"", + " },", + " \"role\": {", + " \"coding\": [", + " {", + " \"code\": \"PRN\",", + " \"display\": \"Parent\",", + " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\"", + " }", + " ]", + " }", + " }", + " ],", + " \"period\": {", + " \"end\": \"2026-02-11\",", + " \"start\": \"2025-02-11\"", + " }", + " },", + " \"extension\": [", + " {", + " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", + " \"valueCodeableConcept\": [", + " {", + " \"coding\": [", + " {", + " \"code\": \"TBC\",", + " \"display\": \"TBC\",", + " \"system\": \"http://terminology.hl7.org/CodeSystem/consent-reason\"", + " }", + " ]", + " }", + " ]", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " }", + " ]", "}", "", "pm.test(\"Status code is 200\", function () {", @@ -7370,60 +8656,102 @@ "script": { "exec": [ "const expectedResponseBody = {", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", - " \"total\": 1,", - " \"type\": \"searchset\",", - " \"entry\": [", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBCC67E9\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"BBCC67E9\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"http://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\"", + " \"resourceType\": \"Bundle\",", + " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", + " \"total\": 1,", + " \"type\": \"searchset\",", + " \"entry\": [", + " {", + " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBCC67E9\",", + " \"resource\": {", + " \"resourceType\": \"Consent\",", + " \"id\": \"BBCC67E9\",", + " \"status\": \"active\",", + " \"scope\": {", + " \"coding\": [", + " {", + " \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ],", + " \"text\": \"Patient Privacy Consent\"", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"http://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\"", + " },", + " \"type\": \"RelatedPerson\"", + " },", + " \"role\": {", + " \"coding\": [", + " {", + " \"code\": \"PRN\",", + " \"display\": \"Parent\",", + " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\"", + " }", + " ]", + " }", + " }", + " ],", + " \"period\": {", + " \"end\": \"2026-02-11\",", + " \"start\": \"2025-02-11\"", + " }", + " },", + " \"extension\": [", + " {", + " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", + " \"valueCodeableConcept\": [", + " {", + " \"coding\": [", + " {", + " \"code\": \"TBC\",", + " \"display\": \"TBC\",", + " \"system\": \"http://terminology.hl7.org/CodeSystem/consent-reason\"", + " }", + " ]", + " }", + " ]", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " }", - " ]", + " }", + " ]", "}", "", "pm.test(\"Status code is 200\", function () {", @@ -7505,157 +8833,14 @@ " ]", " }", " ],", - " \"birthDate\": \"2022-10-22\",", - " \"generalPractitioner\": [", - " {", - " \"type\": \"Organization\",", - " \"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\": \"http://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ],", - " \"text\": \"Patient Privacy Consent\"", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"http://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\"", - " }", - " }", - " ]", - " },", - " \"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\": 2,", - " \"type\": \"searchset\",", - " \"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\": {", - " \"type\": \"Patient\",", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000009\"", - " }", - " },", - " \"relationship\": [", + " \"birthDate\": \"2022-10-22\",", + " \"generalPractitioner\": [", " {", - " \"coding\": [", - " {", - " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", - " \"code\": \"PRN\",", - " \"display\": \"parent\"", - " },", - " {", - " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", - " \"code\": \"MTH\",", - " \"display\": \"mother\"", - " }", - " ]", + " \"type\": \"Organization\",", + " \"identifier\": {", + " \"value\": \"ODS12345\",", + " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", + " }", " }", " ]", " },", @@ -7732,7 +8917,7 @@ "method": "GET", "header": [], "url": { - "raw": "{{api_base_url}}/Consent/39df03a2-1b14-4d19-b1dc-d5d8cbf96948?_include=Consent:performer", + "raw": "{{api_base_url}}/Consent/39df03a2-1b14-4d19-b1dc-d5d8cbf96948?_include=Consent:patient", "host": [ "{{api_base_url}}" ], @@ -7743,7 +8928,7 @@ "query": [ { "key": "_include", - "value": "Consent:performer" + "value": "Consent:patient" } ] } @@ -7751,7 +8936,7 @@ "response": [] }, { - "name": "Retrieve mother-child relationship with performer and patient details", + "name": "Retrieve mother-child relationship with performer details", "event": [ { "listen": "test", @@ -7760,7 +8945,7 @@ "const expectedResponseBody = {", " \"resourceType\": \"Bundle\",", " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", - " \"total\": 3,", + " \"total\": 2,", " \"type\": \"searchset\",", " \"entry\": [", " {", @@ -7807,57 +8992,6 @@ " }", " },", " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/A3CC67E2\",", - " \"resource\": {", - " \"resourceType\": \"Patient\",", - " \"id\": \"A3CC67E2\",", - " \"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\": [", - " {", - " \"id\": \"123456\",", - " \"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\": [", - " {", - " \"type\": \"Organization\",", - " \"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\",", @@ -7922,6 +9056,242 @@ } } ], + "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\": 3,", + " \"type\": \"searchset\",", + " \"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\": {", + " \"type\": \"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\"", + " },", + " {", + " \"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\",", + " \"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\": [", + " {", + " \"id\": \"123456\",", + " \"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\": [", + " {", + " \"type\": \"Organization\",", + " \"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\": \"http://terminology.hl7.org/CodeSystem/consentscope\",", + " \"code\": \"patient-privacy\",", + " \"display\": \"Privacy Consent\"", + " }", + " ],", + " \"text\": \"Patient Privacy Consent\"", + " },", + " \"category\": [", + " {", + " \"coding\": [", + " {", + " \"system\": \"http://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\"", + " },", + " \"type\": \"RelatedPerson\"", + " },", + " \"role\": {", + " \"coding\": [", + " {", + " \"code\": \"PRN\",", + " \"display\": \"Parent\",", + " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\"", + " }", + " ]", + " }", + " }", + " ],", + " \"period\": {", + " \"end\": \"2026-02-11\",", + " \"start\": \"2025-02-11\"", + " }", + " },", + " \"extension\": [", + " {", + " \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",", + " \"valueCodeableConcept\": [", + " {", + " \"coding\": [", + " {", + " \"code\": \"TBC\",", + " \"display\": \"TBC\",", + " \"system\": \"http://terminology.hl7.org/CodeSystem/consent-reason\"", + " }", + " ]", + " }", + " ]", + " }", + " ]", + " },", + " \"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": [], 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 495234c1..8f7c0ffd 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 @@ -1,7 +1,7 @@ ConsentMultipleRelationshipsStatusActiveIncludeDetailsBundle: summary: Multiple active relationships including performer and patient details description: - A Bundle containing multiple active proxy relationships with varying legal basis' including the details + A Bundle containing multiple active proxy relationships with varying legal bases including the details of the performer and patient. value: resourceType: Bundle @@ -90,6 +90,28 @@ ConsentMultipleRelationshipsStatusActiveIncludeDetailsBundle: - identifier: system: "https://fhir.nhs.uk/Id/nhs-number" value: "9000000017" + provision: + actor: + - reference: + identifier: + system: https://fhir.nhs.uk/Id/nhs-number + value: "9000000017" + type: RelatedPerson + role: + coding: + - code: PRN + display: Parent + system: http://terminology.hl7.org/CodeSystem/v3-RoleCode + period: + end: "2026-02-11" + start: "2025-02-11" + extension: + - url: https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason + valueCodeableConcept: + - coding: + - code: TBC + display: TBC + system: http://terminology.hl7.org/CodeSystem/consent-reason search: mode: match - fullUrl: "https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/RP974720" @@ -167,12 +189,27 @@ ConsentMultipleRelationshipsStatusActiveIncludeDetailsBundle: - identifier: system: "https://fhir.nhs.uk/Id/nhs-number" value: "9000000017" - verification: - - verified: true - verifiedWith: + provision: + actor: + - reference: identifier: - system: "https://fhir.nhs.uk/Id/nhs-number" - value: "9000000005" - verificationDate: "2024-07-21T17:32:28Z" + system: https://fhir.nhs.uk/Id/nhs-number + value: "9000000017" + type: RelatedPerson + role: + coding: + - code: PRN + display: Parent + system: http://terminology.hl7.org/CodeSystem/v3-RoleCode + period: + end: "2026-02-11" + start: "2025-02-11" + extension: + - url: https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason + valueCodeableConcept: + - coding: + - code: TBC + display: TBC + system: http://terminology.hl7.org/CodeSystem/consent-reason 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 24c9e925..0b31ffb1 100644 --- a/specification/examples/responses/GET_Consent/filtered-relationships-status-inactive.yaml +++ b/specification/examples/responses/GET_Consent/filtered-relationships-status-inactive.yaml @@ -1,6 +1,6 @@ ConsentMultipleRelationshipsStatusInactiveBundle: summary: Multiple inactive relationships - description: A Bundle containing multiple inactive proxy relationships with varying legal basis' + description: A Bundle containing multiple inactive proxy relationships with varying legal basis value: resourceType: Bundle timestamp: '2020-08-26T14:00:00+00:00' @@ -33,13 +33,28 @@ ConsentMultipleRelationshipsStatusInactiveBundle: - identifier: system: 'https://fhir.nhs.uk/Id/nhs-number' value: '9000000017' - verification: - - verified: true - verifiedWith: + provision: + actor: + - reference: identifier: - system: 'https://fhir.nhs.uk/Id/nhs-number' - value: '9000000006' - verificationDate: '2024-07-21T17:32:28Z' + system: https://fhir.nhs.uk/Id/nhs-number + value: '9000000017' + type: RelatedPerson + role: + coding: + - code: PRN + display: Parent + system: http://terminology.hl7.org/CodeSystem/v3-RoleCode + period: + end: '2026-02-11' + start: '2025-02-11' + extension: + - url: https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason + valueCodeableConcept: + - coding: + - code: TBC + display: TBC + system: http://terminology.hl7.org/CodeSystem/consent-reason search: mode: match - fullUrl: https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/ABCD12B3 @@ -68,12 +83,27 @@ ConsentMultipleRelationshipsStatusInactiveBundle: - identifier: system: 'https://fhir.nhs.uk/Id/nhs-number' value: '9000000017' - verification: - - verified: true - verifiedWith: + provision: + actor: + - reference: identifier: - system: 'https://fhir.nhs.uk/Id/nhs-number' - value: '9000000007' - verificationDate: '2024-07-21T17:32:28Z' + system: https://fhir.nhs.uk/Id/nhs-number + value: '9000000017' + type: RelatedPerson + role: + coding: + - code: PRN + display: Parent + system: http://terminology.hl7.org/CodeSystem/v3-RoleCode + period: + end: '2026-02-11' + start: '2025-02-11' + extension: + - url: https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason + valueCodeableConcept: + - coding: + - code: TBC + display: TBC + system: http://terminology.hl7.org/CodeSystem/consent-reason 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 040a4bd0..0cb0ee04 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 @@ -33,6 +33,28 @@ ConsentMultipleRelationshipsStatusProposedActiveBundle: - identifier: system: 'https://fhir.nhs.uk/Id/nhs-number' value: '9000000017' + provision: + actor: + - reference: + identifier: + system: https://fhir.nhs.uk/Id/nhs-number + value: '9000000017' + type: RelatedPerson + role: + coding: + - code: PRN + display: Parent + system: http://terminology.hl7.org/CodeSystem/v3-RoleCode + period: + end: '2026-02-11' + start: '2025-02-11' + extension: + - url: https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason + valueCodeableConcept: + - coding: + - code: TBC + display: TBC + system: http://terminology.hl7.org/CodeSystem/consent-reason search: mode: match @@ -62,13 +84,29 @@ ConsentMultipleRelationshipsStatusProposedActiveBundle: - identifier: system: 'https://fhir.nhs.uk/Id/nhs-number' value: '9000000017' - verification: - - verified: true - verifiedWith: + + provision: + actor: + - reference: identifier: - system: 'https://fhir.nhs.uk/Id/nhs-number' - value: '9000000005' - verificationDate: '2024-07-21T17:32:28Z' + system: https://fhir.nhs.uk/Id/nhs-number + value: '9000000017' + type: RelatedPerson + role: + coding: + - code: PRN + display: Parent + system: http://terminology.hl7.org/CodeSystem/v3-RoleCode + period: + end: '2026-02-11' + start: '2025-02-11' + extension: + - url: https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason + valueCodeableConcept: + - coding: + - code: TBC + display: TBC + system: http://terminology.hl7.org/CodeSystem/consent-reason search: mode: match @@ -98,13 +136,28 @@ ConsentMultipleRelationshipsStatusProposedActiveBundle: - identifier: system: 'https://fhir.nhs.uk/Id/nhs-number' value: '9000000017' - verification: - - verified: true - verifiedWith: + provision: + actor: + - reference: identifier: - system: 'https://fhir.nhs.uk/Id/nhs-number' - value: '9000000020' - verificationDate: '2024-07-21T17:32:28Z' + system: https://fhir.nhs.uk/Id/nhs-number + value: '9000000017' + type: RelatedPerson + role: + coding: + - code: PRN + display: Parent + system: http://terminology.hl7.org/CodeSystem/v3-RoleCode + period: + end: '2026-02-11' + start: '2025-02-11' + extension: + - url: https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason + valueCodeableConcept: + - coding: + - code: TBC + display: TBC + system: http://terminology.hl7.org/CodeSystem/consent-reason search: mode: match @@ -134,12 +187,27 @@ ConsentMultipleRelationshipsStatusProposedActiveBundle: - identifier: system: 'https://fhir.nhs.uk/Id/nhs-number' value: '9000000017' - verification: - - verified: true - verifiedWith: + provision: + actor: + - reference: identifier: - system: 'https://fhir.nhs.uk/Id/nhs-number' - value: '9000000021' - verificationDate: '2024-07-21T17:32:28Z' + system: https://fhir.nhs.uk/Id/nhs-number + value: '9000000017' + type: RelatedPerson + role: + coding: + - code: PRN + display: Parent + system: http://terminology.hl7.org/CodeSystem/v3-RoleCode + period: + end: '2026-02-11' + start: '2025-02-11' + extension: + - url: https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason + valueCodeableConcept: + - coding: + - code: TBC + display: TBC + system: http://terminology.hl7.org/CodeSystem/consent-reason 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 1a66f625..1e395d0b 100644 --- a/specification/examples/responses/GET_Consent/multiple-relationships-include-patient.yaml +++ b/specification/examples/responses/GET_Consent/multiple-relationships-include-patient.yaml @@ -65,6 +65,28 @@ ConsentMultipleRelationshipsIncludePatientBundle: - identifier: system: 'https://fhir.nhs.uk/Id/nhs-number' value: '9000000022' + provision: + actor: + - reference: + identifier: + system: https://fhir.nhs.uk/Id/nhs-number + value: '9000000022' + type: RelatedPerson + role: + coding: + - code: PRN + display: Parent + system: http://terminology.hl7.org/CodeSystem/v3-RoleCode + period: + end: '2026-02-11' + start: '2025-02-11' + extension: + - url: https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason + valueCodeableConcept: + - coding: + - code: TBC + display: TBC + system: http://terminology.hl7.org/CodeSystem/consent-reason search: mode: match - fullUrl: https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/DFCC67F5 @@ -121,13 +143,28 @@ ConsentMultipleRelationshipsIncludePatientBundle: - identifier: system: 'https://fhir.nhs.uk/Id/nhs-number' value: '9000000022' - verification: - - verified: true - verifiedWith: + provision: + actor: + - reference: identifier: - system: 'https://fhir.nhs.uk/Id/nhs-number' - value: '9000000005' - verificationDate: '2024-07-21T17:32:28Z' + system: https://fhir.nhs.uk/Id/nhs-number + value: '9000000022' + type: RelatedPerson + role: + coding: + - code: PRN + display: Parent + system: http://terminology.hl7.org/CodeSystem/v3-RoleCode + period: + end: '2026-02-11' + start: '2025-02-11' + extension: + - url: https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason + valueCodeableConcept: + - coding: + - code: TBC + display: TBC + system: http://terminology.hl7.org/CodeSystem/consent-reason search: mode: match - fullUrl: https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/ZPTT32T3 @@ -184,13 +221,28 @@ ConsentMultipleRelationshipsIncludePatientBundle: - identifier: system: 'https://fhir.nhs.uk/Id/nhs-number' value: '9000000022' - verification: - - verified: true - verifiedWith: + provision: + actor: + - reference: identifier: - system: 'https://fhir.nhs.uk/Id/nhs-number' - value: '9000000006' - verificationDate: '2024-07-21T17:32:28Z' + system: https://fhir.nhs.uk/Id/nhs-number + value: '9000000022' + type: RelatedPerson + role: + coding: + - code: PRN + display: Parent + system: http://terminology.hl7.org/CodeSystem/v3-RoleCode + period: + end: '2026-02-11' + start: '2025-02-11' + extension: + - url: https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason + valueCodeableConcept: + - coding: + - code: TBC + display: TBC + system: http://terminology.hl7.org/CodeSystem/consent-reason 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 1bbdf068..229cb142 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 @@ -90,6 +90,28 @@ ConsentMultipleRelationshipsIncludePerformerPatientBundle: - identifier: system: 'https://fhir.nhs.uk/Id/nhs-number' value: '9000000022' + provision: + actor: + - reference: + identifier: + system: https://fhir.nhs.uk/Id/nhs-number + value: '9000000022' + type: RelatedPerson + role: + coding: + - code: PRN + display: Parent + system: http://terminology.hl7.org/CodeSystem/v3-RoleCode + period: + end: '2026-02-11' + start: '2025-02-11' + extension: + - url: https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason + valueCodeableConcept: + - coding: + - code: TBC + display: TBC + system: http://terminology.hl7.org/CodeSystem/consent-reason search: mode: match - fullUrl: https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/RP974720 @@ -168,13 +190,28 @@ ConsentMultipleRelationshipsIncludePerformerPatientBundle: - identifier: system: 'https://fhir.nhs.uk/Id/nhs-number' value: '9000000022' - verification: - - verified: true - verifiedWith: + provision: + actor: + - reference: identifier: - system: 'https://fhir.nhs.uk/Id/nhs-number' - value: '9000000005' - verificationDate: '2024-07-21T17:32:28Z' + system: https://fhir.nhs.uk/Id/nhs-number + value: '9000000022' + type: RelatedPerson + role: + coding: + - code: Personal + display: Personal + system: http://terminology.hl7.org/CodeSystem/v3-RoleCode + period: + end: '2026-02-11' + start: '2025-02-11' + extension: + - url: https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason + valueCodeableConcept: + - coding: + - code: TBC + display: TBC + system: http://terminology.hl7.org/CodeSystem/consent-reason search: mode: match - fullUrl: https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/AATD11A1 @@ -253,12 +290,27 @@ ConsentMultipleRelationshipsIncludePerformerPatientBundle: - identifier: system: 'https://fhir.nhs.uk/Id/nhs-number' value: '9000000022' - verification: - - verified: true - verifiedWith: + provision: + actor: + - reference: identifier: - system: 'https://fhir.nhs.uk/Id/nhs-number' - value: '9000000006' - verificationDate: '2024-07-21T17:32:28Z' + system: https://fhir.nhs.uk/Id/nhs-number + value: '9000000022' + type: RelatedPerson + role: + coding: + - code: Personal + display: Personal + system: http://terminology.hl7.org/CodeSystem/v3-RoleCode + period: + end: '2026-02-11' + start: '2025-02-11' + extension: + - url: https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason + valueCodeableConcept: + - coding: + - code: TBC + display: TBC + system: http://terminology.hl7.org/CodeSystem/consent-reason 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 ad86c10b..848542fc 100644 --- a/specification/examples/responses/GET_Consent/multiple-relationships-include-performer.yaml +++ b/specification/examples/responses/GET_Consent/multiple-relationships-include-performer.yaml @@ -60,6 +60,28 @@ ConsentMultipleRelationshipsIncludePerformerBundle: - identifier: system: 'https://fhir.nhs.uk/Id/nhs-number' value: '9000000022' + provision: + actor: + - reference: + identifier: + system: https://fhir.nhs.uk/Id/nhs-number + value: '9000000022' + type: RelatedPerson + role: + coding: + - code: PRN + display: Parent + system: http://terminology.hl7.org/CodeSystem/v3-RoleCode + period: + end: '2026-02-11' + start: '2025-02-11' + extension: + - url: https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason + valueCodeableConcept: + - coding: + - code: TBC + display: TBC + system: http://terminology.hl7.org/CodeSystem/consent-reason search: mode: match - fullUrl: >- @@ -112,13 +134,28 @@ ConsentMultipleRelationshipsIncludePerformerBundle: - identifier: system: 'https://fhir.nhs.uk/Id/nhs-number' value: '9000000022' - verification: - - verified: true - verifiedWith: + provision: + actor: + - reference: identifier: - system: 'https://fhir.nhs.uk/Id/nhs-number' - value: '9000000005' - verificationDate: '2024-07-21T17:32:28Z' + system: https://fhir.nhs.uk/Id/nhs-number + value: '9000000022' + type: RelatedPerson + role: + coding: + - code: Personal + display: Personal + system: http://terminology.hl7.org/CodeSystem/v3-RoleCode + period: + end: '2026-02-11' + start: '2025-02-11' + extension: + - url: https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason + valueCodeableConcept: + - coding: + - code: TBC + display: TBC + system: http://terminology.hl7.org/CodeSystem/consent-reason search: mode: match - fullUrl: >- @@ -171,13 +208,28 @@ ConsentMultipleRelationshipsIncludePerformerBundle: - identifier: system: 'https://fhir.nhs.uk/Id/nhs-number' value: '9000000022' - verification: - - verified: true - verifiedWith: + provision: + actor: + - reference: identifier: - system: 'https://fhir.nhs.uk/Id/nhs-number' - value: '9000000006' - verificationDate: '2024-07-21T17:32:28Z' + system: https://fhir.nhs.uk/Id/nhs-number + value: '9000000022' + type: RelatedPerson + role: + coding: + - code: Personal + display: Personal + system: http://terminology.hl7.org/CodeSystem/v3-RoleCode + period: + end: '2026-02-11' + start: '2025-02-11' + extension: + - url: https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason + valueCodeableConcept: + - coding: + - code: TBC + display: TBC + system: http://terminology.hl7.org/CodeSystem/consent-reason 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 c38620f8..e3ce4760 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 @@ -61,6 +61,28 @@ ConsentMultipleRelationshipsSinglePatientIncludePatientBundle: - identifier: system: 'https://fhir.nhs.uk/Id/nhs-number' value: '9000000020' + provision: + actor: + - reference: + identifier: + system: https://fhir.nhs.uk/Id/nhs-number + value: '9000000020' + type: RelatedPerson + role: + coding: + - code: CHILD + display: Child + system: http://terminology.hl7.org/CodeSystem/v3-RoleCode + period: + end: '2026-02-11' + start: '2025-02-11' + extension: + - url: https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason + valueCodeableConcept: + - coding: + - code: TBC + display: TBC + system: http://terminology.hl7.org/CodeSystem/consent-reason search: mode: match - fullUrl: https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/WWCC67T1 @@ -89,13 +111,28 @@ ConsentMultipleRelationshipsSinglePatientIncludePatientBundle: - identifier: system: 'https://fhir.nhs.uk/Id/nhs-number' value: '9000000021' - verification: - - verified: true - verifiedWith: + provision: + actor: + - reference: identifier: - system: 'https://fhir.nhs.uk/Id/nhs-number' + system: https://fhir.nhs.uk/Id/nhs-number value: '9000000021' - verificationDate: '2024-07-21T17:32:28Z' + type: RelatedPerson + role: + coding: + - code: GUARD + display: Guardian + system: http://terminology.hl7.org/CodeSystem/v3-RoleCode + period: + end: '2026-02-11' + start: '2025-02-11' + extension: + - url: https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason + valueCodeableConcept: + - coding: + - code: TBC + display: TBC + system: http://terminology.hl7.org/CodeSystem/consent-reason search: mode: match - fullUrl: https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/AATD11A1 @@ -124,12 +161,27 @@ ConsentMultipleRelationshipsSinglePatientIncludePatientBundle: - identifier: system: 'https://fhir.nhs.uk/Id/nhs-number' value: '9000000022' - verification: - - verified: true - verifiedWith: + provision: + actor: + - reference: identifier: - system: 'https://fhir.nhs.uk/Id/nhs-number' + system: https://fhir.nhs.uk/Id/nhs-number value: '9000000022' - verificationDate: '2024-07-21T17:32:28Z' + type: RelatedPerson + role: + coding: + - code: PRN + display: Parent + system: http://terminology.hl7.org/CodeSystem/v3-RoleCode + period: + end: '2026-02-11' + start: '2025-02-11' + extension: + - url: https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason + valueCodeableConcept: + - coding: + - code: TBC + display: TBC + system: http://terminology.hl7.org/CodeSystem/consent-reason 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 d418b01a..32f08805 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 @@ -85,6 +85,28 @@ ConsentMultipleRelationshipsSinglePatientIncludePerformerPatientBundle: - identifier: system: 'https://fhir.nhs.uk/Id/nhs-number' value: '9000000020' + provision: + actor: + - reference: + identifier: + system: https://fhir.nhs.uk/Id/nhs-number + value: '9000000020' + type: RelatedPerson + role: + coding: + - code: CHILD + display: Child + system: http://terminology.hl7.org/CodeSystem/v3-RoleCode + period: + end: '2026-02-11' + start: '2025-02-11' + extension: + - url: https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason + valueCodeableConcept: + - coding: + - code: TBC + display: TBC + system: http://terminology.hl7.org/CodeSystem/consent-reason search: mode: match - fullUrl: https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/BE974742 @@ -134,13 +156,28 @@ ConsentMultipleRelationshipsSinglePatientIncludePerformerPatientBundle: - identifier: system: 'https://fhir.nhs.uk/Id/nhs-number' value: '9000000021' - verification: - - verified: true - verifiedWith: + provision: + actor: + - reference: identifier: - system: 'https://fhir.nhs.uk/Id/nhs-number' + system: https://fhir.nhs.uk/Id/nhs-number value: '9000000021' - verificationDate: '2024-07-21T17:32:28Z' + type: RelatedPerson + role: + coding: + - code: GUARD + display: Guardian + system: http://terminology.hl7.org/CodeSystem/v3-RoleCode + period: + end: '2026-02-11' + start: '2025-02-11' + extension: + - url: https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason + valueCodeableConcept: + - coding: + - code: TBC + display: TBC + system: http://terminology.hl7.org/CodeSystem/consent-reason search: mode: match - fullUrl: https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/BE974742 @@ -190,12 +227,27 @@ ConsentMultipleRelationshipsSinglePatientIncludePerformerPatientBundle: - identifier: system: 'https://fhir.nhs.uk/Id/nhs-number' value: '9000000022' - verification: - - verified: true - verifiedWith: + provision: + actor: + - reference: identifier: - system: 'https://fhir.nhs.uk/Id/nhs-number' + system: https://fhir.nhs.uk/Id/nhs-number value: '9000000022' - verificationDate: '2024-07-21T17:32:28Z' + type: RelatedPerson + role: + coding: + - code: PRN + display: Parent + system: http://terminology.hl7.org/CodeSystem/v3-RoleCode + period: + end: '2026-02-11' + start: '2025-02-11' + extension: + - url: https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason + valueCodeableConcept: + - coding: + - code: TBC + display: TBC + system: http://terminology.hl7.org/CodeSystem/consent-reason 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 66629777..18483602 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 @@ -57,6 +57,28 @@ ConsentMultipleRelationshipsSinglePatientIncludePerformerPatientBundle: - identifier: system: 'https://fhir.nhs.uk/Id/nhs-number' value: '9000000020' + provision: + actor: + - reference: + identifier: + system: https://fhir.nhs.uk/Id/nhs-number + value: '9000000020' + type: RelatedPerson + role: + coding: + - code: CHILD + display: Child + system: http://terminology.hl7.org/CodeSystem/v3-RoleCode + period: + end: '2026-02-11' + start: '2025-02-11' + extension: + - url: https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason + valueCodeableConcept: + - coding: + - code: TBC + display: TBC + system: http://terminology.hl7.org/CodeSystem/consent-reason search: mode: match - fullUrl: https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/BE974742 @@ -106,13 +128,28 @@ ConsentMultipleRelationshipsSinglePatientIncludePerformerPatientBundle: - identifier: system: 'https://fhir.nhs.uk/Id/nhs-number' value: '9000000021' - verification: - - verified: true - verifiedWith: + provision: + actor: + - reference: identifier: - system: 'https://fhir.nhs.uk/Id/nhs-number' + system: https://fhir.nhs.uk/Id/nhs-number value: '9000000021' - verificationDate: '2024-07-21T17:32:28Z' + type: RelatedPerson + role: + coding: + - code: GUARD + display: Guardian + system: http://terminology.hl7.org/CodeSystem/v3-RoleCode + period: + end: '2026-02-11' + start: '2025-02-11' + extension: + - url: https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason + valueCodeableConcept: + - coding: + - code: TBC + display: TBC + system: http://terminology.hl7.org/CodeSystem/consent-reason search: mode: match - fullUrl: https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/BE974742 @@ -162,12 +199,27 @@ ConsentMultipleRelationshipsSinglePatientIncludePerformerPatientBundle: - identifier: system: 'https://fhir.nhs.uk/Id/nhs-number' value: '9000000022' - verification: - - verified: true - verifiedWith: + provision: + actor: + - reference: identifier: - system: 'https://fhir.nhs.uk/Id/nhs-number' + system: https://fhir.nhs.uk/Id/nhs-number value: '9000000022' - verificationDate: '2024-07-21T17:32:28Z' + type: RelatedPerson + role: + coding: + - code: PRN + display: Parent + system: http://terminology.hl7.org/CodeSystem/v3-RoleCode + period: + end: '2026-02-11' + start: '2025-02-11' + extension: + - url: https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason + valueCodeableConcept: + - coding: + - code: TBC + display: TBC + system: http://terminology.hl7.org/CodeSystem/consent-reason 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 ed5b208c..30f2b133 100644 --- a/specification/examples/responses/GET_Consent/multiple-relationships-single-patient.yaml +++ b/specification/examples/responses/GET_Consent/multiple-relationships-single-patient.yaml @@ -33,6 +33,28 @@ ConsentMultipleRelationshipsSinglePatientBundle: - identifier: system: 'https://fhir.nhs.uk/Id/nhs-number' value: '9000000020' + provision: + actor: + - reference: + identifier: + system: https://fhir.nhs.uk/Id/nhs-number + value: '9000000020' + type: RelatedPerson + role: + coding: + - code: PRN + display: Parent + system: http://terminology.hl7.org/CodeSystem/v3-RoleCode + period: + end: '2026-02-11' + start: '2025-02-11' + extension: + - url: https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason + valueCodeableConcept: + - coding: + - code: TBC + display: TBC + system: http://terminology.hl7.org/CodeSystem/consent-reason search: mode: match - fullUrl: https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/WWCC67T1 @@ -61,13 +83,28 @@ ConsentMultipleRelationshipsSinglePatientBundle: - identifier: system: 'https://fhir.nhs.uk/Id/nhs-number' value: '9000000021' - verification: - - verified: true - verifiedWith: + provision: + actor: + - reference: identifier: - system: 'https://fhir.nhs.uk/Id/nhs-number' - value: '9000000005' - verificationDate: '2024-07-21T17:32:28Z' + system: https://fhir.nhs.uk/Id/nhs-number + value: '9000000021' + type: RelatedPerson + role: + coding: + - code: GUARD + display: Guardian + system: http://terminology.hl7.org/CodeSystem/v3-RoleCode + period: + end: '2026-02-11' + start: '2025-02-11' + extension: + - url: https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason + valueCodeableConcept: + - coding: + - code: TBC + display: TBC + system: http://terminology.hl7.org/CodeSystem/consent-reason search: mode: match - fullUrl: https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/AATD11A1 @@ -96,12 +133,27 @@ ConsentMultipleRelationshipsSinglePatientBundle: - identifier: system: 'https://fhir.nhs.uk/Id/nhs-number' value: '9000000022' - verification: - - verified: true - verifiedWith: + provision: + actor: + - reference: identifier: - system: 'https://fhir.nhs.uk/Id/nhs-number' - value: '9000000006' - verificationDate: '2024-07-21T17:32:28Z' + system: https://fhir.nhs.uk/Id/nhs-number + value: '9000000022' + type: RelatedPerson + role: + coding: + - code: CHILD + display: Child + system: http://terminology.hl7.org/CodeSystem/v3-RoleCode + period: + end: '2026-02-11' + start: '2025-02-11' + extension: + - url: https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason + valueCodeableConcept: + - coding: + - code: TBC + display: TBC + system: http://terminology.hl7.org/CodeSystem/consent-reason search: mode: match diff --git a/specification/examples/responses/GET_Consent/multiple-relationships.yaml b/specification/examples/responses/GET_Consent/multiple-relationships.yaml index 05c9e308..d7695d9b 100644 --- a/specification/examples/responses/GET_Consent/multiple-relationships.yaml +++ b/specification/examples/responses/GET_Consent/multiple-relationships.yaml @@ -33,6 +33,28 @@ ConsentMultipleRelationshipsBundle: - identifier: system: 'https://fhir.nhs.uk/Id/nhs-number' value: '9000000022' + provision: + actor: + - reference: + identifier: + system: https://fhir.nhs.uk/Id/nhs-number + value: '9000000022' + type: RelatedPerson + role: + coding: + - code: PRN + display: Parent + system: http://terminology.hl7.org/CodeSystem/v3-RoleCode + period: + end: '2026-02-11' + start: '2025-02-11' + extension: + - url: https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason + valueCodeableConcept: + - coding: + - code: TBC + display: TBC + system: http://terminology.hl7.org/CodeSystem/consent-reason search: mode: match - fullUrl: https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/WWCC67T1 @@ -61,13 +83,28 @@ ConsentMultipleRelationshipsBundle: - identifier: system: 'https://fhir.nhs.uk/Id/nhs-number' value: '9000000022' - verification: - - verified: true - verifiedWith: + provision: + actor: + - reference: identifier: - system: 'https://fhir.nhs.uk/Id/nhs-number' - value: '9000000005' - verificationDate: '2024-07-21T17:32:28Z' + system: https://fhir.nhs.uk/Id/nhs-number + value: '9000000022' + type: RelatedPerson + role: + coding: + - code: PRN + display: Parent + system: http://terminology.hl7.org/CodeSystem/v3-RoleCode + period: + end: '2026-02-11' + start: '2025-02-11' + extension: + - url: https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason + valueCodeableConcept: + - coding: + - code: TBC + display: TBC + system: http://terminology.hl7.org/CodeSystem/consent-reason search: mode: match - fullUrl: https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/AATD11A1 @@ -96,12 +133,27 @@ ConsentMultipleRelationshipsBundle: - identifier: system: 'https://fhir.nhs.uk/Id/nhs-number' value: '9000000022' - verification: - - verified: true - verifiedWith: + provision: + actor: + - reference: identifier: - system: 'https://fhir.nhs.uk/Id/nhs-number' - value: '9000000006' - verificationDate: '2024-07-21T17:32:28Z' + system: https://fhir.nhs.uk/Id/nhs-number + value: '9000000022' + type: RelatedPerson + role: + coding: + - code: PRN + display: Parent + system: http://terminology.hl7.org/CodeSystem/v3-RoleCode + period: + end: '2026-02-11' + start: '2025-02-11' + extension: + - url: https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason + valueCodeableConcept: + - coding: + - code: TBC + display: TBC + system: http://terminology.hl7.org/CodeSystem/consent-reason 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 a200a15d..9fbb50fc 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 @@ -62,12 +62,5 @@ ConsentSingleConsentingAdultRelationshipIncludePatientBundle: - identifier: system: 'https://fhir.nhs.uk/Id/nhs-number' value: '9000000010' - verification: - - verified: true - verifiedWith: - identifier: - system: 'https://fhir.nhs.uk/Id/nhs-number' - value: '9000000005' - verificationDate: '2024-07-21T17:32:28Z' 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 7a15de9d..bacf8136 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 @@ -85,12 +85,27 @@ ConsentSingleConsentingAdultRelationshipIncludePerformerPatientBundle: - identifier: system: 'https://fhir.nhs.uk/Id/nhs-number' value: '9000000010' - verification: - - verified: true - verifiedWith: + provision: + actor: + - reference: identifier: - system: 'https://fhir.nhs.uk/Id/nhs-number' - value: '9000000005' - verificationDate: '2024-07-21T17:32:28Z' + system: https://fhir.nhs.uk/Id/nhs-number + value: '9000000010' + type: RelatedPerson + role: + coding: + - code: PRN + display: Parent + system: http://terminology.hl7.org/CodeSystem/v3-RoleCode + period: + end: '2026-02-11' + start: '2025-02-11' + extension: + - url: https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason + valueCodeableConcept: + - coding: + - code: TBC + display: TBC + system: http://terminology.hl7.org/CodeSystem/consent-reason 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 22f43dc5..cbdc101b 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 @@ -56,12 +56,5 @@ ConsentSingleConsentingAdultRelationshipIncludePerformerBundle: - identifier: system: 'https://fhir.nhs.uk/Id/nhs-number' value: '9000000010' - verification: - - verified: true - verifiedWith: - identifier: - system: 'https://fhir.nhs.uk/Id/nhs-number' - value: '9000000005' - verificationDate: '2024-07-21T17:32:28Z' 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 97ea6c7c..b29cd0d1 100644 --- a/specification/examples/responses/GET_Consent/single-consenting-adult-relationship.yaml +++ b/specification/examples/responses/GET_Consent/single-consenting-adult-relationship.yaml @@ -33,12 +33,27 @@ ConsentSingleConsentingAdultRelationshipBundle: - identifier: system: 'https://fhir.nhs.uk/Id/nhs-number' value: '9000000010' - verification: - - verified: true - verifiedWith: + provision: + actor: + - reference: identifier: - system: 'https://fhir.nhs.uk/Id/nhs-number' - value: '9000000005' - verificationDate: '2024-07-21T17:32:28Z' + system: https://fhir.nhs.uk/Id/nhs-number + value: '9000000010' + type: RelatedPerson + role: + coding: + - code: GUARD + display: Guardian + system: http://terminology.hl7.org/CodeSystem/v3-RoleCode + period: + end: '2026-02-11' + start: '2025-02-11' + extension: + - url: https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason + valueCodeableConcept: + - coding: + - code: TBC + display: TBC + system: http://terminology.hl7.org/CodeSystem/consent-reason 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 1fd91025..2a14bb11 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 @@ -90,5 +90,27 @@ ConsentSingleAdultChildRelationshipIncludePerformerPatientBundle: - 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' + type: RelatedPerson + role: + coding: + - code: PRN + display: Parent + system: http://terminology.hl7.org/CodeSystem/v3-RoleCode + period: + end: '2026-02-11' + start: '2025-02-11' + extension: + - url: https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason + valueCodeableConcept: + - coding: + - code: TBC + display: TBC + system: http://terminology.hl7.org/CodeSystem/consent-reason 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 c4dcbb93..5f3aa7e1 100644 --- a/specification/examples/responses/GET_Consent/single-mother-child-relationship.yaml +++ b/specification/examples/responses/GET_Consent/single-mother-child-relationship.yaml @@ -33,5 +33,27 @@ ConsentSingleAdultChildRelationshipBundle: - 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' + type: RelatedPerson + role: + coding: + - code: PRN + display: Parent + system: http://terminology.hl7.org/CodeSystem/v3-RoleCode + period: + end: '2026-02-11' + start: '2025-02-11' + extension: + - url: https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason + valueCodeableConcept: + - coding: + - code: TBC + display: TBC + system: http://terminology.hl7.org/CodeSystem/consent-reason search: mode: match diff --git a/specification/validated-relationships-service-api.yaml b/specification/validated-relationships-service-api.yaml index c97c0c1c..cf758f7e 100644 --- a/specification/validated-relationships-service-api.yaml +++ b/specification/validated-relationships-service-api.yaml @@ -126,7 +126,7 @@ info: * only covers a limited set of scenarios * is open access, so does not allow you to test authorisation - [Run In Postman](https://god.gw.postman.com/run-collection/34042403-4442b3f9-8d89-4aae-a5a9-8a5eda755ead?action=collection%2Ffork&source=rip_markdown&collection-url=entityId%3D34042403-4442b3f9-8d89-4aae-a5a9-8a5eda755ead%26entityType%3Dcollection%26workspaceId%3D14593107-f7bc-4334-8749-648b96205c76) + [Run In Postman](https://app.getpostman.com/run-collection/45653607-8a3d3121-ca56-4ac8-9d14-cd375ee158fc?action=collection%2Ffork&source=rip_markdown&collection-url=entityId%3D45653607-8a3d3121-ca56-4ac8-9d14-cd375ee158fc%26entityType%3Dcollection%26workspaceId%3Db7b0feaf-e9be-4780-8e09-d82c6f42138c) ### Integration testing