Laboratory results

HL7 Integration Assurance Test Script

Laboratory Results


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 on but details of the test environment do not fall within the scope of this document.


Test Script


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 an ORU^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.

Multiple Source Testing

The following tests should be performed using an ORU^R01 message, sent to PKB Test Patient A.