diff --git a/postman/Validate Relationship Service Sandbox.postman_collection.json b/postman/Validate Relationship Service Sandbox.postman_collection.json index 6844b7b0..cf5cab56 100644 --- a/postman/Validate Relationship Service Sandbox.postman_collection.json +++ b/postman/Validate Relationship Service Sandbox.postman_collection.json @@ -1,11 +1,10 @@ { "info": { - "_postman_id": "a5dcb0b1-ad72-4665-942e-2041cc61e26d", - "name": "Validate Relationship Service Sandbox 01/05/25", + "_postman_id": "6d920a18-f5fd-4ab5-8529-f32c1d8edfd4", + "name": "Validate Relationship Service Sandbox 02/05/25", "description": "Example usage of the Validate Relationship Service (VRS) sandbox.\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/workspace/validate-relationship-service-sandbox-01-05-25/collection/34042403-a5dcb0b1-ad72-4665-942e-2041cc61e26d?action=share&source=collection_link&creator=34042403" + "_exporter_id": "44536620" }, "item": [ { @@ -3782,6 +3781,1011 @@ }, "response": [] }, + { + "name": "Multiple proxy relationships single patient include performer and patient", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"resourceType\": \"Bundle\",", + " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", + " \"total\": 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\"", + " }", + " }", + " ]", + " },", + " \"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\"", + " }", + " ],", + " \"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\"", + " }", + " },", + " \"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\"", + " }", + " ],", + " \"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\": \"9000000022\"", + " }", + " },", + " \"verificationDate\": \"2024-07-21T17:32:28Z\"", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " }", + " ]", + "}", + "", + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " const responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{api_base_url}}/Consent?patient:identifier=9000000100&_include=Consent:performer&_include=Consent:patient", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "patient:identifier", + "value": "9000000100" + }, + { + "key": "_include", + "value": "Consent:performer" + }, + { + "key": "_include", + "value": "Consent:patient" + } + ] + } + }, + "response": [] + }, + { + "name": "Multiple proxy relationships single patient include performer", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"resourceType\": \"Bundle\",", + " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", + " \"total\": 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\"", + " }", + " }", + " ]", + " },", + " \"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\"", + " }", + " ],", + " \"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\"", + " }", + " },", + " \"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\"", + " }", + " ],", + " \"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\": \"9000000022\"", + " }", + " },", + " \"verificationDate\": \"2024-07-21T17:32:28Z\"", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " }", + " ]", + "}", + "", + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " const responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{api_base_url}}/Consent?patient:identifier=9000000100&_include=Consent:performer", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "patient:identifier", + "value": "9000000100" + }, + { + "key": "_include", + "value": "Consent:performer" + } + ] + } + }, + "response": [] + }, + { + "name": "Multiple proxy relationships single patient include patient", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const expectedResponseBody = {", + " \"resourceType\": \"Bundle\",", + " \"timestamp\": \"2020-08-26T14:00:00+00:00\",", + " \"total\": 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\"", + " }", + " }", + " ]", + " },", + " \"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\"", + " }", + " ],", + " \"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\"", + " }", + " },", + " \"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\"", + " }", + " ],", + " \"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\": \"9000000022\"", + " }", + " },", + " \"verificationDate\": \"2024-07-21T17:32:28Z\"", + " }", + " ]", + " },", + " \"search\": {", + " \"mode\": \"match\"", + " }", + " }", + " ]", + "}", + "", + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Should have correct response body\", () => {", + " const responseJson = pm.response.json();", + " pm.expect(responseJson).to.eql(expectedResponseBody);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{api_base_url}}/Consent?patient:identifier=9000000100&_include=Consent:patient", + "host": [ + "{{api_base_url}}" + ], + "path": [ + "Consent" + ], + "query": [ + { + "key": "patient:identifier", + "value": "9000000100" + }, + { + "key": "_include", + "value": "Consent:patient" + } + ] + } + }, + "response": [] + }, { "name": "No relationships", "event": [ diff --git a/specification/validated-relationships-service-api.yaml b/specification/validated-relationships-service-api.yaml index 4ac3c86e..14103ba0 100644 --- a/specification/validated-relationships-service-api.yaml +++ b/specification/validated-relationships-service-api.yaml @@ -123,7 +123,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-a5dcb0b1-ad72-4665-942e-2041cc61e26d?action=collection%2Ffork&source=rip_markdown&collection-url=entityId%3D34042403-a5dcb0b1-ad72-4665-942e-2041cc61e26d%26entityType%3Dcollection%26workspaceId%3D2b506821-e36b-4d34-838f-d7f136053ba6) + [Run In Postman](https://god.gw.postman.com/run-collection/44536620-6d920a18-f5fd-4ab5-8529-f32c1d8edfd4?action=collection%2Ffork&source=rip_markdown&collection-url=entityId%3D44536620-6d920a18-f5fd-4ab5-8529-f32c1d8edfd4%26entityType%3Dcollection%26workspaceId%3D9dd1ec4b-294c-4bdb-bb88-499823c7282d) ### Integration testing