Demographics

HL7 Integration Assurance Test Script

Demographics

Overview

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 demographics. Specifically:

    • Creating a new medical record

    • Updating the demographics of an existing medical record

    • Patient identification (hard and soft matching) when adding data to a medical record

    • 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.

Scope

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

.

Test Script

Terminology

For the purpose of this test script, the following terms will be used as described.

HL7 Registration Message. Either an A28 or A31 message.

HL7 Data Message. An HL7 message supported by PKB which is neither an HL7 Registration Message nor a query message.

Valid NHS Number. An identifier which meets the NHS numbering criteria, and has been provided in the HL7 message with a status code equal to 01, and with an Assigning Authority and Identifier Type Code which match those defined by PKB.

Valid Organisation Level ID. An identifier which has been provided in the HL7 message with an Assigning Authority and Identifier Type Code which match one of the Organisation Level ID Types agreed with PKB before testing begins.

Invalid Organisation Level ID. An identifier which has been provided in the HL7 message with an Assigning Authority and Identifier Type Code which do not match one of the Organisation Level ID Types agreed with PKB before testing begins.

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 web interface for the integrating party has been configured to display Organisation Level IDs and/or Team Level IDs as appropriate.

    • 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.

Creating a medical record (explicit creation)

Single Source Testing

The following tests should be performed using an HL7 registration message (A28 or A31). PKB handles both messages identically, so the choice of message is left to the integrating party.

Multiple Source Testing

Multiple source testing is not meaningful when creating a new medical record. Any given patient only has one medical record, and as such it can only be created once. Multiple source issues only appear when updating an existing medical record.

.

Creating a medical record (automatic creation)

Single Source Testing

An HL7 Data Message for an unknown patient should trigger the automatic creation of a new medical record, providing auto-create has been enabled on the interface. If auto-create has not been enabled then such a message will be rejected.

PKB performs this logic for any HL7 Data Message, e.g. new appointment, new lab result, new encounter. As such, the choice of data message is left to the integrating party.

Multiple Source Testing

Multiple source testing is not meaningful when creating a new medical record. Any given patient only has one medical record, and as such it can only be created once. Multiple source issues only appear when updating an existing medical record..

Updating demographics (medical record not associated with NHS number)

Single Source Testing

The following tests should be performed using an HL7 Registration Message (A28 or A31). PKB handles both messages identically, so the choice of message is left to the integrating party.

Multiple Source Testing

The NHS number is the common identifier used across British PKB environment. As such, it is not possible to have multiple senders add data via HL7 to a medical record that does not have an NHS number associated with it.

However, there is an error condition that should be tested. A sender cannot add an NHS number to a medical record if that NHS number is already associated with a different medical record. The situations where this can arise, and the implications, are covered in the Numbering Strategy. The test below covers this scenario.

.

Updating demographics (medical record associated with NHS number)

Single Source Testing

The following tests should be performed using an HL7 Registration Message (A28 or A31). PKB handles both messages identically, so the choice of message is left to the integrating party.

Multiple Source Testing

Tests 4.06 through 4.10 are repetitions of the tests above, except that PKB Test Patient A is being targeted. 4.11 tests the behaviour when a queued message is leapfrogged by another message.

.

Soft matching when sending data

Single Source Testing

An HL7 Data Message for a known patient will have their last name, first name initial, and date of birth compared to that in PKB. PKB performs this logic for any message that contains data points to be added to a patient’s medical record, e.g. new appointment, new lab result. As such, choice of data message is left to the integrating party.

Multiple Source Testing

These tests should be repeated against the PKB Test Patient A.