From 12d94efb6686c0382acf5413ef3b083906f14bbd Mon Sep 17 00:00:00 2001 From: samdasari11 Date: Mon, 27 Apr 2026 13:33:07 +0000 Subject: [PATCH 1/7] Integration Environmet added --- bruno/APIM/environments/INTEGRATION.bru | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 bruno/APIM/environments/INTEGRATION.bru diff --git a/bruno/APIM/environments/INTEGRATION.bru b/bruno/APIM/environments/INTEGRATION.bru new file mode 100644 index 0000000..0fff3e2 --- /dev/null +++ b/bruno/APIM/environments/INTEGRATION.bru @@ -0,0 +1,6 @@ +vars:secret [ + PRIVATE_KEY_PATH, + KID, + PR_NUMBER, + JWT_SECRET +] From ad9147875e15c555cf50bf8d42abcdb3c950cb86 Mon Sep 17 00:00:00 2001 From: samdasari11 Date: Mon, 27 Apr 2026 13:59:53 +0000 Subject: [PATCH 2/7] Bruno Tests added --- bruno/collection.bru | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 bruno/collection.bru diff --git a/bruno/collection.bru b/bruno/collection.bru new file mode 100644 index 0000000..1b0729d --- /dev/null +++ b/bruno/collection.bru @@ -0,0 +1,3 @@ +meta { + name: bruno +} From 79b126a13c316215fbd379d9c459115e225c3584 Mon Sep 17 00:00:00 2001 From: samdasari11 Date: Mon, 27 Apr 2026 14:26:49 +0000 Subject: [PATCH 3/7] Bruno tests on Integration environment added --- .../Test_Document_Bundle_via_APIM_IntEnvi.bru | 473 ++++++++++++++++++ ...ogy_Api_Unable_To_Authenticate_IntEnvi.bru | 83 +++ ...athology_Api_Unable_To_Authorize_Event.bru | 2 +- ..._Api_Unable_To_Authorize_Event_IntEnvi.bru | 83 +++ ...S_Service_Experience_Bad_Gateway_Error.bru | 2 +- ...e_Experience_Bad_Gateway_Error_IntEnvi.bru | 83 +++ ...rvice_Experience_Gateway_Timeout_Error.bru | 2 +- ...perience_Gateway_Timeout_Error_IntEnvi.bru | 83 +++ ...NS_Service_Experience_Validation_Error.bru | 2 +- ...ce_Experience_Validation_Error_IntEnvi.bru | 83 +++ ..._MNS_Service_Returns_Client_Side_Error.bru | 2 +- ...vice_Returns_Client_Side_Error_IntEnvi.bru | 83 +++ bruno/APIM/Test_PDM_Api_Server_Error.bru | 2 +- .../Test_PDM_Api_Server_Error_IntEnvi.bru | 96 ++++ bruno/APIM/Test_PDM_Api_Validation_Error.bru | 2 +- .../Test_PDM_Bundle_Succesful_Response.bru | 2 +- ..._PDM_Bundle_Succesful_Response_IntEnvi.bru | 473 ++++++++++++++++++ .../Test_With_Incorrect_ReferenceType.bru | 2 +- ...t_With_Incorrect_ReferenceType_IntEnvi.bru | 84 ++++ ...h_Incorrect_ReferenceType_in_Extension.bru | 2 +- ...ect_ReferenceType_in_Extension_IntEnvi.bru | 84 ++++ ...th_Invalid_Identifiers_in_Organization.bru | 2 +- ...id_Identifiers_in_Organization_IntEnvi.bru | 84 ++++ ..._Multiple_Bundle_Entries_With_Same_URL.bru | 2 +- ...e_Bundle_Entries_With_Same_URL_IntEnvi.bru | 105 ++++ ...ltiple_Identifiers_For_An_Organisation.bru | 2 +- ...dentifiers_For_An_Organisation_IntEnvi.bru | 88 ++++ bruno/APIM/Test_Without_Composition.bru | 2 +- .../APIM/Test_Without_Composition_IntEnvi.bru | 64 +++ ...est_Without_Extension_URL_is_incorrect.bru | 2 +- ...out_Extension_URL_is_incorrect_IntEnvi.bru | 84 ++++ .../Test_Without_Extension_in_Composition.bru | 2 +- ...thout_Extension_in_Composition_IntEnvi.bru | 76 +++ bruno/APIM/Test_Without_Organization.bru | 2 +- .../Test_Without_Organization_Identifier.bru | 2 +- ...ithout_Organization_Identifier_IntEnvi.bru | 78 +++ ..._Without_Organization_Identifier_Value.bru | 2 +- ..._Organization_Identifier_Value_IntEnvi.bru | 83 +++ .../Test_Without_Organization_IntEnvi.bru | 72 +++ ...st_Without_Organization_Invalid_System.bru | 2 +- ...ut_Organization_Invalid_System_IntEnvi.bru | 84 ++++ ...est_Without_Organization_Invalid_Value.bru | 2 +- ...out_Organization_Invalid_Value_IntEnvi.bru | 84 ++++ .../APIM/Test_Without_Organization_System.bru | 2 +- ...st_Without_Organization_System_IntEnvi.bru | 78 +++ bruno/APIM/Test_Without_PractionerRole.bru | 2 +- .../Test_Without_PractionerRole_IntEnvi.bru | 75 +++ ..._On_ServiceRequest_Requester_Reference.bru | 2 +- ...iceRequest_Requester_Reference_IntEnvi.bru | 75 +++ .../Test_Without_PractionerRole_Reference.bru | 2 +- ...thout_PractionerRole_Reference_IntEnvi.bru | 84 ++++ ...Without_PractionerRole_Reference_Value.bru | 2 +- ...PractionerRole_Reference_Value_IntEnvi.bru | 83 +++ .../Test_Without_Reference_in_Extension.bru | 2 +- ...Without_Reference_in_Extension_IntEnvi.bru | 76 +++ .../Test_Without_ServiceRequest_IntEnvi.bru | 75 +++ .../Test_Without_ServiceRequest_Requester.bru | 2 +- ...thout_ServiceRequest_Requester_IntEnvi.bru | 81 +++ ...out_ServiceRequest_Requester_Reference.bru | 2 +- ...iceRequest_Requester_Reference_IntEnvi.bru | 81 +++ .../Test_Without_ServiceRequest_Resource.bru | 2 +- ...ithout_ServiceRequest_Resource_IntEnvi.bru | 75 +++ bruno/collection.bru | 3 - 63 files changed, 3423 insertions(+), 33 deletions(-) create mode 100644 bruno/APIM/Test_Document_Bundle_via_APIM_IntEnvi.bru create mode 100644 bruno/APIM/Test_MNS_Pathology_Api_Unable_To_Authenticate_IntEnvi.bru create mode 100644 bruno/APIM/Test_MNS_Pathology_Api_Unable_To_Authorize_Event_IntEnvi.bru create mode 100644 bruno/APIM/Test_MNS_Service_Experience_Bad_Gateway_Error_IntEnvi.bru create mode 100644 bruno/APIM/Test_MNS_Service_Experience_Gateway_Timeout_Error_IntEnvi.bru create mode 100644 bruno/APIM/Test_MNS_Service_Experience_Validation_Error_IntEnvi.bru create mode 100644 bruno/APIM/Test_MNS_Service_Returns_Client_Side_Error_IntEnvi.bru create mode 100644 bruno/APIM/Test_PDM_Api_Server_Error_IntEnvi.bru create mode 100644 bruno/APIM/Test_PDM_Bundle_Succesful_Response_IntEnvi.bru create mode 100644 bruno/APIM/Test_With_Incorrect_ReferenceType_IntEnvi.bru create mode 100644 bruno/APIM/Test_With_Incorrect_ReferenceType_in_Extension_IntEnvi.bru create mode 100644 bruno/APIM/Test_With_Invalid_Identifiers_in_Organization_IntEnvi.bru create mode 100644 bruno/APIM/Test_With_Multiple_Bundle_Entries_With_Same_URL_IntEnvi.bru create mode 100644 bruno/APIM/Test_With_Multiple_Identifiers_For_An_Organisation_IntEnvi.bru create mode 100644 bruno/APIM/Test_Without_Composition_IntEnvi.bru create mode 100644 bruno/APIM/Test_Without_Extension_URL_is_incorrect_IntEnvi.bru create mode 100644 bruno/APIM/Test_Without_Extension_in_Composition_IntEnvi.bru create mode 100644 bruno/APIM/Test_Without_Organization_Identifier_IntEnvi.bru create mode 100644 bruno/APIM/Test_Without_Organization_Identifier_Value_IntEnvi.bru create mode 100644 bruno/APIM/Test_Without_Organization_IntEnvi.bru create mode 100644 bruno/APIM/Test_Without_Organization_Invalid_System_IntEnvi.bru create mode 100644 bruno/APIM/Test_Without_Organization_Invalid_Value_IntEnvi.bru create mode 100644 bruno/APIM/Test_Without_Organization_System_IntEnvi.bru create mode 100644 bruno/APIM/Test_Without_PractionerRole_IntEnvi.bru create mode 100644 bruno/APIM/Test_Without_PractionerRole_On_ServiceRequest_Requester_Reference_IntEnvi.bru create mode 100644 bruno/APIM/Test_Without_PractionerRole_Reference_IntEnvi.bru create mode 100644 bruno/APIM/Test_Without_PractionerRole_Reference_Value_IntEnvi.bru create mode 100644 bruno/APIM/Test_Without_Reference_in_Extension_IntEnvi.bru create mode 100644 bruno/APIM/Test_Without_ServiceRequest_IntEnvi.bru create mode 100644 bruno/APIM/Test_Without_ServiceRequest_Requester_IntEnvi.bru create mode 100644 bruno/APIM/Test_Without_ServiceRequest_Requester_Reference_IntEnvi.bru create mode 100644 bruno/APIM/Test_Without_ServiceRequest_Resource_IntEnvi.bru delete mode 100644 bruno/collection.bru diff --git a/bruno/APIM/Test_Document_Bundle_via_APIM_IntEnvi.bru b/bruno/APIM/Test_Document_Bundle_via_APIM_IntEnvi.bru new file mode 100644 index 0000000..93016b9 --- /dev/null +++ b/bruno/APIM/Test_Document_Bundle_via_APIM_IntEnvi.bru @@ -0,0 +1,473 @@ +meta { + name: Test_Document_Bundle_via_APIM_IntEnvi + type: http + seq: 36 +} + +post { + url: https://int.api.service.nhs.uk/pathology-laboratory-reporting/FHIR/R4/Bundle + body: json + auth: inherit +} + +headers { + Content-Type: application/fhir+json +} + +body:json { + { + "resourceType": "Bundle", + "identifier": { + "system": "https://tools.ietf.org/html/rfc4122", + "value": "1f859037-2942-4117-884a-f51b62db5a52" + }, + "type": "document", + "timestamp": "2022-03-08T12:09:00+00:00", + "entry": [ + { + "fullUrl": "urn:uuid:ce2073cd-7f19-4fd8-9956-f30ef7b4bd44", + "resource": { + "resourceType": "Composition", + "id": "ce2073cd-7f19-4fd8-9956-f30ef7b4bd44", + "extension": [ + { + "url": "http://hl7.eu/fhir/StructureDefinition/composition-basedOn-order-or-requisition", + "valueReference": { + "reference": "urn:uuid:1c38d507-9ad7-4b49-ba91-7da204842cac" + } + }, + { + "url": "http://hl7.eu/fhir/laboratory/StructureDefinition/composition-diagnosticReportReference", + "valueReference": { + "reference": "urn:uuid:35d46ca1-f253-4c97-b7ee-fb5fccdf6c20" + } + } + ], + "identifier": { + "system": "https://tools.ietf.org/html/rfc4122", + "value": "c3d5e6f7-8901-2345-6789-0abcdef12345" + }, + "status": "final", + "type": { + "coding": [ + { + "system": "http://snomed.info/sct", + "code": "721981007", + "display": "Diagnostic studies report" + } + ] + }, + "category": [ + { + "coding": [ + { + "system": "http://snomed.info/sct", + "code": "394915009", + "display": "General pathology (specialty)" + } + ] + } + ], + "subject": { + "reference": "urn:uuid:ab87a3f8-1d37-44a9-804e-5e962598a6e4", + "display": "WELSH, Joel", + "identifier": { + "system": "https://fhir.nhs.uk/Id/nhs-number", + "value": "9727710638" + } + }, + "date": "2022-03-08T12:09:00+00:00", + "author": [ + { + "reference": "urn:uuid:8a6d85b8-9837-4fed-a257-4cf207988338", + "display": "TD008362 PATH LAB 001" + } + ], + "title": "Laboratory Report", + "section": [ + { + "title": "CRP (C reactive protein) mass concentration in serum", + "code": { + "coding": [ + { + "system": "http://snomed.info/sct", + "code": "1106741000000105", + "display": "CRP (C reactive protein) mass concentration in serum" + } + ] + }, + "entry": [ + { + "reference": "urn:uuid:8697e1ea-a15d-4cab-95d9-7335f4b57e22" + } + ] + } + ] + } + }, + { + "fullUrl": "urn:uuid:8a6d85b8-9837-4fed-a257-4cf207988338", + "resource": { + "resourceType": "Organization", + "id": "8a6d85b8-9837-4fed-a257-4cf207988338", + "identifier": [ + { + "system": "https://fhir.nhs.uk/Id/ods-organization-code", + "value": "Y8J7D" + } + ], + "name": "TD008362 PATH LAB 001", + "address": [ + { + "line": [ + "PATHOLOGY LAB", + "7-8 WELLINGTON PLACE" + ], + "city": "LEEDS", + "district": "WEST YORKSHIRE", + "postalCode": "LS1 4AP" + } + ] + } + }, + { + "fullUrl": "urn:uuid:3c43b5b3-06d6-445f-ae9a-48d5f05df434", + "resource": { + "resourceType": "Organization", + "id": "3c43b5b3-06d6-445f-ae9a-48d5f05df434", + "identifier": [ + { + "system": "https://fhir.nhs.uk/Id/ods-organization-code", + "value": "B82033" + } + ], + "name": "PICKERING MEDICAL PRACTICE", + "address": [ + { + "line": [ + "SOUTHGATE" + ], + "city": "PICKERING", + "district": "NORTH YORKSHIRE", + "postalCode": "YO18 8BL" + } + ] + } + }, + { + "fullUrl": "urn:uuid:9a835acf-d715-4d84-8dcf-a8435f6417fe", + "resource": { + "resourceType": "Practitioner", + "id": "9a835acf-d715-4d84-8dcf-a8435f6417fe", + "identifier": [ + { + "system": "https://fhir.hl7.org.uk/Id/gmc-number", + "value": "C1008215" + } + ], + "name": [ + { + "use": "official", + "family": "GASKELL", + "given": [ + "Gale" + ], + "prefix": [ + "Dr" + ] + } + ] + } + }, + { + "fullUrl": "urn:uuid:d4f5e6a1-2b3c-4d5e-9f6a-7b8c9d0e1f2a", + "resource": { + "resourceType": "PractitionerRole", + "id": "d4f5e6a1-2b3c-4d5e-9f6a-7b8c9d0e1f2a", + "practitioner": { + "reference": "urn:uuid:9a835acf-d715-4d84-8dcf-a8435f6417fe" + }, + "organization": { + "reference": "urn:uuid:3c43b5b3-06d6-445f-ae9a-48d5f05df434", + "display": "PICKERING MEDICAL PRACTICE" + } + } + }, + { + "fullUrl": "urn:uuid:ab87a3f8-1d37-44a9-804e-5e962598a6e4", + "resource": { + "resourceType": "Patient", + "id": "ab87a3f8-1d37-44a9-804e-5e962598a6e4", + "identifier": [ + { + "system": "https://fhir.nhs.uk/Id/nhs-number", + "value": "9727710638", + "use": "official" + } + ] + } + }, + { + "fullUrl": "urn:uuid:1c38d507-9ad7-4b49-ba91-7da204842cac", + "resource": { + "resourceType": "ServiceRequest", + "id": "1c38d507-9ad7-4b49-ba91-7da204842cac", + "identifier": [ + { + "system": "http://B82033-pickeringmedicalpractice.com/labrequest", + "value": "REQ-20220307-000142" + } + ], + "status": "active", + "intent": "order", + "code": { + "coding": [ + { + "system": "http://snomed.info/sct", + "code": "135842001", + "display": "Serum C reactive protein level" + } + ] + }, + "subject": { + "reference": "urn:uuid:ab87a3f8-1d37-44a9-804e-5e962598a6e4", + "display": "WELSH, Joel", + "identifier": { + "system": "https://fhir.nhs.uk/Id/nhs-number", + "value": "9727710638" + } + }, + "authoredOn": "2022-01-29T10:24:00+00:00", + "requester": { + "reference": "urn:uuid:d4f5e6a1-2b3c-4d5e-9f6a-7b8c9d0e1f2a" + }, + "performer": [ + { + "reference": "urn:uuid:8a6d85b8-9837-4fed-a257-4cf207988338", + "display": "TD008362 PATH LAB 001" + } + ], + "specimen": [ + { + "reference": "urn:uuid:bab0eaec-1ec5-4598-b660-90bb38a1030d" + } + ] + } + }, + { + "fullUrl": "urn:uuid:35d46ca1-f253-4c97-b7ee-fb5fccdf6c20", + "resource": { + "resourceType": "DiagnosticReport", + "id": "35d46ca1-f253-4c97-b7ee-fb5fccdf6c20", + "identifier": [ + { + "system": "http://Y8J7D-pathlab001.com/report", + "value": "REP-20220308-004205" + } + ], + "basedOn": [ + { + "reference": "urn:uuid:1c38d507-9ad7-4b49-ba91-7da204842cac" + } + ], + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v2-0074", + "code": "LAB", + "display": "Laboratory" + } + ] + } + ], + "code": { + "coding": [ + { + "system": "http://snomed.info/sct", + "code": "721981007", + "display": "Diagnostic studies report" + } + ] + }, + "subject": { + "reference": "urn:uuid:ab87a3f8-1d37-44a9-804e-5e962598a6e4", + "display": "WELSH, Joel", + "identifier": { + "system": "https://fhir.nhs.uk/Id/nhs-number", + "value": "9727710638" + } + }, + "issued": "2022-03-08T12:09:00+00:00", + "performer": [ + { + "reference": "urn:uuid:8a6d85b8-9837-4fed-a257-4cf207988338", + "display": "TD008362 PATH LAB 001" + } + ], + "specimen": [ + { + "reference": "urn:uuid:bab0eaec-1ec5-4598-b660-90bb38a1030d" + } + ], + "result": [ + { + "reference": "urn:uuid:8697e1ea-a15d-4cab-95d9-7335f4b57e22" + } + ] + } + }, + { + "fullUrl": "urn:uuid:bab0eaec-1ec5-4598-b660-90bb38a1030d", + "resource": { + "resourceType": "Specimen", + "id": "bab0eaec-1ec5-4598-b660-90bb38a1030d", + "identifier": [ + { + "system": "http://B82033-pickeringmedicalpractice.com/specimen", + "value": "SPC-REQ-20220307-000105" + } + ], + "accessionIdentifier": { + "system": "http://Y8J7D-pathlab001.com/specimen", + "value": "SPC-Lab-20220307-007856" + }, + "status": "available", + "type": { + "coding": [ + { + "system": "http://snomed.info/sct", + "code": "122555007", + "display": "Venous blood specimen" + } + ] + }, + "subject": { + "reference": "urn:uuid:ab87a3f8-1d37-44a9-804e-5e962598a6e4", + "display": "WELSH, Joel", + "identifier": { + "system": "https://fhir.nhs.uk/Id/nhs-number", + "value": "9727710638" + } + }, + "receivedTime": "2022-03-07T14:58:00+00:00", + "collection": { + "collectedDateTime": "2022-03-07T11:42:00+00:00" + } + } + }, + { + "fullUrl": "urn:uuid:8697e1ea-a15d-4cab-95d9-7335f4b57e22", + "resource": { + "resourceType": "Observation", + "id": "8697e1ea-a15d-4cab-95d9-7335f4b57e22", + "identifier": [ + { + "system": "https://tools.ietf.org/html/rfc4122", + "value": "09fd65ba-4bbb-49dd-9d16-ca74f885db6c" + } + ], + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "laboratory", + "display": "Laboratory" + } + ] + } + ], + "code": { + "coding": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/valueset-reference", + "valueUri": "https://fhir.hl7.org.uk/ValueSet/UKCore-PathologyBoundedCodeListObservables" + } + ], + "system": "http://snomed.info/sct", + "code": "1001371000000100", + "display": "Serum CRP (C reactive protein) level" + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/valueset-reference", + "valueUri": "https://fhir.hl7.org.uk/ValueSet/UKCore-PathologyAndLaboratoryMedicineObservables" + } + ], + "system": "http://snomed.info/sct", + "code": "1106741000000105", + "display": "CRP (C reactive protein) mass concentration in serum" + } + ] + }, + "subject": { + "reference": "urn:uuid:ab87a3f8-1d37-44a9-804e-5e962598a6e4", + "display": "WELSH, Joel", + "identifier": { + "system": "https://fhir.nhs.uk/Id/nhs-number", + "value": "9727710638" + } + }, + "issued": "2022-03-08T12:09:00+00:00", + "performer": [ + { + "reference": "urn:uuid:8a6d85b8-9837-4fed-a257-4cf207988338", + "display": "TD008362 PATH LAB 001" + } + ], + "valueQuantity": { + "value": 200, + "unit": "mg/L", + "system": "http://unitsofmeasure.org", + "code": "mg/L" + }, + "interpretation": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "H", + "display": "High" + } + ] + } + ], + "specimen": { + "reference": "urn:uuid:bab0eaec-1ec5-4598-b660-90bb38a1030d" + }, + "referenceRange": [ + { + "low": { + "value": 0, + "unit": "mg/L", + "system": "http://unitsofmeasure.org", + "code": "mg/L" + }, + "high": { + "value": 5, + "unit": "mg/L", + "system": "http://unitsofmeasure.org", + "code": "mg/L" + } + } + ] + } + } + ] + } +} + +assert { + res.status: eq 200 +} + +settings { + encodeUrl: true + timeout: 0 +} diff --git a/bruno/APIM/Test_MNS_Pathology_Api_Unable_To_Authenticate_IntEnvi.bru b/bruno/APIM/Test_MNS_Pathology_Api_Unable_To_Authenticate_IntEnvi.bru new file mode 100644 index 0000000..1186026 --- /dev/null +++ b/bruno/APIM/Test_MNS_Pathology_Api_Unable_To_Authenticate_IntEnvi.bru @@ -0,0 +1,83 @@ +meta { + name: Test_MNS_Pathology_Api_Unable_To_Authenticate_IntEnvi + type: http + seq: 60 +} + +post { + url: https://int.api.service.nhs.uk/pathology-laboratory-reporting/FHIR/R4/Bundle + body: json + auth: inherit +} + +headers { + Content-Type: application/fhir+json +} + +body:json { + { + "resourceType": "Bundle", + "type": "document", + "entry": [ + { + "fullUrl": "composition", + "resource": { + "resourceType": "Composition", + "extension": [ + { + "url": "http://hl7.eu/fhir/StructureDefinition/composition-basedOn-order-or-requisition", + "valueReference": { + "reference": "servicerequest" + } + } + ], + "subject": { + "identifier": { + "system": "https://fhir.nhs.uk/Id/nhs-number", + "value": "MNS_AUTHENTICATION_ERROR" + } + } + } + }, + { + "fullUrl": "servicerequest", + "resource": { + "resourceType": "ServiceRequest", + "requester": { + "reference": "practitionerrole" + } + } + }, + { + "fullUrl": "practitionerrole", + "resource": { + "resourceType": "PractitionerRole", + "organization": { + "reference": "organization" + } + } + }, + { + "fullUrl": "organization", + "resource": { + "resourceType": "Organization", + "identifier": [ + { + "system": "https://fhir.nhs.uk/Id/ods-organization-code", + "value": "testOrg" + } + ] + } + } + ] + } +} + +assert { + res.status: eq 500 +} + +settings { + encodeUrl: true + timeout: 0 +} diff --git a/bruno/APIM/Test_MNS_Pathology_Api_Unable_To_Authorize_Event.bru b/bruno/APIM/Test_MNS_Pathology_Api_Unable_To_Authorize_Event.bru index 35730ee..7db45ff 100644 --- a/bruno/APIM/Test_MNS_Pathology_Api_Unable_To_Authorize_Event.bru +++ b/bruno/APIM/Test_MNS_Pathology_Api_Unable_To_Authorize_Event.bru @@ -1,7 +1,7 @@ meta { name: Test_MNS_Pathology_Api_Unable_To_Authorize_Event type: http - seq: 5 + seq: 6 } post { diff --git a/bruno/APIM/Test_MNS_Pathology_Api_Unable_To_Authorize_Event_IntEnvi.bru b/bruno/APIM/Test_MNS_Pathology_Api_Unable_To_Authorize_Event_IntEnvi.bru new file mode 100644 index 0000000..6b7f902 --- /dev/null +++ b/bruno/APIM/Test_MNS_Pathology_Api_Unable_To_Authorize_Event_IntEnvi.bru @@ -0,0 +1,83 @@ +meta { + name: Test_MNS_Pathology_Api_Unable_To_Authorize_Event_IntEnvi + type: http + seq: 61 +} + +post { + url: https://int.api.service.nhs.uk/pathology-laboratory-reporting/FHIR/R4/Bundle + body: json + auth: inherit +} + +headers { + Content-Type: application/fhir+json +} + +body:json { + { + "resourceType": "Bundle", + "type": "document", + "entry": [ + { + "fullUrl": "composition", + "resource": { + "resourceType": "Composition", + "extension": [ + { + "url": "http://hl7.eu/fhir/StructureDefinition/composition-basedOn-order-or-requisition", + "valueReference": { + "reference": "servicerequest" + } + } + ], + "subject": { + "identifier": { + "system": "https://fhir.nhs.uk/Id/nhs-number", + "value": "MNS_AUTHORIZATION_ERROR" + } + } + } + }, + { + "fullUrl": "servicerequest", + "resource": { + "resourceType": "ServiceRequest", + "requester": { + "reference": "practitionerrole" + } + } + }, + { + "fullUrl": "practitionerrole", + "resource": { + "resourceType": "PractitionerRole", + "organization": { + "reference": "organization" + } + } + }, + { + "fullUrl": "organization", + "resource": { + "resourceType": "Organization", + "identifier": [ + { + "system": "https://fhir.nhs.uk/Id/ods-organization-code", + "value": "testOrg" + } + ] + } + } + ] + } +} + +assert { + res.status: eq 500 +} + +settings { + encodeUrl: true + timeout: 0 +} diff --git a/bruno/APIM/Test_MNS_Service_Experience_Bad_Gateway_Error.bru b/bruno/APIM/Test_MNS_Service_Experience_Bad_Gateway_Error.bru index 99ed549..4dbf506 100644 --- a/bruno/APIM/Test_MNS_Service_Experience_Bad_Gateway_Error.bru +++ b/bruno/APIM/Test_MNS_Service_Experience_Bad_Gateway_Error.bru @@ -1,7 +1,7 @@ meta { name: Test_MNS_Service_Experience_Bad_Gateway_Error type: http - seq: 7 + seq: 10 } post { diff --git a/bruno/APIM/Test_MNS_Service_Experience_Bad_Gateway_Error_IntEnvi.bru b/bruno/APIM/Test_MNS_Service_Experience_Bad_Gateway_Error_IntEnvi.bru new file mode 100644 index 0000000..6000f08 --- /dev/null +++ b/bruno/APIM/Test_MNS_Service_Experience_Bad_Gateway_Error_IntEnvi.bru @@ -0,0 +1,83 @@ +meta { + name: Test_MNS_Service_Experience_Bad_Gateway_Error_IntEnvi + type: http + seq: 63 +} + +post { + url: https://int.api.service.nhs.uk/pathology-laboratory-reporting/FHIR/R4/Bundle + body: json + auth: inherit +} + +headers { + Content-Type: application/fhir+json +} + +body:json { + { + "resourceType": "Bundle", + "type": "document", + "entry": [ + { + "fullUrl": "composition", + "resource": { + "resourceType": "Composition", + "extension": [ + { + "url": "http://hl7.eu/fhir/StructureDefinition/composition-basedOn-order-or-requisition", + "valueReference": { + "reference": "servicerequest" + } + } + ], + "subject": { + "identifier": { + "system": "https://fhir.nhs.uk/Id/nhs-number", + "value": "MNS_BAD_GATEWAY_ERROR" + } + } + } + }, + { + "fullUrl": "servicerequest", + "resource": { + "resourceType": "ServiceRequest", + "requester": { + "reference": "practitionerrole" + } + } + }, + { + "fullUrl": "practitionerrole", + "resource": { + "resourceType": "PractitionerRole", + "organization": { + "reference": "organization" + } + } + }, + { + "fullUrl": "organization", + "resource": { + "resourceType": "Organization", + "identifier": [ + { + "system": "https://fhir.nhs.uk/Id/ods-organization-code", + "value": "testOrg" + } + ] + } + } + ] + } +} + +assert { + res.status: eq 500 +} + +settings { + encodeUrl: true + timeout: 0 +} diff --git a/bruno/APIM/Test_MNS_Service_Experience_Gateway_Timeout_Error.bru b/bruno/APIM/Test_MNS_Service_Experience_Gateway_Timeout_Error.bru index b278d6c..7ca4b85 100644 --- a/bruno/APIM/Test_MNS_Service_Experience_Gateway_Timeout_Error.bru +++ b/bruno/APIM/Test_MNS_Service_Experience_Gateway_Timeout_Error.bru @@ -1,7 +1,7 @@ meta { name: Test_MNS_Service_Experience_Gateway_Timeout_Error type: http - seq: 8 + seq: 12 } post { diff --git a/bruno/APIM/Test_MNS_Service_Experience_Gateway_Timeout_Error_IntEnvi.bru b/bruno/APIM/Test_MNS_Service_Experience_Gateway_Timeout_Error_IntEnvi.bru new file mode 100644 index 0000000..9103fb4 --- /dev/null +++ b/bruno/APIM/Test_MNS_Service_Experience_Gateway_Timeout_Error_IntEnvi.bru @@ -0,0 +1,83 @@ +meta { + name: Test_MNS_Service_Experience_Gateway_Timeout_Error_IntEnvi + type: http + seq: 64 +} + +post { + url: https://int.api.service.nhs.uk/pathology-laboratory-reporting/FHIR/R4/Bundle + body: json + auth: inherit +} + +headers { + Content-Type: application/fhir+json +} + +body:json { + { + "resourceType": "Bundle", + "type": "document", + "entry": [ + { + "fullUrl": "composition", + "resource": { + "resourceType": "Composition", + "extension": [ + { + "url": "http://hl7.eu/fhir/StructureDefinition/composition-basedOn-order-or-requisition", + "valueReference": { + "reference": "servicerequest" + } + } + ], + "subject": { + "identifier": { + "system": "https://fhir.nhs.uk/Id/nhs-number", + "value": "MNS_GATEWAY_TIMEOUT_ERROR" + } + } + } + }, + { + "fullUrl": "servicerequest", + "resource": { + "resourceType": "ServiceRequest", + "requester": { + "reference": "practitionerrole" + } + } + }, + { + "fullUrl": "practitionerrole", + "resource": { + "resourceType": "PractitionerRole", + "organization": { + "reference": "organization" + } + } + }, + { + "fullUrl": "organization", + "resource": { + "resourceType": "Organization", + "identifier": [ + { + "system": "https://fhir.nhs.uk/Id/ods-organization-code", + "value": "testOrg" + } + ] + } + } + ] + } +} + +assert { + res.status: eq 500 +} + +settings { + encodeUrl: true + timeout: 0 +} diff --git a/bruno/APIM/Test_MNS_Service_Experience_Validation_Error.bru b/bruno/APIM/Test_MNS_Service_Experience_Validation_Error.bru index 9df7519..68075f4 100644 --- a/bruno/APIM/Test_MNS_Service_Experience_Validation_Error.bru +++ b/bruno/APIM/Test_MNS_Service_Experience_Validation_Error.bru @@ -1,7 +1,7 @@ meta { name: Test_MNS_Service_Experience_Validation_Error type: http - seq: 9 + seq: 15 } post { diff --git a/bruno/APIM/Test_MNS_Service_Experience_Validation_Error_IntEnvi.bru b/bruno/APIM/Test_MNS_Service_Experience_Validation_Error_IntEnvi.bru new file mode 100644 index 0000000..a28f74b --- /dev/null +++ b/bruno/APIM/Test_MNS_Service_Experience_Validation_Error_IntEnvi.bru @@ -0,0 +1,83 @@ +meta { + name: Test_MNS_Service_Experience_Validation_Error_IntEnvi + type: http + seq: 65 +} + +post { + url: https://int.api.service.nhs.uk/pathology-laboratory-reporting/FHIR/R4/Bundle + body: json + auth: inherit +} + +headers { + Content-Type: application/fhir+json +} + +body:json { + { + "resourceType": "Bundle", + "type": "document", + "entry": [ + { + "fullUrl": "composition", + "resource": { + "resourceType": "Composition", + "extension": [ + { + "url": "http://hl7.eu/fhir/StructureDefinition/composition-basedOn-order-or-requisition", + "valueReference": { + "reference": "servicerequest" + } + } + ], + "subject": { + "identifier": { + "system": "https://fhir.nhs.uk/Id/nhs-number", + "value": "MNS_VALIDATION_ERROR" + } + } + } + }, + { + "fullUrl": "servicerequest", + "resource": { + "resourceType": "ServiceRequest", + "requester": { + "reference": "practitionerrole" + } + } + }, + { + "fullUrl": "practitionerrole", + "resource": { + "resourceType": "PractitionerRole", + "organization": { + "reference": "organization" + } + } + }, + { + "fullUrl": "organization", + "resource": { + "resourceType": "Organization", + "identifier": [ + { + "system": "https://fhir.nhs.uk/Id/ods-organization-code", + "value": "testOrg" + } + ] + } + } + ] + } +} + +assert { + res.status: eq 500 +} + +settings { + encodeUrl: true + timeout: 0 +} diff --git a/bruno/APIM/Test_MNS_Service_Returns_Client_Side_Error.bru b/bruno/APIM/Test_MNS_Service_Returns_Client_Side_Error.bru index 4f8e9a7..598279a 100644 --- a/bruno/APIM/Test_MNS_Service_Returns_Client_Side_Error.bru +++ b/bruno/APIM/Test_MNS_Service_Returns_Client_Side_Error.bru @@ -1,7 +1,7 @@ meta { name: Test_MNS_Service_Returns_Client_Side_Error type: http - seq: 6 + seq: 8 } post { diff --git a/bruno/APIM/Test_MNS_Service_Returns_Client_Side_Error_IntEnvi.bru b/bruno/APIM/Test_MNS_Service_Returns_Client_Side_Error_IntEnvi.bru new file mode 100644 index 0000000..b5a9279 --- /dev/null +++ b/bruno/APIM/Test_MNS_Service_Returns_Client_Side_Error_IntEnvi.bru @@ -0,0 +1,83 @@ +meta { + name: Test_MNS_Service_Returns_Client_Side_Error_IntEnvi + type: http + seq: 62 +} + +post { + url: https://int.api.service.nhs.uk/pathology-laboratory-reporting/FHIR/R4/Bundle + body: json + auth: inherit +} + +headers { + Content-Type: application/fhir+json +} + +body:json { + { + "resourceType": "Bundle", + "type": "document", + "entry": [ + { + "fullUrl": "composition", + "resource": { + "resourceType": "Composition", + "extension": [ + { + "url": "http://hl7.eu/fhir/StructureDefinition/composition-basedOn-order-or-requisition", + "valueReference": { + "reference": "servicerequest" + } + } + ], + "subject": { + "identifier": { + "system": "https://fhir.nhs.uk/Id/nhs-number", + "value": "MNS_SERVER_ERROR" + } + } + } + }, + { + "fullUrl": "servicerequest", + "resource": { + "resourceType": "ServiceRequest", + "requester": { + "reference": "practitionerrole" + } + } + }, + { + "fullUrl": "practitionerrole", + "resource": { + "resourceType": "PractitionerRole", + "organization": { + "reference": "organization" + } + } + }, + { + "fullUrl": "organization", + "resource": { + "resourceType": "Organization", + "identifier": [ + { + "system": "https://fhir.nhs.uk/Id/ods-organization-code", + "value": "testOrg" + } + ] + } + } + ] + } +} + +assert { + res.status: eq 500 +} + +settings { + encodeUrl: true + timeout: 0 +} diff --git a/bruno/APIM/Test_PDM_Api_Server_Error.bru b/bruno/APIM/Test_PDM_Api_Server_Error.bru index 731a50f..3566e76 100644 --- a/bruno/APIM/Test_PDM_Api_Server_Error.bru +++ b/bruno/APIM/Test_PDM_Api_Server_Error.bru @@ -1,7 +1,7 @@ meta { name: Test_PDM_Api_Server_Error type: http - seq: 12 + seq: 19 } post { diff --git a/bruno/APIM/Test_PDM_Api_Server_Error_IntEnvi.bru b/bruno/APIM/Test_PDM_Api_Server_Error_IntEnvi.bru new file mode 100644 index 0000000..6da60f7 --- /dev/null +++ b/bruno/APIM/Test_PDM_Api_Server_Error_IntEnvi.bru @@ -0,0 +1,96 @@ +meta { + name: Test_PDM_Api_Server_Error_IntEnvi + type: http + seq: 45 +} + +post { + url: https://int.api.service.nhs.uk/pathology-laboratory-reporting/FHIR/R4/Bundle + body: json + auth: inherit +} + +headers { + Content-Type: application/fhir+json +} + +body:json { + { + "resourceType": "Bundle", + "type": "document", + "entry": [ + { + "fullUrl": "composition", + "resource": { + "resourceType": "Composition", + "extension": [ + { + "url": "http://hl7.eu/fhir/StructureDefinition/composition-basedOn-order-or-requisition", + "valueReference": { + "reference": "servicerequest" + } + } + ], + "subject": { + "identifier": { + "system": "https://fhir.nhs.uk/Id/nhs-number", + "value": "test-nhs-number" + } + } + } + }, + { + "fullUrl": "servicerequest", + "resource": { + "resourceType": "ServiceRequest", + "requester": { + "reference": "practitionerrole" + } + } + }, + { + "fullUrl": "practitionerrole", + "resource": { + "resourceType": "PractitionerRole", + "organization": { + "reference": "organization" + } + } + }, + { + "fullUrl": "patient", + "resource": { + "resourceType": "Patient", + "identifier": [ + { + "system": "https://fhir.nhs.uk/Id/nhs-number", + "value": "PDM_SERVER_ERROR" + } + ] + } + }, + { + "fullUrl": "organization", + "resource": { + "resourceType": "Organization", + "identifier": [ + { + "system": "https://fhir.nhs.uk/Id/ods-organization-code", + "value": "testOrg" + } + ] + } + } + ] + } +} + +assert { + res.status: eq 500 + res.body.issue[0].diagnostics: contains Failed to send document: +} + +settings { + encodeUrl: true + timeout: 0 +} diff --git a/bruno/APIM/Test_PDM_Api_Validation_Error.bru b/bruno/APIM/Test_PDM_Api_Validation_Error.bru index f690146..5737b63 100644 --- a/bruno/APIM/Test_PDM_Api_Validation_Error.bru +++ b/bruno/APIM/Test_PDM_Api_Validation_Error.bru @@ -1,7 +1,7 @@ meta { name: Test_PDM_Api_Validation_Error type: http - seq: 10 + seq: 16 } post { diff --git a/bruno/APIM/Test_PDM_Bundle_Succesful_Response.bru b/bruno/APIM/Test_PDM_Bundle_Succesful_Response.bru index 502810a..7a6c7e5 100644 --- a/bruno/APIM/Test_PDM_Bundle_Succesful_Response.bru +++ b/bruno/APIM/Test_PDM_Bundle_Succesful_Response.bru @@ -1,7 +1,7 @@ meta { name: Test_PDM_Bundle_Succesful_Response type: http - seq: 12 + seq: 20 } post { diff --git a/bruno/APIM/Test_PDM_Bundle_Succesful_Response_IntEnvi.bru b/bruno/APIM/Test_PDM_Bundle_Succesful_Response_IntEnvi.bru new file mode 100644 index 0000000..3e9f380 --- /dev/null +++ b/bruno/APIM/Test_PDM_Bundle_Succesful_Response_IntEnvi.bru @@ -0,0 +1,473 @@ +meta { + name: Test_PDM_Bundle_Succesful_Response_IntEnvi + type: http + seq: 46 +} + +post { + url: https://int.api.service.nhs.uk/pathology-laboratory-reporting/FHIR/R4/Bundle + body: json + auth: inherit +} + +headers { + Content-Type: application/fhir+json +} + +body:json { + { + "resourceType": "Bundle", + "identifier": { + "system": "https://tools.ietf.org/html/rfc4122", + "value": "1f859037-2942-4117-884a-f51b62db5a52" + }, + "type": "document", + "timestamp": "2022-03-08T12:09:00+00:00", + "entry": [ + { + "fullUrl": "urn:uuid:ce2073cd-7f19-4fd8-9956-f30ef7b4bd44", + "resource": { + "resourceType": "Composition", + "id": "ce2073cd-7f19-4fd8-9956-f30ef7b4bd44", + "extension": [ + { + "url": "http://hl7.eu/fhir/StructureDefinition/composition-basedOn-order-or-requisition", + "valueReference": { + "reference": "urn:uuid:1c38d507-9ad7-4b49-ba91-7da204842cac" + } + }, + { + "url": "http://hl7.eu/fhir/laboratory/StructureDefinition/composition-diagnosticReportReference", + "valueReference": { + "reference": "urn:uuid:35d46ca1-f253-4c97-b7ee-fb5fccdf6c20" + } + } + ], + "identifier": { + "system": "https://tools.ietf.org/html/rfc4122", + "value": "c3d5e6f7-8901-2345-6789-0abcdef12345" + }, + "status": "final", + "type": { + "coding": [ + { + "system": "http://snomed.info/sct", + "code": "721981007", + "display": "Diagnostic studies report" + } + ] + }, + "category": [ + { + "coding": [ + { + "system": "http://snomed.info/sct", + "code": "394915009", + "display": "General pathology (specialty)" + } + ] + } + ], + "subject": { + "reference": "urn:uuid:ab87a3f8-1d37-44a9-804e-5e962598a6e4", + "display": "WELSH, Joel", + "identifier": { + "system": "https://fhir.nhs.uk/Id/nhs-number", + "value": "9727710638" + } + }, + "date": "2022-03-08T12:09:00+00:00", + "author": [ + { + "reference": "urn:uuid:8a6d85b8-9837-4fed-a257-4cf207988338", + "display": "TD008362 PATH LAB 001" + } + ], + "title": "Laboratory Report", + "section": [ + { + "title": "CRP (C reactive protein) mass concentration in serum", + "code": { + "coding": [ + { + "system": "http://snomed.info/sct", + "code": "1106741000000105", + "display": "CRP (C reactive protein) mass concentration in serum" + } + ] + }, + "entry": [ + { + "reference": "urn:uuid:8697e1ea-a15d-4cab-95d9-7335f4b57e22" + } + ] + } + ] + } + }, + { + "fullUrl": "urn:uuid:8a6d85b8-9837-4fed-a257-4cf207988338", + "resource": { + "resourceType": "Organization", + "id": "8a6d85b8-9837-4fed-a257-4cf207988338", + "identifier": [ + { + "system": "https://fhir.nhs.uk/Id/ods-organization-code", + "value": "Y8J7D" + } + ], + "name": "TD008362 PATH LAB 001", + "address": [ + { + "line": [ + "PATHOLOGY LAB", + "7-8 WELLINGTON PLACE" + ], + "city": "LEEDS", + "district": "WEST YORKSHIRE", + "postalCode": "LS1 4AP" + } + ] + } + }, + { + "fullUrl": "urn:uuid:3c43b5b3-06d6-445f-ae9a-48d5f05df434", + "resource": { + "resourceType": "Organization", + "id": "3c43b5b3-06d6-445f-ae9a-48d5f05df434", + "identifier": [ + { + "system": "https://fhir.nhs.uk/Id/ods-organization-code", + "value": "B82033" + } + ], + "name": "PICKERING MEDICAL PRACTICE", + "address": [ + { + "line": [ + "SOUTHGATE" + ], + "city": "PICKERING", + "district": "NORTH YORKSHIRE", + "postalCode": "YO18 8BL" + } + ] + } + }, + { + "fullUrl": "urn:uuid:9a835acf-d715-4d84-8dcf-a8435f6417fe", + "resource": { + "resourceType": "Practitioner", + "id": "9a835acf-d715-4d84-8dcf-a8435f6417fe", + "identifier": [ + { + "system": "https://fhir.hl7.org.uk/Id/gmc-number", + "value": "C1008215" + } + ], + "name": [ + { + "use": "official", + "family": "GASKELL", + "given": [ + "Gale" + ], + "prefix": [ + "Dr" + ] + } + ] + } + }, + { + "fullUrl": "urn:uuid:d4f5e6a1-2b3c-4d5e-9f6a-7b8c9d0e1f2a", + "resource": { + "resourceType": "PractitionerRole", + "id": "d4f5e6a1-2b3c-4d5e-9f6a-7b8c9d0e1f2a", + "practitioner": { + "reference": "urn:uuid:9a835acf-d715-4d84-8dcf-a8435f6417fe" + }, + "organization": { + "reference": "urn:uuid:3c43b5b3-06d6-445f-ae9a-48d5f05df434", + "display": "PICKERING MEDICAL PRACTICE" + } + } + }, + { + "fullUrl": "urn:uuid:ab87a3f8-1d37-44a9-804e-5e962598a6e4", + "resource": { + "resourceType": "Patient", + "id": "ab87a3f8-1d37-44a9-804e-5e962598a6e4", + "identifier": [ + { + "system": "https://fhir.nhs.uk/Id/nhs-number", + "value": "9727710638", + "use": "official" + } + ] + } + }, + { + "fullUrl": "urn:uuid:1c38d507-9ad7-4b49-ba91-7da204842cac", + "resource": { + "resourceType": "ServiceRequest", + "id": "1c38d507-9ad7-4b49-ba91-7da204842cac", + "identifier": [ + { + "system": "http://B82033-pickeringmedicalpractice.com/labrequest", + "value": "REQ-20220307-000142" + } + ], + "status": "active", + "intent": "order", + "code": { + "coding": [ + { + "system": "http://snomed.info/sct", + "code": "135842001", + "display": "Serum C reactive protein level" + } + ] + }, + "subject": { + "reference": "urn:uuid:ab87a3f8-1d37-44a9-804e-5e962598a6e4", + "display": "WELSH, Joel", + "identifier": { + "system": "https://fhir.nhs.uk/Id/nhs-number", + "value": "9727710638" + } + }, + "authoredOn": "2022-01-29T10:24:00+00:00", + "requester": { + "reference": "urn:uuid:d4f5e6a1-2b3c-4d5e-9f6a-7b8c9d0e1f2a" + }, + "performer": [ + { + "reference": "urn:uuid:8a6d85b8-9837-4fed-a257-4cf207988338", + "display": "TD008362 PATH LAB 001" + } + ], + "specimen": [ + { + "reference": "urn:uuid:bab0eaec-1ec5-4598-b660-90bb38a1030d" + } + ] + } + }, + { + "fullUrl": "urn:uuid:35d46ca1-f253-4c97-b7ee-fb5fccdf6c20", + "resource": { + "resourceType": "DiagnosticReport", + "id": "35d46ca1-f253-4c97-b7ee-fb5fccdf6c20", + "identifier": [ + { + "system": "http://Y8J7D-pathlab001.com/report", + "value": "REP-20220308-004205" + } + ], + "basedOn": [ + { + "reference": "urn:uuid:1c38d507-9ad7-4b49-ba91-7da204842cac" + } + ], + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v2-0074", + "code": "LAB", + "display": "Laboratory" + } + ] + } + ], + "code": { + "coding": [ + { + "system": "http://snomed.info/sct", + "code": "721981007", + "display": "Diagnostic studies report" + } + ] + }, + "subject": { + "reference": "urn:uuid:ab87a3f8-1d37-44a9-804e-5e962598a6e4", + "display": "WELSH, Joel", + "identifier": { + "system": "https://fhir.nhs.uk/Id/nhs-number", + "value": "9727710638" + } + }, + "issued": "2022-03-08T12:09:00+00:00", + "performer": [ + { + "reference": "urn:uuid:8a6d85b8-9837-4fed-a257-4cf207988338", + "display": "TD008362 PATH LAB 001" + } + ], + "specimen": [ + { + "reference": "urn:uuid:bab0eaec-1ec5-4598-b660-90bb38a1030d" + } + ], + "result": [ + { + "reference": "urn:uuid:8697e1ea-a15d-4cab-95d9-7335f4b57e22" + } + ] + } + }, + { + "fullUrl": "urn:uuid:bab0eaec-1ec5-4598-b660-90bb38a1030d", + "resource": { + "resourceType": "Specimen", + "id": "bab0eaec-1ec5-4598-b660-90bb38a1030d", + "identifier": [ + { + "system": "http://B82033-pickeringmedicalpractice.com/specimen", + "value": "SPC-REQ-20220307-000105" + } + ], + "accessionIdentifier": { + "system": "http://Y8J7D-pathlab001.com/specimen", + "value": "SPC-Lab-20220307-007856" + }, + "status": "available", + "type": { + "coding": [ + { + "system": "http://snomed.info/sct", + "code": "122555007", + "display": "Venous blood specimen" + } + ] + }, + "subject": { + "reference": "urn:uuid:ab87a3f8-1d37-44a9-804e-5e962598a6e4", + "display": "WELSH, Joel", + "identifier": { + "system": "https://fhir.nhs.uk/Id/nhs-number", + "value": "9727710638" + } + }, + "receivedTime": "2022-03-07T14:58:00+00:00", + "collection": { + "collectedDateTime": "2022-03-07T11:42:00+00:00" + } + } + }, + { + "fullUrl": "urn:uuid:8697e1ea-a15d-4cab-95d9-7335f4b57e22", + "resource": { + "resourceType": "Observation", + "id": "8697e1ea-a15d-4cab-95d9-7335f4b57e22", + "identifier": [ + { + "system": "https://tools.ietf.org/html/rfc4122", + "value": "09fd65ba-4bbb-49dd-9d16-ca74f885db6c" + } + ], + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "laboratory", + "display": "Laboratory" + } + ] + } + ], + "code": { + "coding": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/valueset-reference", + "valueUri": "https://fhir.hl7.org.uk/ValueSet/UKCore-PathologyBoundedCodeListObservables" + } + ], + "system": "http://snomed.info/sct", + "code": "1001371000000100", + "display": "Serum CRP (C reactive protein) level" + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/valueset-reference", + "valueUri": "https://fhir.hl7.org.uk/ValueSet/UKCore-PathologyAndLaboratoryMedicineObservables" + } + ], + "system": "http://snomed.info/sct", + "code": "1106741000000105", + "display": "CRP (C reactive protein) mass concentration in serum" + } + ] + }, + "subject": { + "reference": "urn:uuid:ab87a3f8-1d37-44a9-804e-5e962598a6e4", + "display": "WELSH, Joel", + "identifier": { + "system": "https://fhir.nhs.uk/Id/nhs-number", + "value": "9727710638" + } + }, + "issued": "2022-03-08T12:09:00+00:00", + "performer": [ + { + "reference": "urn:uuid:8a6d85b8-9837-4fed-a257-4cf207988338", + "display": "TD008362 PATH LAB 001" + } + ], + "valueQuantity": { + "value": 200, + "unit": "mg/L", + "system": "http://unitsofmeasure.org", + "code": "mg/L" + }, + "interpretation": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "H", + "display": "High" + } + ] + } + ], + "specimen": { + "reference": "urn:uuid:bab0eaec-1ec5-4598-b660-90bb38a1030d" + }, + "referenceRange": [ + { + "low": { + "value": 0, + "unit": "mg/L", + "system": "http://unitsofmeasure.org", + "code": "mg/L" + }, + "high": { + "value": 5, + "unit": "mg/L", + "system": "http://unitsofmeasure.org", + "code": "mg/L" + } + } + ] + } + } + ] + } +} + +assert { + res.status: eq 200 +} + +settings { + encodeUrl: true + timeout: 0 +} diff --git a/bruno/APIM/Test_With_Incorrect_ReferenceType.bru b/bruno/APIM/Test_With_Incorrect_ReferenceType.bru index a370aad..580e659 100644 --- a/bruno/APIM/Test_With_Incorrect_ReferenceType.bru +++ b/bruno/APIM/Test_With_Incorrect_ReferenceType.bru @@ -1,7 +1,7 @@ meta { name: Test_With_Incorrect_ReferenceType type: http - seq: 13 + seq: 22 } post { diff --git a/bruno/APIM/Test_With_Incorrect_ReferenceType_IntEnvi.bru b/bruno/APIM/Test_With_Incorrect_ReferenceType_IntEnvi.bru new file mode 100644 index 0000000..7cb6452 --- /dev/null +++ b/bruno/APIM/Test_With_Incorrect_ReferenceType_IntEnvi.bru @@ -0,0 +1,84 @@ +meta { + name: Test_With_Incorrect_ReferenceType_IntEnvi + type: http + seq: 48 +} + +post { + url: https://int.api.service.nhs.uk/pathology-laboratory-reporting/FHIR/R4/Bundle + body: json + auth: inherit +} + +headers { + Content-Type: application/fhir+json +} + +body:json { + { + "resourceType": "Bundle", + "type": "document", + "entry": [ + { + "fullUrl": "composition", + "resource": { + "resourceType": "Composition", + "extension": [ + { + "url": "http://hl7.eu/fhir/StructureDefinition/composition-basedOn-order-or-requisition", + "valueReference": { + "reference": 123 + } + } + ], + "subject": { + "identifier": { + "system": "https://fhir.nhs.uk/Id/nhs-number", + "value": "test-nhs-number" + } + } + } + }, + { + "fullUrl": "servicerequest", + "resource": { + "resourceType": "ServiceRequest", + "requester": { + "reference": "practitionerrole" + } + } + }, + { + "fullUrl": "practitionerrole", + "resource": { + "resourceType": "PractitionerRole", + "organization": { + "reference": "organization" + } + } + }, + { + "fullUrl": "organization", + "resource": { + "resourceType": "Organization", + "identifier": [ + { + "system": "https://fhir.nhs.uk/Id/ods-organization-code", + "value": "testOrg" + } + ] + } + } + ] + } +} + +assert { + res.status: eq 400 + res.body.issue[0].diagnostics: eq ('entry', 0, 'resource', 'extension', 0, 'valueReference', 'reference') - Input should be a valid string \n +} + +settings { + encodeUrl: true + timeout: 0 +} diff --git a/bruno/APIM/Test_With_Incorrect_ReferenceType_in_Extension.bru b/bruno/APIM/Test_With_Incorrect_ReferenceType_in_Extension.bru index 2b64367..2bb4648 100644 --- a/bruno/APIM/Test_With_Incorrect_ReferenceType_in_Extension.bru +++ b/bruno/APIM/Test_With_Incorrect_ReferenceType_in_Extension.bru @@ -1,7 +1,7 @@ meta { name: Test_With_Incorrect_ReferenceType_in_Extension type: http - seq: 12 + seq: 21 } post { diff --git a/bruno/APIM/Test_With_Incorrect_ReferenceType_in_Extension_IntEnvi.bru b/bruno/APIM/Test_With_Incorrect_ReferenceType_in_Extension_IntEnvi.bru new file mode 100644 index 0000000..b026db5 --- /dev/null +++ b/bruno/APIM/Test_With_Incorrect_ReferenceType_in_Extension_IntEnvi.bru @@ -0,0 +1,84 @@ +meta { + name: Test_With_Incorrect_ReferenceType_in_Extension_IntEnvi + type: http + seq: 47 +} + +post { + url: https://int.api.service.nhs.uk/pathology-laboratory-reporting/FHIR/R4/Bundle + body: json + auth: inherit +} + +headers { + Content-Type: application/fhir+json +} + +body:json { + { + "resourceType": "Bundle", + "type": "document", + "entry": [ + { + "fullUrl": "composition", + "resource": { + "resourceType": "Composition", + "extension": [ + { + "url": "http://hl7.eu/fhir/StructureDefinition/composition-basedOn-order-or-requisition", + "valueReference": { + "reference": "servicerequest123" + } + } + ], + "subject": { + "identifier": { + "system": "https://fhir.nhs.uk/Id/nhs-number", + "value": "test-nhs-number" + } + } + } + }, + { + "fullUrl": "servicerequest", + "resource": { + "resourceType": "ServiceRequest", + "requester": { + "reference": "practitionerrole" + } + } + }, + { + "fullUrl": "practitionerrole", + "resource": { + "resourceType": "PractitionerRole", + "organization": { + "reference": "organization" + } + } + }, + { + "fullUrl": "organization", + "resource": { + "resourceType": "Organization", + "identifier": [ + { + "system": "https://fhir.nhs.uk/Id/ods-organization-code", + "value": "testOrg" + } + ] + } + } + ] + } +} + +assert { + res.status: eq 400 + res.body.issue[0].diagnostics: eq ServiceRequest resource not found with provided reference. Provided reference: servicerequest123 +} + +settings { + encodeUrl: true + timeout: 0 +} diff --git a/bruno/APIM/Test_With_Invalid_Identifiers_in_Organization.bru b/bruno/APIM/Test_With_Invalid_Identifiers_in_Organization.bru index 0a9e3cf..7ada3c0 100644 --- a/bruno/APIM/Test_With_Invalid_Identifiers_in_Organization.bru +++ b/bruno/APIM/Test_With_Invalid_Identifiers_in_Organization.bru @@ -1,7 +1,7 @@ meta { name: Test_With_Invalid_Identifiers_in_Organization type: http - seq: 23 + seq: 32 } post { diff --git a/bruno/APIM/Test_With_Invalid_Identifiers_in_Organization_IntEnvi.bru b/bruno/APIM/Test_With_Invalid_Identifiers_in_Organization_IntEnvi.bru new file mode 100644 index 0000000..3025cd7 --- /dev/null +++ b/bruno/APIM/Test_With_Invalid_Identifiers_in_Organization_IntEnvi.bru @@ -0,0 +1,84 @@ +meta { + name: Test_With_Invalid_Identifiers_in_Organization_IntEnvi + type: http + seq: 56 +} + +post { + url: https://int.api.service.nhs.uk/pathology-laboratory-reporting/FHIR/R4/Bundle + body: json + auth: inherit +} + +headers { + Content-Type: application/fhir+json +} + +body:json { + { + "resourceType": "Bundle", + "type": "document", + "entry": [ + { + "fullUrl": "composition", + "resource": { + "resourceType": "Composition", + "extension": [ + { + "url": "http://hl7.eu/fhir/StructureDefinition/composition-basedOn-order-or-requisition", + "valueReference": { + "reference": "servicerequest" + } + } + ], + "subject": { + "identifier": { + "system": "https://fhir.nhs.uk/Id/nhs-number", + "value": "test-nhs-number" + } + } + } + }, + { + "fullUrl": "servicerequest", + "resource": { + "resourceType": "ServiceRequest", + "requester": { + "reference": "practitionerrole" + } + } + }, + { + "fullUrl": "practitionerrole", + "resource": { + "resourceType": "PractitionerRole", + "organization": { + "reference": "organization" + } + } + }, + { + "fullUrl": "organization", + "resource": { + "resourceType": "Organization", + "identifier": [ + { + "system": "http://fhir.nhs.uk/Id/ods-organization-code", + "value": "testorg" + } + ] + } + } + ] + } +} + +assert { + res.status: eq 400 + res.body.issue[0].diagnostics: eq Organization (organization) does not define a supported identifier. Supported system 'https://fhir.nhs.uk/Id/ods-organization-code' +} + +settings { + encodeUrl: true + timeout: 0 +} diff --git a/bruno/APIM/Test_With_Multiple_Bundle_Entries_With_Same_URL.bru b/bruno/APIM/Test_With_Multiple_Bundle_Entries_With_Same_URL.bru index ad21c0a..8c8badf 100644 --- a/bruno/APIM/Test_With_Multiple_Bundle_Entries_With_Same_URL.bru +++ b/bruno/APIM/Test_With_Multiple_Bundle_Entries_With_Same_URL.bru @@ -1,7 +1,7 @@ meta { name: Test_With_Multiple_Bundle_Entries_With_Same_URL type: http - seq: 26 + seq: 35 } post { diff --git a/bruno/APIM/Test_With_Multiple_Bundle_Entries_With_Same_URL_IntEnvi.bru b/bruno/APIM/Test_With_Multiple_Bundle_Entries_With_Same_URL_IntEnvi.bru new file mode 100644 index 0000000..6260695 --- /dev/null +++ b/bruno/APIM/Test_With_Multiple_Bundle_Entries_With_Same_URL_IntEnvi.bru @@ -0,0 +1,105 @@ +meta { + name: Test_With_Multiple_Bundle_Entries_With_Same_URL_IntEnvi + type: http + seq: 58 +} + +post { + url: https://int.api.service.nhs.uk/pathology-laboratory-reporting/FHIR/R4/Bundle + body: json + auth: inherit +} + +headers { + Content-Type: application/fhir+json +} + +body:json { + { + "resourceType": "Bundle", + "type": "document", + "entry": [ + { + "fullUrl": "composition", + "resource": { + "resourceType": "Composition", + "extension": [ + { + "url": "http://hl7.eu/fhir/StructureDefinition/composition-basedOn-order-or-requisition", + "valueReference": { + "reference": "servicerequest" + } + } + ], + "subject": { + "identifier": { + "system": "https://fhir.nhs.uk/Id/nhs-number", + "value": "test-nhs-number" + } + } + } + }, + { + "fullUrl": "servicerequest", + "resource": { + "resourceType": "ServiceRequest", + "requester": { + "reference": "practitionerrole" + } + } + }, + { + "fullUrl": "practitionerrole", + "resource": { + "resourceType": "PractitionerRole", + "organization": { + "reference": "organization" + } + } + }, + { + "fullUrl": "practitionerrole", + "resource": { + "resourceType": "PractitionerRole", + "organization": { + "reference": "organization" + } + } + }, + { + "fullUrl": "organization", + "resource": { + "resourceType": "Organization", + "identifier": [ + { + "system": "https://fhir.nhs.uk/Id/ods-organization-code", + "value": "testOrg" + } + ] + } + }, + { + "fullUrl": "organization", + "resource": { + "resourceType": "Organization", + "identifier": [ + { + "system": "https://fhir.nhs.uk/Id/ods-organization-code", + "value": "testOrg" + } + ] + } + } + ] + } +} + +assert { + res.status: eq 400 + res.body.issue[0].diagnostics: eq Multiple resources provided with same fullUrl: practitionerrole +} + +settings { + encodeUrl: true + timeout: 0 +} diff --git a/bruno/APIM/Test_With_Multiple_Identifiers_For_An_Organisation.bru b/bruno/APIM/Test_With_Multiple_Identifiers_For_An_Organisation.bru index 576acdd..93ac3b3 100644 --- a/bruno/APIM/Test_With_Multiple_Identifiers_For_An_Organisation.bru +++ b/bruno/APIM/Test_With_Multiple_Identifiers_For_An_Organisation.bru @@ -1,7 +1,7 @@ meta { name: Test_With_Multiple_Identifiers_For_An_Organisation type: http - seq: 25 + seq: 34 } post { diff --git a/bruno/APIM/Test_With_Multiple_Identifiers_For_An_Organisation_IntEnvi.bru b/bruno/APIM/Test_With_Multiple_Identifiers_For_An_Organisation_IntEnvi.bru new file mode 100644 index 0000000..c13620e --- /dev/null +++ b/bruno/APIM/Test_With_Multiple_Identifiers_For_An_Organisation_IntEnvi.bru @@ -0,0 +1,88 @@ +meta { + name: Test_With_Multiple_Identifiers_For_An_Organisation_IntEnvi + type: http + seq: 57 +} + +post { + url: https://int.api.service.nhs.uk/pathology-laboratory-reporting/FHIR/R4/Bundle + body: json + auth: inherit +} + +headers { + Content-Type: application/fhir+json +} + +body:json { + { + "resourceType": "Bundle", + "type": "document", + "entry": [ + { + "fullUrl": "composition", + "resource": { + "resourceType": "Composition", + "extension": [ + { + "url": "http://hl7.eu/fhir/StructureDefinition/composition-basedOn-order-or-requisition", + "valueReference": { + "reference": "servicerequest" + } + } + ], + "subject": { + "identifier": { + "system": "https://fhir.nhs.uk/Id/nhs-number", + "value": "test-nhs-number" + } + } + } + }, + { + "fullUrl": "servicerequest", + "resource": { + "resourceType": "ServiceRequest", + "requester": { + "reference": "practitionerrole" + } + } + }, + { + "fullUrl": "practitionerrole", + "resource": { + "resourceType": "PractitionerRole", + "organization": { + "reference": "organization" + } + } + }, + { + "fullUrl": "organization", + "resource": { + "resourceType": "Organization", + "identifier": [ + { + "system": "https://fhir.nhs.uk/Id/ods-organization-code", + "value": "testOrg" + }, + { + "system": "https://fhir.nhs.uk/Id/ods-organization-code", + "value": "secondOrg" + } + ] + } + } + ] + } +} + +assert { + res.status: eq 400 + res.body.issue[0].diagnostics: eq Organization (organization) defines multiple identifier values. Identifier values: ['testOrg', 'secondOrg'] +} + +settings { + encodeUrl: true + timeout: 0 +} diff --git a/bruno/APIM/Test_Without_Composition.bru b/bruno/APIM/Test_Without_Composition.bru index 2092ae5..940e5e0 100644 --- a/bruno/APIM/Test_Without_Composition.bru +++ b/bruno/APIM/Test_Without_Composition.bru @@ -1,7 +1,7 @@ meta { name: Test_Without_Composition type: http - seq: 7 + seq: 11 } post { diff --git a/bruno/APIM/Test_Without_Composition_IntEnvi.bru b/bruno/APIM/Test_Without_Composition_IntEnvi.bru new file mode 100644 index 0000000..840a009 --- /dev/null +++ b/bruno/APIM/Test_Without_Composition_IntEnvi.bru @@ -0,0 +1,64 @@ +meta { + name: Test_Without_Composition_IntEnvi + type: http + seq: 40 +} + +post { + url: https://int.api.service.nhs.uk/pathology-laboratory-reporting/FHIR/R4/Bundle + body: json + auth: inherit +} + +headers { + Content-Type: application/fhir+json +} + +body:json { + { + "resourceType": "Bundle", + "type": "document", + "entry": [ + { + "fullUrl": "servicerequest", + "resource": { + "resourceType": "ServiceRequest", + "requester": { + "reference": "practitionerrole" + } + } + }, + { + "fullUrl": "practitionerrole", + "resource": { + "resourceType": "PractitionerRole", + "organization": { + "reference": "organization" + } + } + }, + { + "fullUrl": "organization", + "resource": { + "resourceType": "Organization", + "identifier": [ + { + "system": "https://fhir.nhs.uk/Id/ods-organization-code", + "value": "testOrg" + } + ] + } + } + ] + } +} + +assert { + res.status: eq 400 + res.body.issue[0].diagnostics: eq Document must include a single Composition resource +} + +settings { + encodeUrl: true + timeout: 0 +} diff --git a/bruno/APIM/Test_Without_Extension_URL_is_incorrect.bru b/bruno/APIM/Test_Without_Extension_URL_is_incorrect.bru index 89b771f..c506aa3 100644 --- a/bruno/APIM/Test_Without_Extension_URL_is_incorrect.bru +++ b/bruno/APIM/Test_Without_Extension_URL_is_incorrect.bru @@ -1,7 +1,7 @@ meta { name: Test_Without_Extension_URL_is_incorrect type: http - seq: 10 + seq: 17 } post { diff --git a/bruno/APIM/Test_Without_Extension_URL_is_incorrect_IntEnvi.bru b/bruno/APIM/Test_Without_Extension_URL_is_incorrect_IntEnvi.bru new file mode 100644 index 0000000..f415fd3 --- /dev/null +++ b/bruno/APIM/Test_Without_Extension_URL_is_incorrect_IntEnvi.bru @@ -0,0 +1,84 @@ +meta { + name: Test_Without_Extension_URL_is_incorrect_IntEnvi + type: http + seq: 43 +} + +post { + url: https://int.api.service.nhs.uk/pathology-laboratory-reporting/FHIR/R4/Bundle + body: json + auth: inherit +} + +headers { + Content-Type: application/fhir+json +} + +body:json { + { + "resourceType": "Bundle", + "type": "document", + "entry": [ + { + "fullUrl": "composition", + "resource": { + "resourceType": "Composition", + "extension": [ + { + "url": "https://hl7.eu/fhir/StructureDefinition/composition-basedOn-order-or-requisition", + "valueReference": { + "reference": "servicerequest" + } + } + ], + "subject": { + "identifier": { + "system": "https://fhir.nhs.uk/Id/nhs-number", + "value": "test-nhs-number" + } + } + } + }, + { + "fullUrl": "servicerequest", + "resource": { + "resourceType": "ServiceRequest", + "requester": { + "reference": "practitionerrole" + } + } + }, + { + "fullUrl": "practitionerrole", + "resource": { + "resourceType": "PractitionerRole", + "organization": { + "reference": "organization" + } + } + }, + { + "fullUrl": "organization", + "resource": { + "resourceType": "Organization", + "identifier": [ + { + "system": "https://fhir.nhs.uk/Id/ods-organization-code", + "value": "testOrg" + } + ] + } + } + ] + } +} + +assert { + res.status: eq 400 + res.body.issue[0].diagnostics: eq Composition does not define a valid basedOn-order-or-requisition extension +} + +settings { + encodeUrl: true + timeout: 0 +} diff --git a/bruno/APIM/Test_Without_Extension_in_Composition.bru b/bruno/APIM/Test_Without_Extension_in_Composition.bru index 522b920..db043c2 100644 --- a/bruno/APIM/Test_Without_Extension_in_Composition.bru +++ b/bruno/APIM/Test_Without_Extension_in_Composition.bru @@ -1,7 +1,7 @@ meta { name: Test_Without_Extension_in_Composition type: http - seq: 8 + seq: 13 } post { diff --git a/bruno/APIM/Test_Without_Extension_in_Composition_IntEnvi.bru b/bruno/APIM/Test_Without_Extension_in_Composition_IntEnvi.bru new file mode 100644 index 0000000..df02035 --- /dev/null +++ b/bruno/APIM/Test_Without_Extension_in_Composition_IntEnvi.bru @@ -0,0 +1,76 @@ +meta { + name: Test_Without_Extension_in_Composition_IntEnvi + type: http + seq: 41 +} + +post { + url: https://int.api.service.nhs.uk/pathology-laboratory-reporting/FHIR/R4/Bundle + body: json + auth: inherit +} + +headers { + Content-Type: application/fhir+json +} + +body:json { + { + "resourceType": "Bundle", + "type": "document", + "entry": [ + { + "fullUrl": "composition", + "resource": { + "resourceType": "Composition", + "subject": { + "identifier": { + "system": "https://fhir.nhs.uk/Id/nhs-number", + "value": "test-nhs-number" + } + } + } + }, + { + "fullUrl": "servicerequest", + "resource": { + "resourceType": "ServiceRequest", + "requester": { + "reference": "practitionerrole" + } + } + }, + { + "fullUrl": "practitionerrole", + "resource": { + "resourceType": "PractitionerRole", + "organization": { + "reference": "organization" + } + } + }, + { + "fullUrl": "organization", + "resource": { + "resourceType": "Organization", + "identifier": [ + { + "system": "https://fhir.nhs.uk/Id/ods-organization-code", + "value": "testOrg" + } + ] + } + } + ] + } +} + +assert { + res.status: eq 400 + res.body.issue[0].diagnostics: eq Composition does not define a valid basedOn-order-or-requisition extension +} + +settings { + encodeUrl: true + timeout: 0 +} diff --git a/bruno/APIM/Test_Without_Organization.bru b/bruno/APIM/Test_Without_Organization.bru index 281ebdc..0c600ad 100644 --- a/bruno/APIM/Test_Without_Organization.bru +++ b/bruno/APIM/Test_Without_Organization.bru @@ -1,7 +1,7 @@ meta { name: Test_Without_Organization type: http - seq: 6 + seq: 9 } post { diff --git a/bruno/APIM/Test_Without_Organization_Identifier.bru b/bruno/APIM/Test_Without_Organization_Identifier.bru index 1fefdf2..2aa0cba 100644 --- a/bruno/APIM/Test_Without_Organization_Identifier.bru +++ b/bruno/APIM/Test_Without_Organization_Identifier.bru @@ -1,7 +1,7 @@ meta { name: Test_Without_Organization_Identifier type: http - seq: 17 + seq: 26 } post { diff --git a/bruno/APIM/Test_Without_Organization_Identifier_IntEnvi.bru b/bruno/APIM/Test_Without_Organization_Identifier_IntEnvi.bru new file mode 100644 index 0000000..e563d9d --- /dev/null +++ b/bruno/APIM/Test_Without_Organization_Identifier_IntEnvi.bru @@ -0,0 +1,78 @@ +meta { + name: Test_Without_Organization_Identifier_IntEnvi + type: http + seq: 52 +} + +post { + url: https://int.api.service.nhs.uk/pathology-laboratory-reporting/FHIR/R4/Bundle + body: json + auth: inherit +} + +headers { + Content-Type: application/fhir+json +} + +body:json { + { + "resourceType": "Bundle", + "type": "document", + "entry": [ + { + "fullUrl": "composition", + "resource": { + "resourceType": "Composition", + "extension": [ + { + "url": "http://hl7.eu/fhir/StructureDefinition/composition-basedOn-order-or-requisition", + "valueReference": { + "reference": "servicerequest" + } + } + ], + "subject": { + "identifier": { + "system": "https://fhir.nhs.uk/Id/nhs-number", + "value": "test-nhs-number" + } + } + } + }, + { + "fullUrl": "servicerequest", + "resource": { + "resourceType": "ServiceRequest", + "requester": { + "reference": "practitionerrole" + } + } + }, + { + "fullUrl": "practitionerrole", + "resource": { + "resourceType": "PractitionerRole", + "organization": { + "reference": "organization" + } + } + }, + { + "fullUrl": "organization", + "resource": { + "resourceType": "Organization" + } + } + ] + } +} + +assert { + res.status: eq 400 + res.body.issue[0].diagnostics: eq Organisation (organization) does not define a valid subject identifier +} + +settings { + encodeUrl: true + timeout: 0 +} diff --git a/bruno/APIM/Test_Without_Organization_Identifier_Value.bru b/bruno/APIM/Test_Without_Organization_Identifier_Value.bru index d659c0a..7837322 100644 --- a/bruno/APIM/Test_Without_Organization_Identifier_Value.bru +++ b/bruno/APIM/Test_Without_Organization_Identifier_Value.bru @@ -1,7 +1,7 @@ meta { name: Test_Without_Organization_Identifier_Value type: http - seq: 20 + seq: 29 } post { diff --git a/bruno/APIM/Test_Without_Organization_Identifier_Value_IntEnvi.bru b/bruno/APIM/Test_Without_Organization_Identifier_Value_IntEnvi.bru new file mode 100644 index 0000000..48da217 --- /dev/null +++ b/bruno/APIM/Test_Without_Organization_Identifier_Value_IntEnvi.bru @@ -0,0 +1,83 @@ +meta { + name: Test_Without_Organization_Identifier_Value_IntEnvi + type: http + seq: 55 +} + +post { + url: https://int.api.service.nhs.uk/pathology-laboratory-reporting/FHIR/R4/Bundle + body: json + auth: inherit +} + +headers { + Content-Type: application/fhir+json +} + +body:json { + { + "resourceType": "Bundle", + "type": "document", + "entry": [ + { + "fullUrl": "composition", + "resource": { + "resourceType": "Composition", + "extension": [ + { + "url": "http://hl7.eu/fhir/StructureDefinition/composition-basedOn-order-or-requisition", + "valueReference": { + "reference": "servicerequest" + } + } + ], + "subject": { + "identifier": { + "system": "https://fhir.nhs.uk/Id/nhs-number", + "value": "test-nhs-number" + } + } + } + }, + { + "fullUrl": "servicerequest", + "resource": { + "resourceType": "ServiceRequest", + "requester": { + "reference": "practitionerrole" + } + } + }, + { + "fullUrl": "practitionerrole", + "resource": { + "resourceType": "PractitionerRole", + "organization": { + "reference": "organization" + } + } + }, + { + "fullUrl": "organization", + "resource": { + "resourceType": "Organization", + "identifier": [ + { + "system": "https://fhir.nhs.uk/Id/ods-organization-code" + } + ] + } + } + ] + } +} + +assert { + res.status: eq 400 + res.body.issue[0].diagnostics: eq ('entry', 3, 'resource', 'identifier', 0, 'value') - Field required \n +} + +settings { + encodeUrl: true + timeout: 0 +} diff --git a/bruno/APIM/Test_Without_Organization_IntEnvi.bru b/bruno/APIM/Test_Without_Organization_IntEnvi.bru new file mode 100644 index 0000000..af71491 --- /dev/null +++ b/bruno/APIM/Test_Without_Organization_IntEnvi.bru @@ -0,0 +1,72 @@ +meta { + name: Test_Without_Organization_IntEnvi + type: http + seq: 39 +} + +post { + url: https://int.api.service.nhs.uk/pathology-laboratory-reporting/FHIR/R4/Bundle + body: json + auth: inherit +} + +headers { + Content-Type: application/fhir+json +} + +body:json { + { + "resourceType": "Bundle", + "type": "document", + "entry": [ + { + "fullUrl": "composition", + "resource": { + "resourceType": "Composition", + "extension": [ + { + "url": "http://hl7.eu/fhir/StructureDefinition/composition-basedOn-order-or-requisition", + "valueReference": { + "reference": "servicerequest" + } + } + ], + "subject": { + "identifier": { + "system": "https://fhir.nhs.uk/Id/nhs-number", + "value": "test-nhs-number" + } + } + } + }, + { + "fullUrl": "servicerequest", + "resource": { + "resourceType": "ServiceRequest", + "requester": { + "reference": "practitionerrole" + } + } + }, + { + "fullUrl": "practitionerrole", + "resource": { + "resourceType": "PractitionerRole", + "organization": { + "reference": "organization" + } + } + } + ] + } +} + +assert { + res.status: eq 400 + res.body.issue[0].diagnostics: eq Document must include an Organization resource +} + +settings { + encodeUrl: true + timeout: 0 +} diff --git a/bruno/APIM/Test_Without_Organization_Invalid_System.bru b/bruno/APIM/Test_Without_Organization_Invalid_System.bru index 4c8f2dc..d9ba2c1 100644 --- a/bruno/APIM/Test_Without_Organization_Invalid_System.bru +++ b/bruno/APIM/Test_Without_Organization_Invalid_System.bru @@ -1,7 +1,7 @@ meta { name: Test_Without_Organization_Invalid_System type: http - seq: 21 + seq: 30 } post { diff --git a/bruno/APIM/Test_Without_Organization_Invalid_System_IntEnvi.bru b/bruno/APIM/Test_Without_Organization_Invalid_System_IntEnvi.bru new file mode 100644 index 0000000..d7263f8 --- /dev/null +++ b/bruno/APIM/Test_Without_Organization_Invalid_System_IntEnvi.bru @@ -0,0 +1,84 @@ +meta { + name: Test_Without_Organization_Invalid_System_IntEnvi + type: http + seq: 67 +} + +post { + url: https://int.api.service.nhs.uk/pathology-laboratory-reporting/FHIR/R4/Bundle + body: json + auth: inherit +} + +headers { + Content-Type: application/fhir+json +} + +body:json { + { + "resourceType": "Bundle", + "type": "document", + "entry": [ + { + "fullUrl": "composition", + "resource": { + "resourceType": "Composition", + "extension": [ + { + "url": "http://hl7.eu/fhir/StructureDefinition/composition-basedOn-order-or-requisition", + "valueReference": { + "reference": "servicerequest" + } + } + ], + "subject": { + "identifier": { + "system": "https://fhir.nhs.uk/Id/nhs-number", + "value": "test-nhs-number" + } + } + } + }, + { + "fullUrl": "servicerequest", + "resource": { + "resourceType": "ServiceRequest", + "requester": { + "reference": "practitionerrole" + } + } + }, + { + "fullUrl": "practitionerrole", + "resource": { + "resourceType": "PractitionerRole", + "organization": { + "reference": "organization" + } + } + }, + { + "fullUrl": "organization", + "resource": { + "resourceType": "Organization", + "identifier": [ + { + "system": "http://fhir.nhs.uk/Id/ods-organization-code", + "value": "testOrg" + } + ] + } + } + ] + } +} + +assert { + res.status: eq 400 + res.body.issue[0].diagnostics: eq Organization (organization) does not define a supported identifier. Supported system 'https://fhir.nhs.uk/Id/ods-organization-code' +} + +settings { + encodeUrl: true + timeout: 0 +} diff --git a/bruno/APIM/Test_Without_Organization_Invalid_Value.bru b/bruno/APIM/Test_Without_Organization_Invalid_Value.bru index 8b79c68..c3016f2 100644 --- a/bruno/APIM/Test_Without_Organization_Invalid_Value.bru +++ b/bruno/APIM/Test_Without_Organization_Invalid_Value.bru @@ -1,7 +1,7 @@ meta { name: Test_Without_Organization_Invalid_Value type: http - seq: 22 + seq: 31 } post { diff --git a/bruno/APIM/Test_Without_Organization_Invalid_Value_IntEnvi.bru b/bruno/APIM/Test_Without_Organization_Invalid_Value_IntEnvi.bru new file mode 100644 index 0000000..26596e3 --- /dev/null +++ b/bruno/APIM/Test_Without_Organization_Invalid_Value_IntEnvi.bru @@ -0,0 +1,84 @@ +meta { + name: Test_Without_Organization_Invalid_Value_IntEnvi + type: http + seq: 68 +} + +post { + url: https://int.api.service.nhs.uk/pathology-laboratory-reporting/FHIR/R4/Bundle + body: json + auth: inherit +} + +headers { + Content-Type: application/fhir+json +} + +body:json { + { + "resourceType": "Bundle", + "type": "document", + "entry": [ + { + "fullUrl": "composition", + "resource": { + "resourceType": "Composition", + "extension": [ + { + "url": "http://hl7.eu/fhir/StructureDefinition/composition-basedOn-order-or-requisition", + "valueReference": { + "reference": "servicerequest" + } + } + ], + "subject": { + "identifier": { + "system": "https://fhir.nhs.uk/Id/nhs-number", + "value": "test-nhs-number" + } + } + } + }, + { + "fullUrl": "servicerequest", + "resource": { + "resourceType": "ServiceRequest", + "requester": { + "reference": "practitionerrole" + } + } + }, + { + "fullUrl": "practitionerrole", + "resource": { + "resourceType": "PractitionerRole", + "organization": { + "reference": "organization" + } + } + }, + { + "fullUrl": "organization", + "resource": { + "resourceType": "Organization", + "identifier": [ + { + "system": "https://fhir.nhs.uk/Id/ods-organization-code", + "value": 123 + } + ] + } + } + ] + } +} + +assert { + res.status: eq 400 + res.body.issue[0].diagnostics: eq ('entry', 3, 'resource', 'identifier', 0, 'value') - Input should be a valid string \n +} + +settings { + encodeUrl: true + timeout: 0 +} diff --git a/bruno/APIM/Test_Without_Organization_System.bru b/bruno/APIM/Test_Without_Organization_System.bru index 6acd7fa..8e6b0ec 100644 --- a/bruno/APIM/Test_Without_Organization_System.bru +++ b/bruno/APIM/Test_Without_Organization_System.bru @@ -1,7 +1,7 @@ meta { name: Test_Without_Organization_System type: http - seq: 19 + seq: 28 } post { diff --git a/bruno/APIM/Test_Without_Organization_System_IntEnvi.bru b/bruno/APIM/Test_Without_Organization_System_IntEnvi.bru new file mode 100644 index 0000000..ea954cd --- /dev/null +++ b/bruno/APIM/Test_Without_Organization_System_IntEnvi.bru @@ -0,0 +1,78 @@ +meta { + name: Test_Without_Organization_System_IntEnvi + type: http + seq: 54 +} + +post { + url: https://int.api.service.nhs.uk/pathology-laboratory-reporting/FHIR/R4/Bundle + body: json + auth: inherit +} + +headers { + Content-Type: application/fhir+json +} + +body:json { + { + "resourceType": "Bundle", + "type": "document", + "entry": [ + { + "fullUrl": "composition", + "resource": { + "resourceType": "Composition", + "extension": [ + { + "url": "http://hl7.eu/fhir/StructureDefinition/composition-basedOn-order-or-requisition", + "valueReference": { + "reference": "servicerequest" + } + } + ], + "subject": { + "identifier": { + "system": "https://fhir.nhs.uk/Id/nhs-number", + "value": "test-nhs-number" + } + } + } + }, + { + "fullUrl": "servicerequest", + "resource": { + "resourceType": "ServiceRequest", + "requester": { + "reference": "practitionerrole" + } + } + }, + { + "fullUrl": "practitionerrole", + "resource": { + "resourceType": "PractitionerRole", + "organization": { + "reference": "organization" + } + } + }, + { + "fullUrl": "organization", + "resource": { + "resourceType": "Organization" + } + } + ] + } +} + +assert { + res.status: eq 400 + res.body.issue[0].diagnostics: eq Organisation (organization) does not define a valid subject identifier +} + +settings { + encodeUrl: true + timeout: 0 +} diff --git a/bruno/APIM/Test_Without_PractionerRole.bru b/bruno/APIM/Test_Without_PractionerRole.bru index c96c881..4f8e77f 100644 --- a/bruno/APIM/Test_Without_PractionerRole.bru +++ b/bruno/APIM/Test_Without_PractionerRole.bru @@ -1,7 +1,7 @@ meta { name: Test_Without_PractionerRole type: http - seq: 5 + seq: 7 } post { diff --git a/bruno/APIM/Test_Without_PractionerRole_IntEnvi.bru b/bruno/APIM/Test_Without_PractionerRole_IntEnvi.bru new file mode 100644 index 0000000..b4b8711 --- /dev/null +++ b/bruno/APIM/Test_Without_PractionerRole_IntEnvi.bru @@ -0,0 +1,75 @@ +meta { + name: Test_Without_PractionerRole_IntEnvi + type: http + seq: 38 +} + +post { + url: https://int.api.service.nhs.uk/pathology-laboratory-reporting/FHIR/R4/Bundle + body: json + auth: inherit +} + +headers { + Content-Type: application/fhir+json +} + +body:json { + { + "resourceType": "Bundle", + "type": "document", + "entry": [ + { + "fullUrl": "composition", + "resource": { + "resourceType": "Composition", + "extension": [ + { + "url": "http://hl7.eu/fhir/StructureDefinition/composition-basedOn-order-or-requisition", + "valueReference": { + "reference": "servicerequest" + } + } + ], + "subject": { + "identifier": { + "system": "https://fhir.nhs.uk/Id/nhs-number", + "value": "test-nhs-number" + } + } + } + }, + { + "fullUrl": "servicerequest", + "resource": { + "resourceType": "ServiceRequest", + "requester": { + "reference": "practitionerrole" + } + } + }, + { + "fullUrl": "organization", + "resource": { + "resourceType": "Organization", + "identifier": [ + { + "system": "https://fhir.nhs.uk/Id/ods-organization-code", + "value": "testOrg" + } + ] + } + } + ] + } +} + +assert { + res.status: eq 400 + res.body.issue[0].diagnostics: eq Document must include a PractitionerRole resource +} + +settings { + encodeUrl: true + timeout: 0 +} diff --git a/bruno/APIM/Test_Without_PractionerRole_On_ServiceRequest_Requester_Reference.bru b/bruno/APIM/Test_Without_PractionerRole_On_ServiceRequest_Requester_Reference.bru index 086a411..41040f0 100644 --- a/bruno/APIM/Test_Without_PractionerRole_On_ServiceRequest_Requester_Reference.bru +++ b/bruno/APIM/Test_Without_PractionerRole_On_ServiceRequest_Requester_Reference.bru @@ -1,7 +1,7 @@ meta { name: Test_Without_PractionerRole_On_ServiceRequest_Requester_Reference type: http - seq: 24 + seq: 33 } post { diff --git a/bruno/APIM/Test_Without_PractionerRole_On_ServiceRequest_Requester_Reference_IntEnvi.bru b/bruno/APIM/Test_Without_PractionerRole_On_ServiceRequest_Requester_Reference_IntEnvi.bru new file mode 100644 index 0000000..40123fa --- /dev/null +++ b/bruno/APIM/Test_Without_PractionerRole_On_ServiceRequest_Requester_Reference_IntEnvi.bru @@ -0,0 +1,75 @@ +meta { + name: Test_Without_PractionerRole_On_ServiceRequest_Requester_Reference_IntEnvi + type: http + seq: 59 +} + +post { + url: https://int.api.service.nhs.uk/pathology-laboratory-reporting/FHIR/R4/Bundle + body: json + auth: inherit +} + +headers { + Content-Type: application/fhir+json +} + +body:json { + { + "resourceType": "Bundle", + "type": "document", + "entry": [ + { + "fullUrl": "composition", + "resource": { + "resourceType": "Composition", + "extension": [ + { + "url": "http://hl7.eu/fhir/StructureDefinition/composition-basedOn-order-or-requisition", + "valueReference": { + "reference": "servicerequest" + } + } + ], + "subject": { + "identifier": { + "system": "https://fhir.nhs.uk/Id/nhs-number", + "value": "test-nhs-number" + } + } + } + }, + { + "fullUrl": "servicerequest", + "resource": { + "resourceType": "ServiceRequest", + "requester": { + "reference": "Testrole" + } + } + }, + { + "fullUrl": "organization", + "resource": { + "resourceType": "Organization", + "identifier": [ + { + "system": "https://fhir.nhs.uk/Id/ods-organization-code", + "value": "testOrg" + } + ] + } + } + ] + } +} + +assert { + res.status: eq 400 + res.body.issue[0].diagnostics: eq "Document must include a PractitionerRole resource" +} + +settings { + encodeUrl: true + timeout: 0 +} diff --git a/bruno/APIM/Test_Without_PractionerRole_Reference.bru b/bruno/APIM/Test_Without_PractionerRole_Reference.bru index cae9d24..5a22877 100644 --- a/bruno/APIM/Test_Without_PractionerRole_Reference.bru +++ b/bruno/APIM/Test_Without_PractionerRole_Reference.bru @@ -1,7 +1,7 @@ meta { name: Test_Without_PractionerRole_Reference type: http - seq: 16 + seq: 25 } post { diff --git a/bruno/APIM/Test_Without_PractionerRole_Reference_IntEnvi.bru b/bruno/APIM/Test_Without_PractionerRole_Reference_IntEnvi.bru new file mode 100644 index 0000000..2c68c04 --- /dev/null +++ b/bruno/APIM/Test_Without_PractionerRole_Reference_IntEnvi.bru @@ -0,0 +1,84 @@ +meta { + name: Test_Without_PractionerRole_Reference_IntEnvi + type: http + seq: 51 +} + +post { + url: https://int.api.service.nhs.uk/pathology-laboratory-reporting/FHIR/R4/Bundle + body: json + auth: inherit +} + +headers { + Content-Type: application/fhir+json +} + +body:json { + { + "resourceType": "Bundle", + "type": "document", + "entry": [ + { + "fullUrl": "composition", + "resource": { + "resourceType": "Composition", + "extension": [ + { + "url": "http://hl7.eu/fhir/StructureDefinition/composition-basedOn-order-or-requisition", + "valueReference": { + "reference": "servicerequest" + } + } + ], + "subject": { + "identifier": { + "system": "https://fhir.nhs.uk/Id/nhs-number", + "value": "test-nhs-number" + } + } + } + }, + { + "fullUrl": "servicerequest", + "resource": { + "resourceType": "ServiceRequest", + "requester": { + "reference": "practitionerrole" + } + } + }, + { + "fullUrl": "practitionerrole", + "resource": { + "resourceType": "PractitionerRole", + "organization": { + "reference": "" + } + } + }, + { + "fullUrl": "organization", + "resource": { + "resourceType": "Organization", + "identifier": [ + { + "system": "https://fhir.nhs.uk/Id/ods-organization-code", + "value": "testOrg" + } + ] + } + } + ] + } +} + +assert { + res.status: eq 400 + res.body.issue[0].diagnostics: eq "Organization resource not found with provided reference. Provided reference: " +} + +settings { + encodeUrl: true + timeout: 0 +} diff --git a/bruno/APIM/Test_Without_PractionerRole_Reference_Value.bru b/bruno/APIM/Test_Without_PractionerRole_Reference_Value.bru index e25e758..ab02779 100644 --- a/bruno/APIM/Test_Without_PractionerRole_Reference_Value.bru +++ b/bruno/APIM/Test_Without_PractionerRole_Reference_Value.bru @@ -1,7 +1,7 @@ meta { name: Test_Without_PractionerRole_Reference_Value type: http - seq: 17 + seq: 27 } post { diff --git a/bruno/APIM/Test_Without_PractionerRole_Reference_Value_IntEnvi.bru b/bruno/APIM/Test_Without_PractionerRole_Reference_Value_IntEnvi.bru new file mode 100644 index 0000000..78676f0 --- /dev/null +++ b/bruno/APIM/Test_Without_PractionerRole_Reference_Value_IntEnvi.bru @@ -0,0 +1,83 @@ +meta { + name: Test_Without_PractionerRole_Reference_Value_IntEnvi + type: http + seq: 53 +} + +post { + url: https://int.api.service.nhs.uk/pathology-laboratory-reporting/FHIR/R4/Bundle + body: json + auth: inherit +} + +headers { + Content-Type: application/fhir+json +} + +body:json { + { + "resourceType": "Bundle", + "type": "document", + "entry": [ + { + "fullUrl": "composition", + "resource": { + "resourceType": "Composition", + "extension": [ + { + "url": "http://hl7.eu/fhir/StructureDefinition/composition-basedOn-order-or-requisition", + "valueReference": { + "reference": "servicerequest" + } + } + ], + "subject": { + "identifier": { + "system": "https://fhir.nhs.uk/Id/nhs-number", + "value": "test-nhs-number" + } + } + } + }, + { + "fullUrl": "servicerequest", + "resource": { + "resourceType": "ServiceRequest", + "requester": { + "reference": "practitionerrole" + } + } + }, + { + "fullUrl": "practitionerrole", + "resource": { + "resourceType": "PractitionerRole", + "organization": { + } + } + }, + { + "fullUrl": "organization", + "resource": { + "resourceType": "Organization", + "identifier": [ + { + "system": "https://fhir.nhs.uk/Id/ods-organization-code", + "value": "testOrg" + } + ] + } + } + ] + } +} + +assert { + res.status: eq 400 + res.body.issue[0].diagnostics: eq ('entry', 2, 'resource', 'organization', 'reference') - Field required \n +} + +settings { + encodeUrl: true + timeout: 0 +} diff --git a/bruno/APIM/Test_Without_Reference_in_Extension.bru b/bruno/APIM/Test_Without_Reference_in_Extension.bru index df62721..48a876e 100644 --- a/bruno/APIM/Test_Without_Reference_in_Extension.bru +++ b/bruno/APIM/Test_Without_Reference_in_Extension.bru @@ -1,7 +1,7 @@ meta { name: Test_Without_Reference_in_Extension type: http - seq: 11 + seq: 18 } post { diff --git a/bruno/APIM/Test_Without_Reference_in_Extension_IntEnvi.bru b/bruno/APIM/Test_Without_Reference_in_Extension_IntEnvi.bru new file mode 100644 index 0000000..d122ce5 --- /dev/null +++ b/bruno/APIM/Test_Without_Reference_in_Extension_IntEnvi.bru @@ -0,0 +1,76 @@ +meta { + name: Test_Without_Reference_in_Extension_IntEnvi + type: http + seq: 44 +} + +post { + url: https://int.api.service.nhs.uk/pathology-laboratory-reporting/FHIR/R4/Bundle + body: json + auth: inherit +} + +headers { + Content-Type: application/fhir+json +} + +body:json { + { + "resourceType": "Bundle", + "type": "document", + "entry": [ + { + "fullUrl": "composition", + "resource": { + "resourceType": "Composition", + "subject": { + "identifier": { + "system": "https://fhir.nhs.uk/Id/nhs-number", + "value": "test-nhs-number" + } + } + } + }, + { + "fullUrl": "servicerequest", + "resource": { + "resourceType": "ServiceRequest", + "requester": { + "reference": "practitionerrole" + } + } + }, + { + "fullUrl": "practitionerrole", + "resource": { + "resourceType": "PractitionerRole", + "organization": { + "reference": "organization" + } + } + }, + { + "fullUrl": "organization", + "resource": { + "resourceType": "Organization", + "identifier": [ + { + "system": "https://fhir.nhs.uk/Id/ods-organization-code", + "value": "testOrg" + } + ] + } + } + ] + } +} + +assert { + res.status: eq 400 + res.body.issue[0].diagnostics: eq Composition does not define a valid basedOn-order-or-requisition extension +} + +settings { + encodeUrl: true + timeout: 0 +} diff --git a/bruno/APIM/Test_Without_ServiceRequest_IntEnvi.bru b/bruno/APIM/Test_Without_ServiceRequest_IntEnvi.bru new file mode 100644 index 0000000..a272a98 --- /dev/null +++ b/bruno/APIM/Test_Without_ServiceRequest_IntEnvi.bru @@ -0,0 +1,75 @@ +meta { + name: Test_Without_ServiceRequest_IntEnvi + type: http + seq: 37 +} + +post { + url: https://int.api.service.nhs.uk/pathology-laboratory-reporting/FHIR/R4/Bundle + body: json + auth: inherit +} + +headers { + Content-Type: application/fhir+json +} + +body:json { + { + "resourceType": "Bundle", + "type": "document", + "entry": [ + { + "fullUrl": "composition", + "resource": { + "resourceType": "Composition", + "extension": [ + { + "url": "http://hl7.eu/fhir/StructureDefinition/composition-basedOn-order-or-requisition", + "valueReference": { + "reference": "servicerequest" + } + } + ], + "subject": { + "identifier": { + "system": "https://fhir.nhs.uk/Id/nhs-number", + "value": "test-nhs-number" + } + } + } + }, + { + "fullUrl": "practitionerrole", + "resource": { + "resourceType": "PractitionerRole", + "organization": { + "reference": "organization" + } + } + }, + { + "fullUrl": "organization", + "resource": { + "resourceType": "Organization", + "identifier": [ + { + "system": "https://fhir.nhs.uk/Id/ods-organization-code", + "value": "testOrg" + } + ] + } + } + ] + } +} + +assert { + res.status: eq 400 + res.body.issue[0].diagnostics: eq Document must include a ServiceRequest resource +} + +settings { + encodeUrl: true + timeout: 0 +} diff --git a/bruno/APIM/Test_Without_ServiceRequest_Requester.bru b/bruno/APIM/Test_Without_ServiceRequest_Requester.bru index 4a2c38a..ac653fd 100644 --- a/bruno/APIM/Test_Without_ServiceRequest_Requester.bru +++ b/bruno/APIM/Test_Without_ServiceRequest_Requester.bru @@ -1,7 +1,7 @@ meta { name: Test_Without_ServiceRequest_Requester type: http - seq: 14 + seq: 23 } post { diff --git a/bruno/APIM/Test_Without_ServiceRequest_Requester_IntEnvi.bru b/bruno/APIM/Test_Without_ServiceRequest_Requester_IntEnvi.bru new file mode 100644 index 0000000..cf59d00 --- /dev/null +++ b/bruno/APIM/Test_Without_ServiceRequest_Requester_IntEnvi.bru @@ -0,0 +1,81 @@ +meta { + name: Test_Without_ServiceRequest_Requester_IntEnvi + type: http + seq: 49 +} + +post { + url: https://int.api.service.nhs.uk/pathology-laboratory-reporting/FHIR/R4/Bundle + body: json + auth: inherit +} + +headers { + Content-Type: application/fhir+json +} + +body:json { + { + "resourceType": "Bundle", + "type": "document", + "entry": [ + { + "fullUrl": "composition", + "resource": { + "resourceType": "Composition", + "extension": [ + { + "url": "http://hl7.eu/fhir/StructureDefinition/composition-basedOn-order-or-requisition", + "valueReference": { + "reference": "servicerequest" + } + } + ], + "subject": { + "identifier": { + "system": "https://fhir.nhs.uk/Id/nhs-number", + "value": "test-nhs-number" + } + } + } + }, + { + "fullUrl": "servicerequest", + "resource": { + "resourceType": "ServiceRequest" + } + }, + { + "fullUrl": "practitionerrole", + "resource": { + "resourceType": "PractitionerRole", + "organization": { + "reference": "organization" + } + } + }, + { + "fullUrl": "organization", + "resource": { + "resourceType": "Organization", + "identifier": [ + { + "system": "https://fhir.nhs.uk/Id/ods-organization-code", + "value": "testOrg" + } + ] + } + } + ] + } +} + +assert { + res.status: eq 400 + res.body.issue[0].diagnostics: eq ServiceRequest does not define a valid requester +} + +settings { + encodeUrl: true + timeout: 0 +} diff --git a/bruno/APIM/Test_Without_ServiceRequest_Requester_Reference.bru b/bruno/APIM/Test_Without_ServiceRequest_Requester_Reference.bru index 8dbdbe6..982105a 100644 --- a/bruno/APIM/Test_Without_ServiceRequest_Requester_Reference.bru +++ b/bruno/APIM/Test_Without_ServiceRequest_Requester_Reference.bru @@ -1,7 +1,7 @@ meta { name: Test_Without_ServiceRequest_Requester_Reference type: http - seq: 15 + seq: 24 } post { diff --git a/bruno/APIM/Test_Without_ServiceRequest_Requester_Reference_IntEnvi.bru b/bruno/APIM/Test_Without_ServiceRequest_Requester_Reference_IntEnvi.bru new file mode 100644 index 0000000..b57cd76 --- /dev/null +++ b/bruno/APIM/Test_Without_ServiceRequest_Requester_Reference_IntEnvi.bru @@ -0,0 +1,81 @@ +meta { + name: Test_Without_ServiceRequest_Requester_Reference_IntEnvi + type: http + seq: 50 +} + +post { + url: https://int.api.service.nhs.uk/pathology-laboratory-reporting/FHIR/R4/Bundle + body: json + auth: inherit +} + +headers { + Content-Type: application/fhir+json +} + +body:json { + { + "resourceType": "Bundle", + "type": "document", + "entry": [ + { + "fullUrl": "composition", + "resource": { + "resourceType": "Composition", + "extension": [ + { + "url": "http://hl7.eu/fhir/StructureDefinition/composition-basedOn-order-or-requisition", + "valueReference": { + "reference": "servicerequest" + } + } + ], + "subject": { + "identifier": { + "system": "https://fhir.nhs.uk/Id/nhs-number", + "value": "test-nhs-number" + } + } + } + }, + { + "fullUrl": "servicerequest", + "resource": { + "resourceType": "ServiceRequest" + } + }, + { + "fullUrl": "practitionerrole", + "resource": { + "resourceType": "PractitionerRole", + "organization": { + "reference": "organization" + } + } + }, + { + "fullUrl": "organization", + "resource": { + "resourceType": "Organization", + "identifier": [ + { + "system": "https://fhir.nhs.uk/Id/ods-organization-code", + "value": "testOrg" + } + ] + } + } + ] + } +} + +assert { + res.status: eq 400 + res.body.issue[0].diagnostics: eq ServiceRequest does not define a valid requester +} + +settings { + encodeUrl: true + timeout: 0 +} diff --git a/bruno/APIM/Test_Without_ServiceRequest_Resource.bru b/bruno/APIM/Test_Without_ServiceRequest_Resource.bru index fa078ab..32a6c59 100644 --- a/bruno/APIM/Test_Without_ServiceRequest_Resource.bru +++ b/bruno/APIM/Test_Without_ServiceRequest_Resource.bru @@ -1,7 +1,7 @@ meta { name: Test_Without_ServiceRequest_Resource type: http - seq: 8 + seq: 14 } post { diff --git a/bruno/APIM/Test_Without_ServiceRequest_Resource_IntEnvi.bru b/bruno/APIM/Test_Without_ServiceRequest_Resource_IntEnvi.bru new file mode 100644 index 0000000..c310ad1 --- /dev/null +++ b/bruno/APIM/Test_Without_ServiceRequest_Resource_IntEnvi.bru @@ -0,0 +1,75 @@ +meta { + name: Test_Without_ServiceRequest_Resource_IntEnvi + type: http + seq: 42 +} + +post { + url: https://int.api.service.nhs.uk/pathology-laboratory-reporting/FHIR/R4/Bundle + body: json + auth: inherit +} + +headers { + Content-Type: application/fhir+json +} + +body:json { + { + "resourceType": "Bundle", + "type": "document", + "entry": [ + { + "fullUrl": "composition", + "resource": { + "resourceType": "Composition", + "extension": [ + { + "url": "http://hl7.eu/fhir/StructureDefinition/composition-basedOn-order-or-requisition", + "valueReference": { + "reference": "" + } + } + ], + "subject": { + "identifier": { + "system": "https://fhir.nhs.uk/Id/nhs-number", + "value": "test-nhs-number" + } + } + } + }, + { + "fullUrl": "practitionerrole", + "resource": { + "resourceType": "PractitionerRole", + "organization": { + "reference": "organization" + } + } + }, + { + "fullUrl": "organization", + "resource": { + "resourceType": "Organization", + "identifier": [ + { + "system": "https://fhir.nhs.uk/Id/ods-organization-code", + "value": "testOrg" + } + ] + } + } + ] + } +} + +assert { + res.status: eq 400 + res.body.issue[0].diagnostics: eq Document must include a ServiceRequest resource +} + +settings { + encodeUrl: true + timeout: 0 +} diff --git a/bruno/collection.bru b/bruno/collection.bru deleted file mode 100644 index 1b0729d..0000000 --- a/bruno/collection.bru +++ /dev/null @@ -1,3 +0,0 @@ -meta { - name: bruno -} From 7ca3f6b3812ad2777950ea5ef998dc356c7e918a Mon Sep 17 00:00:00 2001 From: samdasari11 Date: Mon, 27 Apr 2026 17:09:29 +0000 Subject: [PATCH 4/7] Addressed the review comments --- .../Test_Document_Bundle_via_APIM_IntEnvi.bru | 473 ------------------ .../Test_Expired_Bearer_Token_IntEnvi.bru | 84 ++++ ...ogy_Api_Unable_To_Authenticate_IntEnvi.bru | 2 +- ..._Api_Unable_To_Authorize_Event_IntEnvi.bru | 2 +- ...S_Service_Experience_Bad_Gateway_Error.bru | 2 +- ...e_Experience_Bad_Gateway_Error_IntEnvi.bru | 2 +- ...rvice_Experience_Gateway_Timeout_Error.bru | 2 +- ...perience_Gateway_Timeout_Error_IntEnvi.bru | 2 +- ...NS_Service_Experience_Validation_Error.bru | 2 +- ...ce_Experience_Validation_Error_IntEnvi.bru | 2 +- ...vice_Returns_Client_Side_Error_IntEnvi.bru | 2 +- .../Test_Missing_Bearer_Token_IntEnvi.bru | 83 +++ bruno/APIM/Test_PDM_Api_Server_Error.bru | 2 +- .../Test_PDM_Api_Server_Error_IntEnvi.bru | 2 +- bruno/APIM/Test_PDM_Api_Validation_Error.bru | 2 +- .../Test_PDM_Api_Validation_Error_IntEnvi.bru | 96 ++++ .../Test_PDM_Bundle_Succesful_Response.bru | 2 +- ..._PDM_Bundle_Succesful_Response_IntEnvi.bru | 5 + .../Test_With_Incorrect_ReferenceType.bru | 2 +- ...t_With_Incorrect_ReferenceType_IntEnvi.bru | 2 +- ...h_Incorrect_ReferenceType_in_Extension.bru | 2 +- ...ect_ReferenceType_in_Extension_IntEnvi.bru | 2 +- ...th_Invalid_Identifiers_in_Organization.bru | 2 +- ...id_Identifiers_in_Organization_IntEnvi.bru | 2 +- ..._Multiple_Bundle_Entries_With_Same_URL.bru | 2 +- ...e_Bundle_Entries_With_Same_URL_IntEnvi.bru | 2 +- ...ltiple_Identifiers_For_An_Organisation.bru | 2 +- ...dentifiers_For_An_Organisation_IntEnvi.bru | 2 +- bruno/APIM/Test_Without_Composition.bru | 2 +- .../APIM/Test_Without_Composition_IntEnvi.bru | 2 +- ...est_Without_Extension_URL_is_incorrect.bru | 2 +- ...out_Extension_URL_is_incorrect_IntEnvi.bru | 2 +- .../Test_Without_Extension_in_Composition.bru | 2 +- ...thout_Extension_in_Composition_IntEnvi.bru | 2 +- ...ithout_Organization_Identifier_IntEnvi.bru | 2 +- ..._Organization_Identifier_Value_IntEnvi.bru | 2 +- .../Test_Without_Organization_IntEnvi.bru | 2 +- ...st_Without_Organization_Invalid_System.bru | 2 +- ...ut_Organization_Invalid_System_IntEnvi.bru | 2 +- ...est_Without_Organization_Invalid_Value.bru | 2 +- ...out_Organization_Invalid_Value_IntEnvi.bru | 2 +- .../APIM/Test_Without_Organization_System.bru | 2 +- ...st_Without_Organization_System_IntEnvi.bru | 2 +- .../Test_Without_PractionerRole_IntEnvi.bru | 2 +- ..._On_ServiceRequest_Requester_Reference.bru | 2 +- ...iceRequest_Requester_Reference_IntEnvi.bru | 2 +- .../Test_Without_PractionerRole_Reference.bru | 2 +- ...thout_PractionerRole_Reference_IntEnvi.bru | 2 +- ...Without_PractionerRole_Reference_Value.bru | 2 +- ...PractionerRole_Reference_Value_IntEnvi.bru | 2 +- .../Test_Without_Reference_in_Extension.bru | 2 +- ...Without_Reference_in_Extension_IntEnvi.bru | 2 +- .../Test_Without_ServiceRequest_IntEnvi.bru | 2 +- .../Test_Without_ServiceRequest_Requester.bru | 2 +- ...thout_ServiceRequest_Requester_IntEnvi.bru | 2 +- ...out_ServiceRequest_Requester_Reference.bru | 2 +- ...iceRequest_Requester_Reference_IntEnvi.bru | 2 +- .../Test_Without_ServiceRequest_Resource.bru | 2 +- ...ithout_ServiceRequest_Resource_IntEnvi.bru | 2 +- bruno/APIM/environments/INTEGRATION.bru | 3 +- 60 files changed, 324 insertions(+), 528 deletions(-) delete mode 100644 bruno/APIM/Test_Document_Bundle_via_APIM_IntEnvi.bru create mode 100644 bruno/APIM/Test_Expired_Bearer_Token_IntEnvi.bru create mode 100644 bruno/APIM/Test_Missing_Bearer_Token_IntEnvi.bru create mode 100644 bruno/APIM/Test_PDM_Api_Validation_Error_IntEnvi.bru diff --git a/bruno/APIM/Test_Document_Bundle_via_APIM_IntEnvi.bru b/bruno/APIM/Test_Document_Bundle_via_APIM_IntEnvi.bru deleted file mode 100644 index 93016b9..0000000 --- a/bruno/APIM/Test_Document_Bundle_via_APIM_IntEnvi.bru +++ /dev/null @@ -1,473 +0,0 @@ -meta { - name: Test_Document_Bundle_via_APIM_IntEnvi - type: http - seq: 36 -} - -post { - url: https://int.api.service.nhs.uk/pathology-laboratory-reporting/FHIR/R4/Bundle - body: json - auth: inherit -} - -headers { - Content-Type: application/fhir+json -} - -body:json { - { - "resourceType": "Bundle", - "identifier": { - "system": "https://tools.ietf.org/html/rfc4122", - "value": "1f859037-2942-4117-884a-f51b62db5a52" - }, - "type": "document", - "timestamp": "2022-03-08T12:09:00+00:00", - "entry": [ - { - "fullUrl": "urn:uuid:ce2073cd-7f19-4fd8-9956-f30ef7b4bd44", - "resource": { - "resourceType": "Composition", - "id": "ce2073cd-7f19-4fd8-9956-f30ef7b4bd44", - "extension": [ - { - "url": "http://hl7.eu/fhir/StructureDefinition/composition-basedOn-order-or-requisition", - "valueReference": { - "reference": "urn:uuid:1c38d507-9ad7-4b49-ba91-7da204842cac" - } - }, - { - "url": "http://hl7.eu/fhir/laboratory/StructureDefinition/composition-diagnosticReportReference", - "valueReference": { - "reference": "urn:uuid:35d46ca1-f253-4c97-b7ee-fb5fccdf6c20" - } - } - ], - "identifier": { - "system": "https://tools.ietf.org/html/rfc4122", - "value": "c3d5e6f7-8901-2345-6789-0abcdef12345" - }, - "status": "final", - "type": { - "coding": [ - { - "system": "http://snomed.info/sct", - "code": "721981007", - "display": "Diagnostic studies report" - } - ] - }, - "category": [ - { - "coding": [ - { - "system": "http://snomed.info/sct", - "code": "394915009", - "display": "General pathology (specialty)" - } - ] - } - ], - "subject": { - "reference": "urn:uuid:ab87a3f8-1d37-44a9-804e-5e962598a6e4", - "display": "WELSH, Joel", - "identifier": { - "system": "https://fhir.nhs.uk/Id/nhs-number", - "value": "9727710638" - } - }, - "date": "2022-03-08T12:09:00+00:00", - "author": [ - { - "reference": "urn:uuid:8a6d85b8-9837-4fed-a257-4cf207988338", - "display": "TD008362 PATH LAB 001" - } - ], - "title": "Laboratory Report", - "section": [ - { - "title": "CRP (C reactive protein) mass concentration in serum", - "code": { - "coding": [ - { - "system": "http://snomed.info/sct", - "code": "1106741000000105", - "display": "CRP (C reactive protein) mass concentration in serum" - } - ] - }, - "entry": [ - { - "reference": "urn:uuid:8697e1ea-a15d-4cab-95d9-7335f4b57e22" - } - ] - } - ] - } - }, - { - "fullUrl": "urn:uuid:8a6d85b8-9837-4fed-a257-4cf207988338", - "resource": { - "resourceType": "Organization", - "id": "8a6d85b8-9837-4fed-a257-4cf207988338", - "identifier": [ - { - "system": "https://fhir.nhs.uk/Id/ods-organization-code", - "value": "Y8J7D" - } - ], - "name": "TD008362 PATH LAB 001", - "address": [ - { - "line": [ - "PATHOLOGY LAB", - "7-8 WELLINGTON PLACE" - ], - "city": "LEEDS", - "district": "WEST YORKSHIRE", - "postalCode": "LS1 4AP" - } - ] - } - }, - { - "fullUrl": "urn:uuid:3c43b5b3-06d6-445f-ae9a-48d5f05df434", - "resource": { - "resourceType": "Organization", - "id": "3c43b5b3-06d6-445f-ae9a-48d5f05df434", - "identifier": [ - { - "system": "https://fhir.nhs.uk/Id/ods-organization-code", - "value": "B82033" - } - ], - "name": "PICKERING MEDICAL PRACTICE", - "address": [ - { - "line": [ - "SOUTHGATE" - ], - "city": "PICKERING", - "district": "NORTH YORKSHIRE", - "postalCode": "YO18 8BL" - } - ] - } - }, - { - "fullUrl": "urn:uuid:9a835acf-d715-4d84-8dcf-a8435f6417fe", - "resource": { - "resourceType": "Practitioner", - "id": "9a835acf-d715-4d84-8dcf-a8435f6417fe", - "identifier": [ - { - "system": "https://fhir.hl7.org.uk/Id/gmc-number", - "value": "C1008215" - } - ], - "name": [ - { - "use": "official", - "family": "GASKELL", - "given": [ - "Gale" - ], - "prefix": [ - "Dr" - ] - } - ] - } - }, - { - "fullUrl": "urn:uuid:d4f5e6a1-2b3c-4d5e-9f6a-7b8c9d0e1f2a", - "resource": { - "resourceType": "PractitionerRole", - "id": "d4f5e6a1-2b3c-4d5e-9f6a-7b8c9d0e1f2a", - "practitioner": { - "reference": "urn:uuid:9a835acf-d715-4d84-8dcf-a8435f6417fe" - }, - "organization": { - "reference": "urn:uuid:3c43b5b3-06d6-445f-ae9a-48d5f05df434", - "display": "PICKERING MEDICAL PRACTICE" - } - } - }, - { - "fullUrl": "urn:uuid:ab87a3f8-1d37-44a9-804e-5e962598a6e4", - "resource": { - "resourceType": "Patient", - "id": "ab87a3f8-1d37-44a9-804e-5e962598a6e4", - "identifier": [ - { - "system": "https://fhir.nhs.uk/Id/nhs-number", - "value": "9727710638", - "use": "official" - } - ] - } - }, - { - "fullUrl": "urn:uuid:1c38d507-9ad7-4b49-ba91-7da204842cac", - "resource": { - "resourceType": "ServiceRequest", - "id": "1c38d507-9ad7-4b49-ba91-7da204842cac", - "identifier": [ - { - "system": "http://B82033-pickeringmedicalpractice.com/labrequest", - "value": "REQ-20220307-000142" - } - ], - "status": "active", - "intent": "order", - "code": { - "coding": [ - { - "system": "http://snomed.info/sct", - "code": "135842001", - "display": "Serum C reactive protein level" - } - ] - }, - "subject": { - "reference": "urn:uuid:ab87a3f8-1d37-44a9-804e-5e962598a6e4", - "display": "WELSH, Joel", - "identifier": { - "system": "https://fhir.nhs.uk/Id/nhs-number", - "value": "9727710638" - } - }, - "authoredOn": "2022-01-29T10:24:00+00:00", - "requester": { - "reference": "urn:uuid:d4f5e6a1-2b3c-4d5e-9f6a-7b8c9d0e1f2a" - }, - "performer": [ - { - "reference": "urn:uuid:8a6d85b8-9837-4fed-a257-4cf207988338", - "display": "TD008362 PATH LAB 001" - } - ], - "specimen": [ - { - "reference": "urn:uuid:bab0eaec-1ec5-4598-b660-90bb38a1030d" - } - ] - } - }, - { - "fullUrl": "urn:uuid:35d46ca1-f253-4c97-b7ee-fb5fccdf6c20", - "resource": { - "resourceType": "DiagnosticReport", - "id": "35d46ca1-f253-4c97-b7ee-fb5fccdf6c20", - "identifier": [ - { - "system": "http://Y8J7D-pathlab001.com/report", - "value": "REP-20220308-004205" - } - ], - "basedOn": [ - { - "reference": "urn:uuid:1c38d507-9ad7-4b49-ba91-7da204842cac" - } - ], - "status": "final", - "category": [ - { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/v2-0074", - "code": "LAB", - "display": "Laboratory" - } - ] - } - ], - "code": { - "coding": [ - { - "system": "http://snomed.info/sct", - "code": "721981007", - "display": "Diagnostic studies report" - } - ] - }, - "subject": { - "reference": "urn:uuid:ab87a3f8-1d37-44a9-804e-5e962598a6e4", - "display": "WELSH, Joel", - "identifier": { - "system": "https://fhir.nhs.uk/Id/nhs-number", - "value": "9727710638" - } - }, - "issued": "2022-03-08T12:09:00+00:00", - "performer": [ - { - "reference": "urn:uuid:8a6d85b8-9837-4fed-a257-4cf207988338", - "display": "TD008362 PATH LAB 001" - } - ], - "specimen": [ - { - "reference": "urn:uuid:bab0eaec-1ec5-4598-b660-90bb38a1030d" - } - ], - "result": [ - { - "reference": "urn:uuid:8697e1ea-a15d-4cab-95d9-7335f4b57e22" - } - ] - } - }, - { - "fullUrl": "urn:uuid:bab0eaec-1ec5-4598-b660-90bb38a1030d", - "resource": { - "resourceType": "Specimen", - "id": "bab0eaec-1ec5-4598-b660-90bb38a1030d", - "identifier": [ - { - "system": "http://B82033-pickeringmedicalpractice.com/specimen", - "value": "SPC-REQ-20220307-000105" - } - ], - "accessionIdentifier": { - "system": "http://Y8J7D-pathlab001.com/specimen", - "value": "SPC-Lab-20220307-007856" - }, - "status": "available", - "type": { - "coding": [ - { - "system": "http://snomed.info/sct", - "code": "122555007", - "display": "Venous blood specimen" - } - ] - }, - "subject": { - "reference": "urn:uuid:ab87a3f8-1d37-44a9-804e-5e962598a6e4", - "display": "WELSH, Joel", - "identifier": { - "system": "https://fhir.nhs.uk/Id/nhs-number", - "value": "9727710638" - } - }, - "receivedTime": "2022-03-07T14:58:00+00:00", - "collection": { - "collectedDateTime": "2022-03-07T11:42:00+00:00" - } - } - }, - { - "fullUrl": "urn:uuid:8697e1ea-a15d-4cab-95d9-7335f4b57e22", - "resource": { - "resourceType": "Observation", - "id": "8697e1ea-a15d-4cab-95d9-7335f4b57e22", - "identifier": [ - { - "system": "https://tools.ietf.org/html/rfc4122", - "value": "09fd65ba-4bbb-49dd-9d16-ca74f885db6c" - } - ], - "status": "final", - "category": [ - { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/observation-category", - "code": "laboratory", - "display": "Laboratory" - } - ] - } - ], - "code": { - "coding": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/valueset-reference", - "valueUri": "https://fhir.hl7.org.uk/ValueSet/UKCore-PathologyBoundedCodeListObservables" - } - ], - "system": "http://snomed.info/sct", - "code": "1001371000000100", - "display": "Serum CRP (C reactive protein) level" - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/valueset-reference", - "valueUri": "https://fhir.hl7.org.uk/ValueSet/UKCore-PathologyAndLaboratoryMedicineObservables" - } - ], - "system": "http://snomed.info/sct", - "code": "1106741000000105", - "display": "CRP (C reactive protein) mass concentration in serum" - } - ] - }, - "subject": { - "reference": "urn:uuid:ab87a3f8-1d37-44a9-804e-5e962598a6e4", - "display": "WELSH, Joel", - "identifier": { - "system": "https://fhir.nhs.uk/Id/nhs-number", - "value": "9727710638" - } - }, - "issued": "2022-03-08T12:09:00+00:00", - "performer": [ - { - "reference": "urn:uuid:8a6d85b8-9837-4fed-a257-4cf207988338", - "display": "TD008362 PATH LAB 001" - } - ], - "valueQuantity": { - "value": 200, - "unit": "mg/L", - "system": "http://unitsofmeasure.org", - "code": "mg/L" - }, - "interpretation": [ - { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", - "code": "H", - "display": "High" - } - ] - } - ], - "specimen": { - "reference": "urn:uuid:bab0eaec-1ec5-4598-b660-90bb38a1030d" - }, - "referenceRange": [ - { - "low": { - "value": 0, - "unit": "mg/L", - "system": "http://unitsofmeasure.org", - "code": "mg/L" - }, - "high": { - "value": 5, - "unit": "mg/L", - "system": "http://unitsofmeasure.org", - "code": "mg/L" - } - } - ] - } - } - ] - } -} - -assert { - res.status: eq 200 -} - -settings { - encodeUrl: true - timeout: 0 -} diff --git a/bruno/APIM/Test_Expired_Bearer_Token_IntEnvi.bru b/bruno/APIM/Test_Expired_Bearer_Token_IntEnvi.bru new file mode 100644 index 0000000..585a331 --- /dev/null +++ b/bruno/APIM/Test_Expired_Bearer_Token_IntEnvi.bru @@ -0,0 +1,84 @@ +meta { + name: Test_Expired_Bearer_Token_IntEnvi + type: http + seq: 63 +} + +post { + url: https://int.api.service.nhs.uk/pathology-laboratory-reporting/FHIR/R4/Bundle + body: json + auth: inherit +} + +headers { + Content-Type: application/fhir+json + Authorization: {{expired_bearer_token}} +} + +body:json { + { + "resourceType": "Bundle", + "type": "document", + "entry": [ + { + "fullUrl": "composition", + "resource": { + "resourceType": "Composition", + "extension": [ + { + "url": "http://hl7.eu/fhir/StructureDefinition/composition-basedOn-order-or-requisition", + "valueReference": { + "reference": "servicerequest" + } + } + ], + "subject": { + "identifier": { + "system": "https://fhir.nhs.uk/Id/nhs-number", + "value": "test-nhs-number" + } + } + } + }, + { + "fullUrl": "servicerequest", + "resource": { + "resourceType": "ServiceRequest", + "requester": { + "reference": "practitionerrole" + } + } + }, + { + "fullUrl": "practitionerrole", + "resource": { + "resourceType": "PractitionerRole", + "organization": { + "reference": "organization" + } + } + }, + { + "fullUrl": "organization", + "resource": { + "resourceType": "Organization", + "identifier": [ + { + "system": "https://fhir.nhs.uk/Id/ods-organization-code", + "value": "testOrg" + } + ] + } + } + ] + } +} + +assert { + res.status: eq 401 +} + +settings { + encodeUrl: true + timeout: 0 +} diff --git a/bruno/APIM/Test_MNS_Pathology_Api_Unable_To_Authenticate_IntEnvi.bru b/bruno/APIM/Test_MNS_Pathology_Api_Unable_To_Authenticate_IntEnvi.bru index 1186026..5d5e61f 100644 --- a/bruno/APIM/Test_MNS_Pathology_Api_Unable_To_Authenticate_IntEnvi.bru +++ b/bruno/APIM/Test_MNS_Pathology_Api_Unable_To_Authenticate_IntEnvi.bru @@ -1,7 +1,7 @@ meta { name: Test_MNS_Pathology_Api_Unable_To_Authenticate_IntEnvi type: http - seq: 60 + seq: 56 } post { diff --git a/bruno/APIM/Test_MNS_Pathology_Api_Unable_To_Authorize_Event_IntEnvi.bru b/bruno/APIM/Test_MNS_Pathology_Api_Unable_To_Authorize_Event_IntEnvi.bru index 6b7f902..afaa8fe 100644 --- a/bruno/APIM/Test_MNS_Pathology_Api_Unable_To_Authorize_Event_IntEnvi.bru +++ b/bruno/APIM/Test_MNS_Pathology_Api_Unable_To_Authorize_Event_IntEnvi.bru @@ -1,7 +1,7 @@ meta { name: Test_MNS_Pathology_Api_Unable_To_Authorize_Event_IntEnvi type: http - seq: 61 + seq: 57 } post { diff --git a/bruno/APIM/Test_MNS_Service_Experience_Bad_Gateway_Error.bru b/bruno/APIM/Test_MNS_Service_Experience_Bad_Gateway_Error.bru index 4dbf506..046a350 100644 --- a/bruno/APIM/Test_MNS_Service_Experience_Bad_Gateway_Error.bru +++ b/bruno/APIM/Test_MNS_Service_Experience_Bad_Gateway_Error.bru @@ -1,7 +1,7 @@ meta { name: Test_MNS_Service_Experience_Bad_Gateway_Error type: http - seq: 10 + seq: 9 } post { diff --git a/bruno/APIM/Test_MNS_Service_Experience_Bad_Gateway_Error_IntEnvi.bru b/bruno/APIM/Test_MNS_Service_Experience_Bad_Gateway_Error_IntEnvi.bru index 6000f08..0c426c1 100644 --- a/bruno/APIM/Test_MNS_Service_Experience_Bad_Gateway_Error_IntEnvi.bru +++ b/bruno/APIM/Test_MNS_Service_Experience_Bad_Gateway_Error_IntEnvi.bru @@ -1,7 +1,7 @@ meta { name: Test_MNS_Service_Experience_Bad_Gateway_Error_IntEnvi type: http - seq: 63 + seq: 59 } post { diff --git a/bruno/APIM/Test_MNS_Service_Experience_Gateway_Timeout_Error.bru b/bruno/APIM/Test_MNS_Service_Experience_Gateway_Timeout_Error.bru index 7ca4b85..ae216c0 100644 --- a/bruno/APIM/Test_MNS_Service_Experience_Gateway_Timeout_Error.bru +++ b/bruno/APIM/Test_MNS_Service_Experience_Gateway_Timeout_Error.bru @@ -1,7 +1,7 @@ meta { name: Test_MNS_Service_Experience_Gateway_Timeout_Error type: http - seq: 12 + seq: 11 } post { diff --git a/bruno/APIM/Test_MNS_Service_Experience_Gateway_Timeout_Error_IntEnvi.bru b/bruno/APIM/Test_MNS_Service_Experience_Gateway_Timeout_Error_IntEnvi.bru index 9103fb4..cb8a3da 100644 --- a/bruno/APIM/Test_MNS_Service_Experience_Gateway_Timeout_Error_IntEnvi.bru +++ b/bruno/APIM/Test_MNS_Service_Experience_Gateway_Timeout_Error_IntEnvi.bru @@ -1,7 +1,7 @@ meta { name: Test_MNS_Service_Experience_Gateway_Timeout_Error_IntEnvi type: http - seq: 64 + seq: 60 } post { diff --git a/bruno/APIM/Test_MNS_Service_Experience_Validation_Error.bru b/bruno/APIM/Test_MNS_Service_Experience_Validation_Error.bru index 68075f4..ab829a5 100644 --- a/bruno/APIM/Test_MNS_Service_Experience_Validation_Error.bru +++ b/bruno/APIM/Test_MNS_Service_Experience_Validation_Error.bru @@ -1,7 +1,7 @@ meta { name: Test_MNS_Service_Experience_Validation_Error type: http - seq: 15 + seq: 14 } post { diff --git a/bruno/APIM/Test_MNS_Service_Experience_Validation_Error_IntEnvi.bru b/bruno/APIM/Test_MNS_Service_Experience_Validation_Error_IntEnvi.bru index a28f74b..9dc8d77 100644 --- a/bruno/APIM/Test_MNS_Service_Experience_Validation_Error_IntEnvi.bru +++ b/bruno/APIM/Test_MNS_Service_Experience_Validation_Error_IntEnvi.bru @@ -1,7 +1,7 @@ meta { name: Test_MNS_Service_Experience_Validation_Error_IntEnvi type: http - seq: 65 + seq: 61 } post { diff --git a/bruno/APIM/Test_MNS_Service_Returns_Client_Side_Error_IntEnvi.bru b/bruno/APIM/Test_MNS_Service_Returns_Client_Side_Error_IntEnvi.bru index b5a9279..3a98a5b 100644 --- a/bruno/APIM/Test_MNS_Service_Returns_Client_Side_Error_IntEnvi.bru +++ b/bruno/APIM/Test_MNS_Service_Returns_Client_Side_Error_IntEnvi.bru @@ -1,7 +1,7 @@ meta { name: Test_MNS_Service_Returns_Client_Side_Error_IntEnvi type: http - seq: 62 + seq: 58 } post { diff --git a/bruno/APIM/Test_Missing_Bearer_Token_IntEnvi.bru b/bruno/APIM/Test_Missing_Bearer_Token_IntEnvi.bru new file mode 100644 index 0000000..1ec7fe6 --- /dev/null +++ b/bruno/APIM/Test_Missing_Bearer_Token_IntEnvi.bru @@ -0,0 +1,83 @@ +meta { + name: Test_Missing_Bearer_Token_IntEnvi + type: http + seq: 62 +} + +post { + url: https://int.api.service.nhs.uk/pathology-laboratory-reporting/FHIR/R4/Bundle + body: json + auth: none +} + +headers { + Content-Type: application/fhir+json +} + +body:json { + { + "resourceType": "Bundle", + "type": "document", + "entry": [ + { + "fullUrl": "composition", + "resource": { + "resourceType": "Composition", + "extension": [ + { + "url": "http://hl7.eu/fhir/StructureDefinition/composition-basedOn-order-or-requisition", + "valueReference": { + "reference": "servicerequest" + } + } + ], + "subject": { + "identifier": { + "system": "https://fhir.nhs.uk/Id/nhs-number", + "value": "test-nhs-number" + } + } + } + }, + { + "fullUrl": "servicerequest", + "resource": { + "resourceType": "ServiceRequest", + "requester": { + "reference": "practitionerrole" + } + } + }, + { + "fullUrl": "practitionerrole", + "resource": { + "resourceType": "PractitionerRole", + "organization": { + "reference": "organization" + } + } + }, + { + "fullUrl": "organization", + "resource": { + "resourceType": "Organization", + "identifier": [ + { + "system": "https://fhir.nhs.uk/Id/ods-organization-code", + "value": "testOrg" + } + ] + } + } + ] + } +} + +assert { + res.status: eq 401 +} + +settings { + encodeUrl: true + timeout: 0 +} diff --git a/bruno/APIM/Test_PDM_Api_Server_Error.bru b/bruno/APIM/Test_PDM_Api_Server_Error.bru index 3566e76..71771a0 100644 --- a/bruno/APIM/Test_PDM_Api_Server_Error.bru +++ b/bruno/APIM/Test_PDM_Api_Server_Error.bru @@ -1,7 +1,7 @@ meta { name: Test_PDM_Api_Server_Error type: http - seq: 19 + seq: 18 } post { diff --git a/bruno/APIM/Test_PDM_Api_Server_Error_IntEnvi.bru b/bruno/APIM/Test_PDM_Api_Server_Error_IntEnvi.bru index 6da60f7..2a0e74a 100644 --- a/bruno/APIM/Test_PDM_Api_Server_Error_IntEnvi.bru +++ b/bruno/APIM/Test_PDM_Api_Server_Error_IntEnvi.bru @@ -1,7 +1,7 @@ meta { name: Test_PDM_Api_Server_Error_IntEnvi type: http - seq: 45 + seq: 41 } post { diff --git a/bruno/APIM/Test_PDM_Api_Validation_Error.bru b/bruno/APIM/Test_PDM_Api_Validation_Error.bru index 5737b63..db41f04 100644 --- a/bruno/APIM/Test_PDM_Api_Validation_Error.bru +++ b/bruno/APIM/Test_PDM_Api_Validation_Error.bru @@ -1,7 +1,7 @@ meta { name: Test_PDM_Api_Validation_Error type: http - seq: 16 + seq: 15 } post { diff --git a/bruno/APIM/Test_PDM_Api_Validation_Error_IntEnvi.bru b/bruno/APIM/Test_PDM_Api_Validation_Error_IntEnvi.bru new file mode 100644 index 0000000..b37dace --- /dev/null +++ b/bruno/APIM/Test_PDM_Api_Validation_Error_IntEnvi.bru @@ -0,0 +1,96 @@ +meta { + name: Test_PDM_Api_Validation_Error_IntEnvi + type: http + seq: 68 +} + +post { + url: https://int.api.service.nhs.uk/pathology-laboratory-reporting/FHIR/R4/Bundle + body: json + auth: inherit +} + +headers { + Content-Type: application/fhir+json +} + +body:json { + { + "resourceType": "Bundle", + "type": "document", + "entry": [ + { + "fullUrl": "composition", + "resource": { + "resourceType": "Composition", + "extension": [ + { + "url": "http://hl7.eu/fhir/StructureDefinition/composition-basedOn-order-or-requisition", + "valueReference": { + "reference": "servicerequest" + } + } + ], + "subject": { + "identifier": { + "system": "https://fhir.nhs.uk/Id/nhs-number", + "value": "test-nhs-number" + } + } + } + }, + { + "fullUrl": "servicerequest", + "resource": { + "resourceType": "ServiceRequest", + "requester": { + "reference": "practitionerrole" + } + } + }, + { + "fullUrl": "practitionerrole", + "resource": { + "resourceType": "PractitionerRole", + "organization": { + "reference": "organization" + } + } + }, + { + "fullUrl": "patient", + "resource": { + "resourceType": "Patient", + "identifier": [ + { + "system": "https://fhir.nhs.uk/Id/nhs-number", + "value": "PDM_VALIDATION_ERROR" + } + ] + } + }, + { + "fullUrl": "organization", + "resource": { + "resourceType": "Organization", + "identifier": [ + { + "system": "https://fhir.nhs.uk/Id/ods-organization-code", + "value": "testOrg" + } + ] + } + } + ] + } +} + +assert { + res.status: eq 500 + res.body.issue[0].diagnostics: contains Failed to send document: +} + +settings { + encodeUrl: true + timeout: 0 +} diff --git a/bruno/APIM/Test_PDM_Bundle_Succesful_Response.bru b/bruno/APIM/Test_PDM_Bundle_Succesful_Response.bru index 7a6c7e5..e448583 100644 --- a/bruno/APIM/Test_PDM_Bundle_Succesful_Response.bru +++ b/bruno/APIM/Test_PDM_Bundle_Succesful_Response.bru @@ -1,7 +1,7 @@ meta { name: Test_PDM_Bundle_Succesful_Response type: http - seq: 20 + seq: 19 } post { diff --git a/bruno/APIM/Test_PDM_Bundle_Succesful_Response_IntEnvi.bru b/bruno/APIM/Test_PDM_Bundle_Succesful_Response_IntEnvi.bru index 3e9f380..349f1ad 100644 --- a/bruno/APIM/Test_PDM_Bundle_Succesful_Response_IntEnvi.bru +++ b/bruno/APIM/Test_PDM_Bundle_Succesful_Response_IntEnvi.bru @@ -465,6 +465,11 @@ body:json { assert { res.status: eq 200 + res.body.resourceType: eq "Bundle" + res.body.type: eq document + res.body.id: isNotEmpty + res.body.entry: isArray + res.body.entry[0].resource.subject.identifier.value: isNotEmpty } settings { diff --git a/bruno/APIM/Test_With_Incorrect_ReferenceType.bru b/bruno/APIM/Test_With_Incorrect_ReferenceType.bru index 580e659..a213a5a 100644 --- a/bruno/APIM/Test_With_Incorrect_ReferenceType.bru +++ b/bruno/APIM/Test_With_Incorrect_ReferenceType.bru @@ -1,7 +1,7 @@ meta { name: Test_With_Incorrect_ReferenceType type: http - seq: 22 + seq: 21 } post { diff --git a/bruno/APIM/Test_With_Incorrect_ReferenceType_IntEnvi.bru b/bruno/APIM/Test_With_Incorrect_ReferenceType_IntEnvi.bru index 7cb6452..7ff5353 100644 --- a/bruno/APIM/Test_With_Incorrect_ReferenceType_IntEnvi.bru +++ b/bruno/APIM/Test_With_Incorrect_ReferenceType_IntEnvi.bru @@ -1,7 +1,7 @@ meta { name: Test_With_Incorrect_ReferenceType_IntEnvi type: http - seq: 48 + seq: 44 } post { diff --git a/bruno/APIM/Test_With_Incorrect_ReferenceType_in_Extension.bru b/bruno/APIM/Test_With_Incorrect_ReferenceType_in_Extension.bru index 2bb4648..3015673 100644 --- a/bruno/APIM/Test_With_Incorrect_ReferenceType_in_Extension.bru +++ b/bruno/APIM/Test_With_Incorrect_ReferenceType_in_Extension.bru @@ -1,7 +1,7 @@ meta { name: Test_With_Incorrect_ReferenceType_in_Extension type: http - seq: 21 + seq: 20 } post { diff --git a/bruno/APIM/Test_With_Incorrect_ReferenceType_in_Extension_IntEnvi.bru b/bruno/APIM/Test_With_Incorrect_ReferenceType_in_Extension_IntEnvi.bru index b026db5..eee084b 100644 --- a/bruno/APIM/Test_With_Incorrect_ReferenceType_in_Extension_IntEnvi.bru +++ b/bruno/APIM/Test_With_Incorrect_ReferenceType_in_Extension_IntEnvi.bru @@ -1,7 +1,7 @@ meta { name: Test_With_Incorrect_ReferenceType_in_Extension_IntEnvi type: http - seq: 47 + seq: 43 } post { diff --git a/bruno/APIM/Test_With_Invalid_Identifiers_in_Organization.bru b/bruno/APIM/Test_With_Invalid_Identifiers_in_Organization.bru index 7ada3c0..51ae0f1 100644 --- a/bruno/APIM/Test_With_Invalid_Identifiers_in_Organization.bru +++ b/bruno/APIM/Test_With_Invalid_Identifiers_in_Organization.bru @@ -1,7 +1,7 @@ meta { name: Test_With_Invalid_Identifiers_in_Organization type: http - seq: 32 + seq: 29 } post { diff --git a/bruno/APIM/Test_With_Invalid_Identifiers_in_Organization_IntEnvi.bru b/bruno/APIM/Test_With_Invalid_Identifiers_in_Organization_IntEnvi.bru index 3025cd7..caa9256 100644 --- a/bruno/APIM/Test_With_Invalid_Identifiers_in_Organization_IntEnvi.bru +++ b/bruno/APIM/Test_With_Invalid_Identifiers_in_Organization_IntEnvi.bru @@ -1,7 +1,7 @@ meta { name: Test_With_Invalid_Identifiers_in_Organization_IntEnvi type: http - seq: 56 + seq: 52 } post { diff --git a/bruno/APIM/Test_With_Multiple_Bundle_Entries_With_Same_URL.bru b/bruno/APIM/Test_With_Multiple_Bundle_Entries_With_Same_URL.bru index 8c8badf..99b7128 100644 --- a/bruno/APIM/Test_With_Multiple_Bundle_Entries_With_Same_URL.bru +++ b/bruno/APIM/Test_With_Multiple_Bundle_Entries_With_Same_URL.bru @@ -1,7 +1,7 @@ meta { name: Test_With_Multiple_Bundle_Entries_With_Same_URL type: http - seq: 35 + seq: 32 } post { diff --git a/bruno/APIM/Test_With_Multiple_Bundle_Entries_With_Same_URL_IntEnvi.bru b/bruno/APIM/Test_With_Multiple_Bundle_Entries_With_Same_URL_IntEnvi.bru index 6260695..27114b1 100644 --- a/bruno/APIM/Test_With_Multiple_Bundle_Entries_With_Same_URL_IntEnvi.bru +++ b/bruno/APIM/Test_With_Multiple_Bundle_Entries_With_Same_URL_IntEnvi.bru @@ -1,7 +1,7 @@ meta { name: Test_With_Multiple_Bundle_Entries_With_Same_URL_IntEnvi type: http - seq: 58 + seq: 54 } post { diff --git a/bruno/APIM/Test_With_Multiple_Identifiers_For_An_Organisation.bru b/bruno/APIM/Test_With_Multiple_Identifiers_For_An_Organisation.bru index 93ac3b3..1eac7b2 100644 --- a/bruno/APIM/Test_With_Multiple_Identifiers_For_An_Organisation.bru +++ b/bruno/APIM/Test_With_Multiple_Identifiers_For_An_Organisation.bru @@ -1,7 +1,7 @@ meta { name: Test_With_Multiple_Identifiers_For_An_Organisation type: http - seq: 34 + seq: 31 } post { diff --git a/bruno/APIM/Test_With_Multiple_Identifiers_For_An_Organisation_IntEnvi.bru b/bruno/APIM/Test_With_Multiple_Identifiers_For_An_Organisation_IntEnvi.bru index c13620e..33edc41 100644 --- a/bruno/APIM/Test_With_Multiple_Identifiers_For_An_Organisation_IntEnvi.bru +++ b/bruno/APIM/Test_With_Multiple_Identifiers_For_An_Organisation_IntEnvi.bru @@ -1,7 +1,7 @@ meta { name: Test_With_Multiple_Identifiers_For_An_Organisation_IntEnvi type: http - seq: 57 + seq: 53 } post { diff --git a/bruno/APIM/Test_Without_Composition.bru b/bruno/APIM/Test_Without_Composition.bru index 940e5e0..164a2de 100644 --- a/bruno/APIM/Test_Without_Composition.bru +++ b/bruno/APIM/Test_Without_Composition.bru @@ -1,7 +1,7 @@ meta { name: Test_Without_Composition type: http - seq: 11 + seq: 10 } post { diff --git a/bruno/APIM/Test_Without_Composition_IntEnvi.bru b/bruno/APIM/Test_Without_Composition_IntEnvi.bru index 840a009..dd4fa06 100644 --- a/bruno/APIM/Test_Without_Composition_IntEnvi.bru +++ b/bruno/APIM/Test_Without_Composition_IntEnvi.bru @@ -1,7 +1,7 @@ meta { name: Test_Without_Composition_IntEnvi type: http - seq: 40 + seq: 36 } post { diff --git a/bruno/APIM/Test_Without_Extension_URL_is_incorrect.bru b/bruno/APIM/Test_Without_Extension_URL_is_incorrect.bru index c506aa3..abd9965 100644 --- a/bruno/APIM/Test_Without_Extension_URL_is_incorrect.bru +++ b/bruno/APIM/Test_Without_Extension_URL_is_incorrect.bru @@ -1,7 +1,7 @@ meta { name: Test_Without_Extension_URL_is_incorrect type: http - seq: 17 + seq: 16 } post { diff --git a/bruno/APIM/Test_Without_Extension_URL_is_incorrect_IntEnvi.bru b/bruno/APIM/Test_Without_Extension_URL_is_incorrect_IntEnvi.bru index f415fd3..4c5dabd 100644 --- a/bruno/APIM/Test_Without_Extension_URL_is_incorrect_IntEnvi.bru +++ b/bruno/APIM/Test_Without_Extension_URL_is_incorrect_IntEnvi.bru @@ -1,7 +1,7 @@ meta { name: Test_Without_Extension_URL_is_incorrect_IntEnvi type: http - seq: 43 + seq: 39 } post { diff --git a/bruno/APIM/Test_Without_Extension_in_Composition.bru b/bruno/APIM/Test_Without_Extension_in_Composition.bru index db043c2..5452219 100644 --- a/bruno/APIM/Test_Without_Extension_in_Composition.bru +++ b/bruno/APIM/Test_Without_Extension_in_Composition.bru @@ -1,7 +1,7 @@ meta { name: Test_Without_Extension_in_Composition type: http - seq: 13 + seq: 12 } post { diff --git a/bruno/APIM/Test_Without_Extension_in_Composition_IntEnvi.bru b/bruno/APIM/Test_Without_Extension_in_Composition_IntEnvi.bru index df02035..2554512 100644 --- a/bruno/APIM/Test_Without_Extension_in_Composition_IntEnvi.bru +++ b/bruno/APIM/Test_Without_Extension_in_Composition_IntEnvi.bru @@ -1,7 +1,7 @@ meta { name: Test_Without_Extension_in_Composition_IntEnvi type: http - seq: 41 + seq: 37 } post { diff --git a/bruno/APIM/Test_Without_Organization_Identifier_IntEnvi.bru b/bruno/APIM/Test_Without_Organization_Identifier_IntEnvi.bru index e563d9d..be4e284 100644 --- a/bruno/APIM/Test_Without_Organization_Identifier_IntEnvi.bru +++ b/bruno/APIM/Test_Without_Organization_Identifier_IntEnvi.bru @@ -1,7 +1,7 @@ meta { name: Test_Without_Organization_Identifier_IntEnvi type: http - seq: 52 + seq: 48 } post { diff --git a/bruno/APIM/Test_Without_Organization_Identifier_Value_IntEnvi.bru b/bruno/APIM/Test_Without_Organization_Identifier_Value_IntEnvi.bru index 48da217..85e08c3 100644 --- a/bruno/APIM/Test_Without_Organization_Identifier_Value_IntEnvi.bru +++ b/bruno/APIM/Test_Without_Organization_Identifier_Value_IntEnvi.bru @@ -1,7 +1,7 @@ meta { name: Test_Without_Organization_Identifier_Value_IntEnvi type: http - seq: 55 + seq: 51 } post { diff --git a/bruno/APIM/Test_Without_Organization_IntEnvi.bru b/bruno/APIM/Test_Without_Organization_IntEnvi.bru index af71491..8d710c7 100644 --- a/bruno/APIM/Test_Without_Organization_IntEnvi.bru +++ b/bruno/APIM/Test_Without_Organization_IntEnvi.bru @@ -1,7 +1,7 @@ meta { name: Test_Without_Organization_IntEnvi type: http - seq: 39 + seq: 35 } post { diff --git a/bruno/APIM/Test_Without_Organization_Invalid_System.bru b/bruno/APIM/Test_Without_Organization_Invalid_System.bru index d9ba2c1..cc8c87b 100644 --- a/bruno/APIM/Test_Without_Organization_Invalid_System.bru +++ b/bruno/APIM/Test_Without_Organization_Invalid_System.bru @@ -1,7 +1,7 @@ meta { name: Test_Without_Organization_Invalid_System type: http - seq: 30 + seq: 27 } post { diff --git a/bruno/APIM/Test_Without_Organization_Invalid_System_IntEnvi.bru b/bruno/APIM/Test_Without_Organization_Invalid_System_IntEnvi.bru index d7263f8..b0db94c 100644 --- a/bruno/APIM/Test_Without_Organization_Invalid_System_IntEnvi.bru +++ b/bruno/APIM/Test_Without_Organization_Invalid_System_IntEnvi.bru @@ -1,7 +1,7 @@ meta { name: Test_Without_Organization_Invalid_System_IntEnvi type: http - seq: 67 + seq: 64 } post { diff --git a/bruno/APIM/Test_Without_Organization_Invalid_Value.bru b/bruno/APIM/Test_Without_Organization_Invalid_Value.bru index c3016f2..768be9f 100644 --- a/bruno/APIM/Test_Without_Organization_Invalid_Value.bru +++ b/bruno/APIM/Test_Without_Organization_Invalid_Value.bru @@ -1,7 +1,7 @@ meta { name: Test_Without_Organization_Invalid_Value type: http - seq: 31 + seq: 28 } post { diff --git a/bruno/APIM/Test_Without_Organization_Invalid_Value_IntEnvi.bru b/bruno/APIM/Test_Without_Organization_Invalid_Value_IntEnvi.bru index 26596e3..1df6f3d 100644 --- a/bruno/APIM/Test_Without_Organization_Invalid_Value_IntEnvi.bru +++ b/bruno/APIM/Test_Without_Organization_Invalid_Value_IntEnvi.bru @@ -1,7 +1,7 @@ meta { name: Test_Without_Organization_Invalid_Value_IntEnvi type: http - seq: 68 + seq: 66 } post { diff --git a/bruno/APIM/Test_Without_Organization_System.bru b/bruno/APIM/Test_Without_Organization_System.bru index 8e6b0ec..679ff03 100644 --- a/bruno/APIM/Test_Without_Organization_System.bru +++ b/bruno/APIM/Test_Without_Organization_System.bru @@ -1,7 +1,7 @@ meta { name: Test_Without_Organization_System type: http - seq: 28 + seq: 26 } post { diff --git a/bruno/APIM/Test_Without_Organization_System_IntEnvi.bru b/bruno/APIM/Test_Without_Organization_System_IntEnvi.bru index ea954cd..2fe749a 100644 --- a/bruno/APIM/Test_Without_Organization_System_IntEnvi.bru +++ b/bruno/APIM/Test_Without_Organization_System_IntEnvi.bru @@ -1,7 +1,7 @@ meta { name: Test_Without_Organization_System_IntEnvi type: http - seq: 54 + seq: 50 } post { diff --git a/bruno/APIM/Test_Without_PractionerRole_IntEnvi.bru b/bruno/APIM/Test_Without_PractionerRole_IntEnvi.bru index b4b8711..014876b 100644 --- a/bruno/APIM/Test_Without_PractionerRole_IntEnvi.bru +++ b/bruno/APIM/Test_Without_PractionerRole_IntEnvi.bru @@ -1,7 +1,7 @@ meta { name: Test_Without_PractionerRole_IntEnvi type: http - seq: 38 + seq: 34 } post { diff --git a/bruno/APIM/Test_Without_PractionerRole_On_ServiceRequest_Requester_Reference.bru b/bruno/APIM/Test_Without_PractionerRole_On_ServiceRequest_Requester_Reference.bru index 41040f0..898bb1b 100644 --- a/bruno/APIM/Test_Without_PractionerRole_On_ServiceRequest_Requester_Reference.bru +++ b/bruno/APIM/Test_Without_PractionerRole_On_ServiceRequest_Requester_Reference.bru @@ -1,7 +1,7 @@ meta { name: Test_Without_PractionerRole_On_ServiceRequest_Requester_Reference type: http - seq: 33 + seq: 30 } post { diff --git a/bruno/APIM/Test_Without_PractionerRole_On_ServiceRequest_Requester_Reference_IntEnvi.bru b/bruno/APIM/Test_Without_PractionerRole_On_ServiceRequest_Requester_Reference_IntEnvi.bru index 40123fa..42e32e5 100644 --- a/bruno/APIM/Test_Without_PractionerRole_On_ServiceRequest_Requester_Reference_IntEnvi.bru +++ b/bruno/APIM/Test_Without_PractionerRole_On_ServiceRequest_Requester_Reference_IntEnvi.bru @@ -1,7 +1,7 @@ meta { name: Test_Without_PractionerRole_On_ServiceRequest_Requester_Reference_IntEnvi type: http - seq: 59 + seq: 55 } post { diff --git a/bruno/APIM/Test_Without_PractionerRole_Reference.bru b/bruno/APIM/Test_Without_PractionerRole_Reference.bru index 5a22877..9bdc18f 100644 --- a/bruno/APIM/Test_Without_PractionerRole_Reference.bru +++ b/bruno/APIM/Test_Without_PractionerRole_Reference.bru @@ -1,7 +1,7 @@ meta { name: Test_Without_PractionerRole_Reference type: http - seq: 25 + seq: 24 } post { diff --git a/bruno/APIM/Test_Without_PractionerRole_Reference_IntEnvi.bru b/bruno/APIM/Test_Without_PractionerRole_Reference_IntEnvi.bru index 2c68c04..aca5a87 100644 --- a/bruno/APIM/Test_Without_PractionerRole_Reference_IntEnvi.bru +++ b/bruno/APIM/Test_Without_PractionerRole_Reference_IntEnvi.bru @@ -1,7 +1,7 @@ meta { name: Test_Without_PractionerRole_Reference_IntEnvi type: http - seq: 51 + seq: 47 } post { diff --git a/bruno/APIM/Test_Without_PractionerRole_Reference_Value.bru b/bruno/APIM/Test_Without_PractionerRole_Reference_Value.bru index ab02779..e4dc9b2 100644 --- a/bruno/APIM/Test_Without_PractionerRole_Reference_Value.bru +++ b/bruno/APIM/Test_Without_PractionerRole_Reference_Value.bru @@ -1,7 +1,7 @@ meta { name: Test_Without_PractionerRole_Reference_Value type: http - seq: 27 + seq: 25 } post { diff --git a/bruno/APIM/Test_Without_PractionerRole_Reference_Value_IntEnvi.bru b/bruno/APIM/Test_Without_PractionerRole_Reference_Value_IntEnvi.bru index 78676f0..0999608 100644 --- a/bruno/APIM/Test_Without_PractionerRole_Reference_Value_IntEnvi.bru +++ b/bruno/APIM/Test_Without_PractionerRole_Reference_Value_IntEnvi.bru @@ -1,7 +1,7 @@ meta { name: Test_Without_PractionerRole_Reference_Value_IntEnvi type: http - seq: 53 + seq: 49 } post { diff --git a/bruno/APIM/Test_Without_Reference_in_Extension.bru b/bruno/APIM/Test_Without_Reference_in_Extension.bru index 48a876e..771693a 100644 --- a/bruno/APIM/Test_Without_Reference_in_Extension.bru +++ b/bruno/APIM/Test_Without_Reference_in_Extension.bru @@ -1,7 +1,7 @@ meta { name: Test_Without_Reference_in_Extension type: http - seq: 18 + seq: 17 } post { diff --git a/bruno/APIM/Test_Without_Reference_in_Extension_IntEnvi.bru b/bruno/APIM/Test_Without_Reference_in_Extension_IntEnvi.bru index d122ce5..c627f92 100644 --- a/bruno/APIM/Test_Without_Reference_in_Extension_IntEnvi.bru +++ b/bruno/APIM/Test_Without_Reference_in_Extension_IntEnvi.bru @@ -1,7 +1,7 @@ meta { name: Test_Without_Reference_in_Extension_IntEnvi type: http - seq: 44 + seq: 40 } post { diff --git a/bruno/APIM/Test_Without_ServiceRequest_IntEnvi.bru b/bruno/APIM/Test_Without_ServiceRequest_IntEnvi.bru index a272a98..7a6b6ae 100644 --- a/bruno/APIM/Test_Without_ServiceRequest_IntEnvi.bru +++ b/bruno/APIM/Test_Without_ServiceRequest_IntEnvi.bru @@ -1,7 +1,7 @@ meta { name: Test_Without_ServiceRequest_IntEnvi type: http - seq: 37 + seq: 33 } post { diff --git a/bruno/APIM/Test_Without_ServiceRequest_Requester.bru b/bruno/APIM/Test_Without_ServiceRequest_Requester.bru index ac653fd..8b503eb 100644 --- a/bruno/APIM/Test_Without_ServiceRequest_Requester.bru +++ b/bruno/APIM/Test_Without_ServiceRequest_Requester.bru @@ -1,7 +1,7 @@ meta { name: Test_Without_ServiceRequest_Requester type: http - seq: 23 + seq: 22 } post { diff --git a/bruno/APIM/Test_Without_ServiceRequest_Requester_IntEnvi.bru b/bruno/APIM/Test_Without_ServiceRequest_Requester_IntEnvi.bru index cf59d00..a7124a1 100644 --- a/bruno/APIM/Test_Without_ServiceRequest_Requester_IntEnvi.bru +++ b/bruno/APIM/Test_Without_ServiceRequest_Requester_IntEnvi.bru @@ -1,7 +1,7 @@ meta { name: Test_Without_ServiceRequest_Requester_IntEnvi type: http - seq: 49 + seq: 45 } post { diff --git a/bruno/APIM/Test_Without_ServiceRequest_Requester_Reference.bru b/bruno/APIM/Test_Without_ServiceRequest_Requester_Reference.bru index 982105a..a942e8e 100644 --- a/bruno/APIM/Test_Without_ServiceRequest_Requester_Reference.bru +++ b/bruno/APIM/Test_Without_ServiceRequest_Requester_Reference.bru @@ -1,7 +1,7 @@ meta { name: Test_Without_ServiceRequest_Requester_Reference type: http - seq: 24 + seq: 23 } post { diff --git a/bruno/APIM/Test_Without_ServiceRequest_Requester_Reference_IntEnvi.bru b/bruno/APIM/Test_Without_ServiceRequest_Requester_Reference_IntEnvi.bru index b57cd76..eb31aa5 100644 --- a/bruno/APIM/Test_Without_ServiceRequest_Requester_Reference_IntEnvi.bru +++ b/bruno/APIM/Test_Without_ServiceRequest_Requester_Reference_IntEnvi.bru @@ -1,7 +1,7 @@ meta { name: Test_Without_ServiceRequest_Requester_Reference_IntEnvi type: http - seq: 50 + seq: 46 } post { diff --git a/bruno/APIM/Test_Without_ServiceRequest_Resource.bru b/bruno/APIM/Test_Without_ServiceRequest_Resource.bru index 32a6c59..d87713e 100644 --- a/bruno/APIM/Test_Without_ServiceRequest_Resource.bru +++ b/bruno/APIM/Test_Without_ServiceRequest_Resource.bru @@ -1,7 +1,7 @@ meta { name: Test_Without_ServiceRequest_Resource type: http - seq: 14 + seq: 13 } post { diff --git a/bruno/APIM/Test_Without_ServiceRequest_Resource_IntEnvi.bru b/bruno/APIM/Test_Without_ServiceRequest_Resource_IntEnvi.bru index c310ad1..c210e9f 100644 --- a/bruno/APIM/Test_Without_ServiceRequest_Resource_IntEnvi.bru +++ b/bruno/APIM/Test_Without_ServiceRequest_Resource_IntEnvi.bru @@ -1,7 +1,7 @@ meta { name: Test_Without_ServiceRequest_Resource_IntEnvi type: http - seq: 42 + seq: 38 } post { diff --git a/bruno/APIM/environments/INTEGRATION.bru b/bruno/APIM/environments/INTEGRATION.bru index 0fff3e2..a314899 100644 --- a/bruno/APIM/environments/INTEGRATION.bru +++ b/bruno/APIM/environments/INTEGRATION.bru @@ -2,5 +2,6 @@ vars:secret [ PRIVATE_KEY_PATH, KID, PR_NUMBER, - JWT_SECRET + JWT_SECRET, + EXPIRED_BEARER_TOKEN ] From ec5f98ce57a4dd06012b1c20a4cc538d09e06164 Mon Sep 17 00:00:00 2001 From: samdasari11 Date: Tue, 28 Apr 2026 11:54:30 +0000 Subject: [PATCH 5/7] Added Bruno Test with CorrelationID --- ...ul_Response_IntEnvi_With_CorrelationID.bru | 479 ++++++++++++++++++ 1 file changed, 479 insertions(+) create mode 100644 bruno/APIM/Test_PDM_Bundle_Succesful_Response_IntEnvi_With_CorrelationID.bru diff --git a/bruno/APIM/Test_PDM_Bundle_Succesful_Response_IntEnvi_With_CorrelationID.bru b/bruno/APIM/Test_PDM_Bundle_Succesful_Response_IntEnvi_With_CorrelationID.bru new file mode 100644 index 0000000..c337451 --- /dev/null +++ b/bruno/APIM/Test_PDM_Bundle_Succesful_Response_IntEnvi_With_CorrelationID.bru @@ -0,0 +1,479 @@ +meta { + name: Test_PDM_Bundle_Succesful_Response_IntEnvi_With_CorrelationID + type: http + seq: 68 +} + +post { + url: https://int.api.service.nhs.uk/pathology-laboratory-reporting/FHIR/R4/Bundle + body: json + auth: inherit +} + +headers { + Content-Type: application/fhir+json + X-Correlation-ID: 93b04f20-a3b0-476f-a168-92d44669fda9 +} + +body:json { + { + "resourceType": "Bundle", + "identifier": { + "system": "https://tools.ietf.org/html/rfc4122", + "value": "1f859037-2942-4117-884a-f51b62db5a52" + }, + "type": "document", + "timestamp": "2022-03-08T12:09:00+00:00", + "entry": [ + { + "fullUrl": "urn:uuid:ce2073cd-7f19-4fd8-9956-f30ef7b4bd44", + "resource": { + "resourceType": "Composition", + "id": "ce2073cd-7f19-4fd8-9956-f30ef7b4bd44", + "extension": [ + { + "url": "http://hl7.eu/fhir/StructureDefinition/composition-basedOn-order-or-requisition", + "valueReference": { + "reference": "urn:uuid:1c38d507-9ad7-4b49-ba91-7da204842cac" + } + }, + { + "url": "http://hl7.eu/fhir/laboratory/StructureDefinition/composition-diagnosticReportReference", + "valueReference": { + "reference": "urn:uuid:35d46ca1-f253-4c97-b7ee-fb5fccdf6c20" + } + } + ], + "identifier": { + "system": "https://tools.ietf.org/html/rfc4122", + "value": "c3d5e6f7-8901-2345-6789-0abcdef12345" + }, + "status": "final", + "type": { + "coding": [ + { + "system": "http://snomed.info/sct", + "code": "721981007", + "display": "Diagnostic studies report" + } + ] + }, + "category": [ + { + "coding": [ + { + "system": "http://snomed.info/sct", + "code": "394915009", + "display": "General pathology (specialty)" + } + ] + } + ], + "subject": { + "reference": "urn:uuid:ab87a3f8-1d37-44a9-804e-5e962598a6e4", + "display": "WELSH, Joel", + "identifier": { + "system": "https://fhir.nhs.uk/Id/nhs-number", + "value": "9727710638" + } + }, + "date": "2022-03-08T12:09:00+00:00", + "author": [ + { + "reference": "urn:uuid:8a6d85b8-9837-4fed-a257-4cf207988338", + "display": "TD008362 PATH LAB 001" + } + ], + "title": "Laboratory Report", + "section": [ + { + "title": "CRP (C reactive protein) mass concentration in serum", + "code": { + "coding": [ + { + "system": "http://snomed.info/sct", + "code": "1106741000000105", + "display": "CRP (C reactive protein) mass concentration in serum" + } + ] + }, + "entry": [ + { + "reference": "urn:uuid:8697e1ea-a15d-4cab-95d9-7335f4b57e22" + } + ] + } + ] + } + }, + { + "fullUrl": "urn:uuid:8a6d85b8-9837-4fed-a257-4cf207988338", + "resource": { + "resourceType": "Organization", + "id": "8a6d85b8-9837-4fed-a257-4cf207988338", + "identifier": [ + { + "system": "https://fhir.nhs.uk/Id/ods-organization-code", + "value": "Y8J7D" + } + ], + "name": "TD008362 PATH LAB 001", + "address": [ + { + "line": [ + "PATHOLOGY LAB", + "7-8 WELLINGTON PLACE" + ], + "city": "LEEDS", + "district": "WEST YORKSHIRE", + "postalCode": "LS1 4AP" + } + ] + } + }, + { + "fullUrl": "urn:uuid:3c43b5b3-06d6-445f-ae9a-48d5f05df434", + "resource": { + "resourceType": "Organization", + "id": "3c43b5b3-06d6-445f-ae9a-48d5f05df434", + "identifier": [ + { + "system": "https://fhir.nhs.uk/Id/ods-organization-code", + "value": "B82033" + } + ], + "name": "PICKERING MEDICAL PRACTICE", + "address": [ + { + "line": [ + "SOUTHGATE" + ], + "city": "PICKERING", + "district": "NORTH YORKSHIRE", + "postalCode": "YO18 8BL" + } + ] + } + }, + { + "fullUrl": "urn:uuid:9a835acf-d715-4d84-8dcf-a8435f6417fe", + "resource": { + "resourceType": "Practitioner", + "id": "9a835acf-d715-4d84-8dcf-a8435f6417fe", + "identifier": [ + { + "system": "https://fhir.hl7.org.uk/Id/gmc-number", + "value": "C1008215" + } + ], + "name": [ + { + "use": "official", + "family": "GASKELL", + "given": [ + "Gale" + ], + "prefix": [ + "Dr" + ] + } + ] + } + }, + { + "fullUrl": "urn:uuid:d4f5e6a1-2b3c-4d5e-9f6a-7b8c9d0e1f2a", + "resource": { + "resourceType": "PractitionerRole", + "id": "d4f5e6a1-2b3c-4d5e-9f6a-7b8c9d0e1f2a", + "practitioner": { + "reference": "urn:uuid:9a835acf-d715-4d84-8dcf-a8435f6417fe" + }, + "organization": { + "reference": "urn:uuid:3c43b5b3-06d6-445f-ae9a-48d5f05df434", + "display": "PICKERING MEDICAL PRACTICE" + } + } + }, + { + "fullUrl": "urn:uuid:ab87a3f8-1d37-44a9-804e-5e962598a6e4", + "resource": { + "resourceType": "Patient", + "id": "ab87a3f8-1d37-44a9-804e-5e962598a6e4", + "identifier": [ + { + "system": "https://fhir.nhs.uk/Id/nhs-number", + "value": "9727710638", + "use": "official" + } + ] + } + }, + { + "fullUrl": "urn:uuid:1c38d507-9ad7-4b49-ba91-7da204842cac", + "resource": { + "resourceType": "ServiceRequest", + "id": "1c38d507-9ad7-4b49-ba91-7da204842cac", + "identifier": [ + { + "system": "http://B82033-pickeringmedicalpractice.com/labrequest", + "value": "REQ-20220307-000142" + } + ], + "status": "active", + "intent": "order", + "code": { + "coding": [ + { + "system": "http://snomed.info/sct", + "code": "135842001", + "display": "Serum C reactive protein level" + } + ] + }, + "subject": { + "reference": "urn:uuid:ab87a3f8-1d37-44a9-804e-5e962598a6e4", + "display": "WELSH, Joel", + "identifier": { + "system": "https://fhir.nhs.uk/Id/nhs-number", + "value": "9727710638" + } + }, + "authoredOn": "2022-01-29T10:24:00+00:00", + "requester": { + "reference": "urn:uuid:d4f5e6a1-2b3c-4d5e-9f6a-7b8c9d0e1f2a" + }, + "performer": [ + { + "reference": "urn:uuid:8a6d85b8-9837-4fed-a257-4cf207988338", + "display": "TD008362 PATH LAB 001" + } + ], + "specimen": [ + { + "reference": "urn:uuid:bab0eaec-1ec5-4598-b660-90bb38a1030d" + } + ] + } + }, + { + "fullUrl": "urn:uuid:35d46ca1-f253-4c97-b7ee-fb5fccdf6c20", + "resource": { + "resourceType": "DiagnosticReport", + "id": "35d46ca1-f253-4c97-b7ee-fb5fccdf6c20", + "identifier": [ + { + "system": "http://Y8J7D-pathlab001.com/report", + "value": "REP-20220308-004205" + } + ], + "basedOn": [ + { + "reference": "urn:uuid:1c38d507-9ad7-4b49-ba91-7da204842cac" + } + ], + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v2-0074", + "code": "LAB", + "display": "Laboratory" + } + ] + } + ], + "code": { + "coding": [ + { + "system": "http://snomed.info/sct", + "code": "721981007", + "display": "Diagnostic studies report" + } + ] + }, + "subject": { + "reference": "urn:uuid:ab87a3f8-1d37-44a9-804e-5e962598a6e4", + "display": "WELSH, Joel", + "identifier": { + "system": "https://fhir.nhs.uk/Id/nhs-number", + "value": "9727710638" + } + }, + "issued": "2022-03-08T12:09:00+00:00", + "performer": [ + { + "reference": "urn:uuid:8a6d85b8-9837-4fed-a257-4cf207988338", + "display": "TD008362 PATH LAB 001" + } + ], + "specimen": [ + { + "reference": "urn:uuid:bab0eaec-1ec5-4598-b660-90bb38a1030d" + } + ], + "result": [ + { + "reference": "urn:uuid:8697e1ea-a15d-4cab-95d9-7335f4b57e22" + } + ] + } + }, + { + "fullUrl": "urn:uuid:bab0eaec-1ec5-4598-b660-90bb38a1030d", + "resource": { + "resourceType": "Specimen", + "id": "bab0eaec-1ec5-4598-b660-90bb38a1030d", + "identifier": [ + { + "system": "http://B82033-pickeringmedicalpractice.com/specimen", + "value": "SPC-REQ-20220307-000105" + } + ], + "accessionIdentifier": { + "system": "http://Y8J7D-pathlab001.com/specimen", + "value": "SPC-Lab-20220307-007856" + }, + "status": "available", + "type": { + "coding": [ + { + "system": "http://snomed.info/sct", + "code": "122555007", + "display": "Venous blood specimen" + } + ] + }, + "subject": { + "reference": "urn:uuid:ab87a3f8-1d37-44a9-804e-5e962598a6e4", + "display": "WELSH, Joel", + "identifier": { + "system": "https://fhir.nhs.uk/Id/nhs-number", + "value": "9727710638" + } + }, + "receivedTime": "2022-03-07T14:58:00+00:00", + "collection": { + "collectedDateTime": "2022-03-07T11:42:00+00:00" + } + } + }, + { + "fullUrl": "urn:uuid:8697e1ea-a15d-4cab-95d9-7335f4b57e22", + "resource": { + "resourceType": "Observation", + "id": "8697e1ea-a15d-4cab-95d9-7335f4b57e22", + "identifier": [ + { + "system": "https://tools.ietf.org/html/rfc4122", + "value": "09fd65ba-4bbb-49dd-9d16-ca74f885db6c" + } + ], + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "laboratory", + "display": "Laboratory" + } + ] + } + ], + "code": { + "coding": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/valueset-reference", + "valueUri": "https://fhir.hl7.org.uk/ValueSet/UKCore-PathologyBoundedCodeListObservables" + } + ], + "system": "http://snomed.info/sct", + "code": "1001371000000100", + "display": "Serum CRP (C reactive protein) level" + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/valueset-reference", + "valueUri": "https://fhir.hl7.org.uk/ValueSet/UKCore-PathologyAndLaboratoryMedicineObservables" + } + ], + "system": "http://snomed.info/sct", + "code": "1106741000000105", + "display": "CRP (C reactive protein) mass concentration in serum" + } + ] + }, + "subject": { + "reference": "urn:uuid:ab87a3f8-1d37-44a9-804e-5e962598a6e4", + "display": "WELSH, Joel", + "identifier": { + "system": "https://fhir.nhs.uk/Id/nhs-number", + "value": "9727710638" + } + }, + "issued": "2022-03-08T12:09:00+00:00", + "performer": [ + { + "reference": "urn:uuid:8a6d85b8-9837-4fed-a257-4cf207988338", + "display": "TD008362 PATH LAB 001" + } + ], + "valueQuantity": { + "value": 200, + "unit": "mg/L", + "system": "http://unitsofmeasure.org", + "code": "mg/L" + }, + "interpretation": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "H", + "display": "High" + } + ] + } + ], + "specimen": { + "reference": "urn:uuid:bab0eaec-1ec5-4598-b660-90bb38a1030d" + }, + "referenceRange": [ + { + "low": { + "value": 0, + "unit": "mg/L", + "system": "http://unitsofmeasure.org", + "code": "mg/L" + }, + "high": { + "value": 5, + "unit": "mg/L", + "system": "http://unitsofmeasure.org", + "code": "mg/L" + } + } + ] + } + } + ] + } +} + +assert { + res.status: eq 200 + res.body.resourceType: eq "Bundle" + res.body.type: eq document + res.body.id: isNotEmpty + res.body.entry: isArray + res.body.entry[0].resource.subject.identifier.value: isNotEmpty +} + +settings { + encodeUrl: true + timeout: 0 +} From 0a7cf81c0fdd741e818ae845a3dbe4d15be4cd6a Mon Sep 17 00:00:00 2001 From: samdasari11 Date: Tue, 28 Apr 2026 13:23:38 +0000 Subject: [PATCH 6/7] Updated Bruno Test --- ...e_Succesful_Response_IntEnvi_With_CorrelationID_IntEnvi.bru} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename bruno/APIM/{Test_PDM_Bundle_Succesful_Response_IntEnvi_With_CorrelationID.bru => Test_PDM_Bundle_Succesful_Response_IntEnvi_With_CorrelationID_IntEnvi.bru} (99%) diff --git a/bruno/APIM/Test_PDM_Bundle_Succesful_Response_IntEnvi_With_CorrelationID.bru b/bruno/APIM/Test_PDM_Bundle_Succesful_Response_IntEnvi_With_CorrelationID_IntEnvi.bru similarity index 99% rename from bruno/APIM/Test_PDM_Bundle_Succesful_Response_IntEnvi_With_CorrelationID.bru rename to bruno/APIM/Test_PDM_Bundle_Succesful_Response_IntEnvi_With_CorrelationID_IntEnvi.bru index c337451..0403701 100644 --- a/bruno/APIM/Test_PDM_Bundle_Succesful_Response_IntEnvi_With_CorrelationID.bru +++ b/bruno/APIM/Test_PDM_Bundle_Succesful_Response_IntEnvi_With_CorrelationID_IntEnvi.bru @@ -1,5 +1,5 @@ meta { - name: Test_PDM_Bundle_Succesful_Response_IntEnvi_With_CorrelationID + name: Test_PDM_Bundle_Succesful_Response_IntEnvi_With_CorrelationID_IntEnvi type: http seq: 68 } From 4994393c0c7a6846f6e41b1e7205dc8961659dd8 Mon Sep 17 00:00:00 2001 From: samdasari11 Date: Tue, 28 Apr 2026 15:01:46 +0000 Subject: [PATCH 7/7] Updated Expired Token test --- .../Test_Expired_Bearer_Token_IntEnvi.bru | 422 +++++++++++++++++- 1 file changed, 406 insertions(+), 16 deletions(-) diff --git a/bruno/APIM/Test_Expired_Bearer_Token_IntEnvi.bru b/bruno/APIM/Test_Expired_Bearer_Token_IntEnvi.bru index 585a331..b7c02a9 100644 --- a/bruno/APIM/Test_Expired_Bearer_Token_IntEnvi.bru +++ b/bruno/APIM/Test_Expired_Bearer_Token_IntEnvi.bru @@ -7,65 +7,455 @@ meta { post { url: https://int.api.service.nhs.uk/pathology-laboratory-reporting/FHIR/R4/Bundle body: json - auth: inherit + auth: none } headers { Content-Type: application/fhir+json - Authorization: {{expired_bearer_token}} + Authorization: Bearer {{EXPIRED_BEARER_TOKEN}} } body:json { { "resourceType": "Bundle", + "identifier": { + "system": "https://tools.ietf.org/html/rfc4122", + "value": "1f859037-2942-4117-884a-f51b62db5a52" + }, "type": "document", + "timestamp": "2022-03-08T12:09:00+00:00", "entry": [ { - "fullUrl": "composition", + "fullUrl": "urn:uuid:ce2073cd-7f19-4fd8-9956-f30ef7b4bd44", "resource": { "resourceType": "Composition", + "id": "ce2073cd-7f19-4fd8-9956-f30ef7b4bd44", "extension": [ { "url": "http://hl7.eu/fhir/StructureDefinition/composition-basedOn-order-or-requisition", "valueReference": { - "reference": "servicerequest" + "reference": "urn:uuid:1c38d507-9ad7-4b49-ba91-7da204842cac" + } + }, + { + "url": "http://hl7.eu/fhir/laboratory/StructureDefinition/composition-diagnosticReportReference", + "valueReference": { + "reference": "urn:uuid:35d46ca1-f253-4c97-b7ee-fb5fccdf6c20" } } ], + "identifier": { + "system": "https://tools.ietf.org/html/rfc4122", + "value": "c3d5e6f7-8901-2345-6789-0abcdef12345" + }, + "status": "final", + "type": { + "coding": [ + { + "system": "http://snomed.info/sct", + "code": "721981007", + "display": "Diagnostic studies report" + } + ] + }, + "category": [ + { + "coding": [ + { + "system": "http://snomed.info/sct", + "code": "394915009", + "display": "General pathology (specialty)" + } + ] + } + ], "subject": { + "reference": "urn:uuid:ab87a3f8-1d37-44a9-804e-5e962598a6e4", + "display": "WELSH, Joel", "identifier": { "system": "https://fhir.nhs.uk/Id/nhs-number", - "value": "test-nhs-number" + "value": "9727710638" + } + }, + "date": "2022-03-08T12:09:00+00:00", + "author": [ + { + "reference": "urn:uuid:8a6d85b8-9837-4fed-a257-4cf207988338", + "display": "TD008362 PATH LAB 001" + } + ], + "title": "Laboratory Report", + "section": [ + { + "title": "CRP (C reactive protein) mass concentration in serum", + "code": { + "coding": [ + { + "system": "http://snomed.info/sct", + "code": "1106741000000105", + "display": "CRP (C reactive protein) mass concentration in serum" + } + ] + }, + "entry": [ + { + "reference": "urn:uuid:8697e1ea-a15d-4cab-95d9-7335f4b57e22" + } + ] + } + ] + } + }, + { + "fullUrl": "urn:uuid:8a6d85b8-9837-4fed-a257-4cf207988338", + "resource": { + "resourceType": "Organization", + "id": "8a6d85b8-9837-4fed-a257-4cf207988338", + "identifier": [ + { + "system": "https://fhir.nhs.uk/Id/ods-organization-code", + "value": "Y8J7D" + } + ], + "name": "TD008362 PATH LAB 001", + "address": [ + { + "line": [ + "PATHOLOGY LAB", + "7-8 WELLINGTON PLACE" + ], + "city": "LEEDS", + "district": "WEST YORKSHIRE", + "postalCode": "LS1 4AP" + } + ] + } + }, + { + "fullUrl": "urn:uuid:3c43b5b3-06d6-445f-ae9a-48d5f05df434", + "resource": { + "resourceType": "Organization", + "id": "3c43b5b3-06d6-445f-ae9a-48d5f05df434", + "identifier": [ + { + "system": "https://fhir.nhs.uk/Id/ods-organization-code", + "value": "B82033" } + ], + "name": "PICKERING MEDICAL PRACTICE", + "address": [ + { + "line": [ + "SOUTHGATE" + ], + "city": "PICKERING", + "district": "NORTH YORKSHIRE", + "postalCode": "YO18 8BL" + } + ] + } + }, + { + "fullUrl": "urn:uuid:9a835acf-d715-4d84-8dcf-a8435f6417fe", + "resource": { + "resourceType": "Practitioner", + "id": "9a835acf-d715-4d84-8dcf-a8435f6417fe", + "identifier": [ + { + "system": "https://fhir.hl7.org.uk/Id/gmc-number", + "value": "C1008215" + } + ], + "name": [ + { + "use": "official", + "family": "GASKELL", + "given": [ + "Gale" + ], + "prefix": [ + "Dr" + ] + } + ] + } + }, + { + "fullUrl": "urn:uuid:d4f5e6a1-2b3c-4d5e-9f6a-7b8c9d0e1f2a", + "resource": { + "resourceType": "PractitionerRole", + "id": "d4f5e6a1-2b3c-4d5e-9f6a-7b8c9d0e1f2a", + "practitioner": { + "reference": "urn:uuid:9a835acf-d715-4d84-8dcf-a8435f6417fe" + }, + "organization": { + "reference": "urn:uuid:3c43b5b3-06d6-445f-ae9a-48d5f05df434", + "display": "PICKERING MEDICAL PRACTICE" } } }, { - "fullUrl": "servicerequest", + "fullUrl": "urn:uuid:ab87a3f8-1d37-44a9-804e-5e962598a6e4", + "resource": { + "resourceType": "Patient", + "id": "ab87a3f8-1d37-44a9-804e-5e962598a6e4", + "identifier": [ + { + "system": "https://fhir.nhs.uk/Id/nhs-number", + "value": "9727710638", + "use": "official" + } + ] + } + }, + { + "fullUrl": "urn:uuid:1c38d507-9ad7-4b49-ba91-7da204842cac", "resource": { "resourceType": "ServiceRequest", + "id": "1c38d507-9ad7-4b49-ba91-7da204842cac", + "identifier": [ + { + "system": "http://B82033-pickeringmedicalpractice.com/labrequest", + "value": "REQ-20220307-000142" + } + ], + "status": "active", + "intent": "order", + "code": { + "coding": [ + { + "system": "http://snomed.info/sct", + "code": "135842001", + "display": "Serum C reactive protein level" + } + ] + }, + "subject": { + "reference": "urn:uuid:ab87a3f8-1d37-44a9-804e-5e962598a6e4", + "display": "WELSH, Joel", + "identifier": { + "system": "https://fhir.nhs.uk/Id/nhs-number", + "value": "9727710638" + } + }, + "authoredOn": "2022-01-29T10:24:00+00:00", "requester": { - "reference": "practitionerrole" - } + "reference": "urn:uuid:d4f5e6a1-2b3c-4d5e-9f6a-7b8c9d0e1f2a" + }, + "performer": [ + { + "reference": "urn:uuid:8a6d85b8-9837-4fed-a257-4cf207988338", + "display": "TD008362 PATH LAB 001" + } + ], + "specimen": [ + { + "reference": "urn:uuid:bab0eaec-1ec5-4598-b660-90bb38a1030d" + } + ] } }, { - "fullUrl": "practitionerrole", + "fullUrl": "urn:uuid:35d46ca1-f253-4c97-b7ee-fb5fccdf6c20", "resource": { - "resourceType": "PractitionerRole", - "organization": { - "reference": "organization" + "resourceType": "DiagnosticReport", + "id": "35d46ca1-f253-4c97-b7ee-fb5fccdf6c20", + "identifier": [ + { + "system": "http://Y8J7D-pathlab001.com/report", + "value": "REP-20220308-004205" + } + ], + "basedOn": [ + { + "reference": "urn:uuid:1c38d507-9ad7-4b49-ba91-7da204842cac" + } + ], + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v2-0074", + "code": "LAB", + "display": "Laboratory" + } + ] + } + ], + "code": { + "coding": [ + { + "system": "http://snomed.info/sct", + "code": "721981007", + "display": "Diagnostic studies report" + } + ] + }, + "subject": { + "reference": "urn:uuid:ab87a3f8-1d37-44a9-804e-5e962598a6e4", + "display": "WELSH, Joel", + "identifier": { + "system": "https://fhir.nhs.uk/Id/nhs-number", + "value": "9727710638" + } + }, + "issued": "2022-03-08T12:09:00+00:00", + "performer": [ + { + "reference": "urn:uuid:8a6d85b8-9837-4fed-a257-4cf207988338", + "display": "TD008362 PATH LAB 001" + } + ], + "specimen": [ + { + "reference": "urn:uuid:bab0eaec-1ec5-4598-b660-90bb38a1030d" + } + ], + "result": [ + { + "reference": "urn:uuid:8697e1ea-a15d-4cab-95d9-7335f4b57e22" + } + ] + } + }, + { + "fullUrl": "urn:uuid:bab0eaec-1ec5-4598-b660-90bb38a1030d", + "resource": { + "resourceType": "Specimen", + "id": "bab0eaec-1ec5-4598-b660-90bb38a1030d", + "identifier": [ + { + "system": "http://B82033-pickeringmedicalpractice.com/specimen", + "value": "SPC-REQ-20220307-000105" + } + ], + "accessionIdentifier": { + "system": "http://Y8J7D-pathlab001.com/specimen", + "value": "SPC-Lab-20220307-007856" + }, + "status": "available", + "type": { + "coding": [ + { + "system": "http://snomed.info/sct", + "code": "122555007", + "display": "Venous blood specimen" + } + ] + }, + "subject": { + "reference": "urn:uuid:ab87a3f8-1d37-44a9-804e-5e962598a6e4", + "display": "WELSH, Joel", + "identifier": { + "system": "https://fhir.nhs.uk/Id/nhs-number", + "value": "9727710638" + } + }, + "receivedTime": "2022-03-07T14:58:00+00:00", + "collection": { + "collectedDateTime": "2022-03-07T11:42:00+00:00" } } }, { - "fullUrl": "organization", + "fullUrl": "urn:uuid:8697e1ea-a15d-4cab-95d9-7335f4b57e22", "resource": { - "resourceType": "Organization", + "resourceType": "Observation", + "id": "8697e1ea-a15d-4cab-95d9-7335f4b57e22", "identifier": [ { - "system": "https://fhir.nhs.uk/Id/ods-organization-code", - "value": "testOrg" + "system": "https://tools.ietf.org/html/rfc4122", + "value": "09fd65ba-4bbb-49dd-9d16-ca74f885db6c" + } + ], + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "laboratory", + "display": "Laboratory" + } + ] + } + ], + "code": { + "coding": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/valueset-reference", + "valueUri": "https://fhir.hl7.org.uk/ValueSet/UKCore-PathologyBoundedCodeListObservables" + } + ], + "system": "http://snomed.info/sct", + "code": "1001371000000100", + "display": "Serum CRP (C reactive protein) level" + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/valueset-reference", + "valueUri": "https://fhir.hl7.org.uk/ValueSet/UKCore-PathologyAndLaboratoryMedicineObservables" + } + ], + "system": "http://snomed.info/sct", + "code": "1106741000000105", + "display": "CRP (C reactive protein) mass concentration in serum" + } + ] + }, + "subject": { + "reference": "urn:uuid:ab87a3f8-1d37-44a9-804e-5e962598a6e4", + "display": "WELSH, Joel", + "identifier": { + "system": "https://fhir.nhs.uk/Id/nhs-number", + "value": "9727710638" + } + }, + "issued": "2022-03-08T12:09:00+00:00", + "performer": [ + { + "reference": "urn:uuid:8a6d85b8-9837-4fed-a257-4cf207988338", + "display": "TD008362 PATH LAB 001" + } + ], + "valueQuantity": { + "value": 200, + "unit": "mg/L", + "system": "http://unitsofmeasure.org", + "code": "mg/L" + }, + "interpretation": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", + "code": "H", + "display": "High" + } + ] + } + ], + "specimen": { + "reference": "urn:uuid:bab0eaec-1ec5-4598-b660-90bb38a1030d" + }, + "referenceRange": [ + { + "low": { + "value": 0, + "unit": "mg/L", + "system": "http://unitsofmeasure.org", + "code": "mg/L" + }, + "high": { + "value": 5, + "unit": "mg/L", + "system": "http://unitsofmeasure.org", + "code": "mg/L" + } } ] }