This document defines a series of tests that a new HL7 integration will need to perform before passing QA. This test script should be run with support from PKB, and will provide assurance that the new interface is behaving as expected.
This test script focusses on laboratory results. Specifically:
Sending test results for unmapped tests
Performing the above in a multi-source environment
In addition to providing some useful test cases, this document is anticipated to be instructional since it highlights the expected outcome for a number of different scenarios.
This document is intended to be a mid-level test script. Whilst it adds detail to the high level test plan by providing specific test cases, it does not detail the exact messages to be sent by the integrating party. There may well be specific nuances relevant to the integrating party, and these will either need addressing separately, or else used to form the basis of a tailored version of this test script. Furthermore, this test script is not intended to provide comprehensive test coverage such as that required by PKB’s internal functional testing.
Also, note that this test script does not relate specifically to any particular environment. It is anticipated that these tests are performed onsandbox.patientsknowbest.com but details of the test environment do not fall within the scope of this document.
Test ID. The ID used by the integrating party to identify a test type. Typically found in OBX-3.1
Lab Report Service. The service from which the tests were requested. Typically found in OBR-4.2
Order Number. The value identifying a specific test result (or set of test results). Typically found in OBR-3.1
Test Script Preconditions
Before this test script is run, the following preconditions must be true:
The integrating party has been assigned HL7 credentials to the test environment.
PKB has configured the corresponding interface as follows:
Soft-match enabled for lastName, firstNameInitial, dateOfBirth
Checking of NHS number status enabled
All Organisation Level ID Types and Team Level ID Types have been configured, including the agreed Assigning Authority and Identifier Type Code values for any local identifiers
The integrating party is configured to be part of an Organisation Network which includes the PKB test organisation.
The PKB test organisation has created a medical record (referred to as PKB Test Patient A), has associated that medical record with an NHS number, and passed the NHS number to the integrating party.
Sending laboratory results (unmapped)
Single Source Testing
The following tests should be performed using anORU R01 message.
Notation: Test ID X and Lab Report Service Y are used to indicate identifiers that the tester is free to replace with their own identifiers, the numbers simply indicate when to re-use or change the identifier.
Send a numerical test result for Test ID 1, Lab Report Service 1.
Tests are visible in the Health > Laboratory overview page.
Test is visible in the GUI. It has been added into a group whose name is that of Lab Report Service 1.
Send a new numerical test result for Test ID 1, Lab Report Service 1, and the same Order Number as before.
Test details are available by clicking on the test in the overview page.
No new tests appear in the overview page. When viewing the test details, the corrected result is displayed, along with a red “[C]” indicating the record has been corrected.
Send a second numerical test result for Test ID 1, Lab Report Service 1.
No new tests appear in the overview page, but the second test result is visible alongside the first in the detailed page. The results have been graphed.
Send a numerical test result for Test ID 2, Lab Report Service 1.
In the overview page, the second test appears as a new test in the same grouping as the first test result.
Send a numerical test result for Test ID 3, Lab Report Service 2.
In the overview page, the test appears as a new test in a new group whose name is that of Lab Report Service 2.
Send a textual report for Test ID 4, Lab Report Service 3.
Report is visible in the GUI. It has been added into a group whose name is that of Lab Report Service 3. Textual results cannot be graphed.
Send multiple test results for Lab Report Service 4.
In the overview page, the results appear in the order they were sent, within a group whose name is that of Lab Report Service 4.
Send the same results as used in Lab.1.07 but with a new Order Number and use Lab Report Service 5.
Groups require each test to be associated with just one Lab Report Service. A group of “Other” is used when this is not the case.
In the overview page, the lab results for Lab Report Service 4 and 5 have been combined into one group called “Other”.
Multiple Source Testing
The following tests should be performed using anORU R01 message, sent to PKB Test Patient A.
Send a test result to a Lab Report Service already used for PKB Test Patient A, but with your own Test ID.
Groupings are not maintained per sender; similarly named Lab Report Services will have their tests grouped together.
The new test is added to the existing group in the overview page.
Send a test result to a Lab Report Service already used for PKB Test Patient A, and also with a Test ID already used within that Lab Report Service.
Although groupings are common, Test IDs are local to each sender.
The test, although having a matching Test ID, is added as a new entry within the existing group. This is because Test IDs are local to senders.
Send a test result with an unused Test ID and an unused Lab Report Service.
In a multi source environment, you are still able to send previously unseen Lab Report Services.
The test appears in the overview page under a new group, whose name matches that of your Lab Report Service.