HL7 conformance checking with Corepoint Integration Engine™
Although the HL7 2.X messaging standard is the most widely used standard in the United States for the exchange of clinical patient data, it varies greatly in how it is implemented by each medical device and application. Consequently, it is often called the “non-standard standard.” The purpose of HL7 2.X is to provide a framework for negotiation so that each healthcare interface is closer to 20% custom rather than 100% custom.
The variances in implementation lead to different message formats among healthcare vendors and external providers. In order to communicate effectively between systems with different message formats, you must determine where the messages are incompatible and make changes to at least one, and potentially both, of the interfaces that are accepting or sending messages.
Gap analysis or conformance checking for HL7 messages, is a logical process used to determine whether a message from one particular medical device or application is compatible to the standard HL7 messaging format, or a custom format, adopted by another device or application.
Why does nonconformance occur?
Nonconformance occurs for two main reasons:
- An application team utilizes the flexibility of the HL7 2.X message standard to meet their system’s unique requirements. This occurs primarily in the areas of cardinality and the HL7 version that is used.
- The HL7 messaging standard can be complex and sometimes is easily misinterpreted.
HL7 2.X is designed to be backward compatible to work with systems using different versions. However, there are a few instances where problems occur, such as when message triggers vary from version to version, for example MDM-TO2 exists in 2.3 but not in 2.2 so if that specific message trigger is sent to a system using 2.2, it will be nonconformant.
Additionally using an older version of HL7 to read a message produced using a newer version of HL7 can result in lost data. The message technically conforms to the standard as there is no data that is required that is missing but the older version has no knowledge of the newer data structures so the information stored there is simply ignored.
Cardinality, another cause of nonconformance, represents the minimum and maximum number of values that could exist inside a given element of the message. The HL7 messaging standard allows segments and fields to be either optional or required, and either singleton (non-repeating) or repeating. This same functionality exists for sub-components as well in 2.5.
For example, the Patient Address field (PID-11) can be optional and repeating. One development team may implement this exactly as the standard says and allow zero to infinite patient addresses. Another development team may require only one patient address, therefore allowing one and only one patient address. Messages from these two systems may not be conformant with each other.
Finally, while development teams are experts in their specialized area, such as a lab or pharmacy, that expertise does not necessarily transfer to HL7 messaging. The HL7 messaging standard, while extremely flexible, is also complex. Additionally, interfacing with other applications may not be the highest priority on the list when creating a clinical application. By the time interfacing is approached, decisions regarding how the application will work may have already been made. This could result in any number of messages from the application to lack HL7 compliance.
An application development team or implementation team may adjust the HL7 messaging standard to better support their application or system. Sometimes these adjustments make the message format used by that application or system noncompliant with the HL7 standard. For example, an application may have a database that only has one field for a patient alias and therefore the application only allows one patient alias to be entered in the GUI. The HL7 standard says that the patient alias field can repeat, so it is conceivable that a message received through an HL7 interface would have more than one patient alias.
Like most things regarding HL7 2.X, these differences need to be negotiated between the external healthcare vendors trying to exchange data.
How do you check for conformance?
As an analyst trying to ensure correct communication between medical devices and applications, you will have to look at all the possible predictable and unpredictable causes for nonconformance. Where do you start?
- First, determine how closely the incoming and outgoing message formats matches your own.
- Second, teach your system how to understand the different message format in order to receive and send messages.
- Finally, each message should be checked as it is coming into your application during run-time in order to verify that it provides your application with the fields you require. If it does not, make sure it is put aside to be evaluated for possible noncompliance.
Determining message format differences
Determining format differences starts with examining the healthcare vendor’s message specifications and sample messages. The set of sample of messages should be large enough to represent all types of messages you may be receiving. Using Corepoint Integration Engine, you can compare the specifications from the healthcare vendor’s messages with your message format to uncover any differences.
The following figure illustrates how Corepoint Integration Engine compares a vendor’s specification for a result message, to the HL7 2.2 standard definition of an ORU message. The differences between the message formats are outlined in red.
As shown in the previous figure, the standard contains the following segments that the vendor’s specification does not: PV1, NTE-1, and DSC. The vendor’s specification contains a custom ZPS segment after the order detail group.
The next figure illustrates running sample messages against a message format using Corepoint Integration Engine. In this example sample messages from the vendor whose specification is shown in the previous example are run against the 2.2 standard definition of an ORU message to gain further confirmation of message differences.
In the previous diagram, the sample messages are not conformant as indicated by the red unequal sign. The specific parts of the message that are not conformant are highlighted in red and the description of the differences between the sample messages and format is listed. In this example the custom ZPS segment is what is making these messages not conform to the standard definition.
Teaching your interface to understand the message differences
Using the specification and sample messages, you can use Corepoint Integration Engine to create a derivative that is representative of the vendor’s message format. This allows Corepoint Integration Engine to receive from and send messages in the application’s desired format.
The following figure shows the same specification and a representative derivative created in Corepoint Integration Engine.
Letting Corepoint Integration Engine check message conformance
Once you have the derivative created to match the specifications, you can use Corepoint Integration Engine to check the conformance of the sample messages against the derivative and make modifications until all the messages pass conformance.
The following figure shows the conformance checking options and results available in Corepoint Integration Engine.
The previous figure shows a group of 133 sample messages that have been checked for conformance against a derivative created to work with the message format. The Summary shows the errors with the largest number of messages affected at the top.
Checking messages during run-time
The same functionality that checks conformance in messages is also available during run-time to verify the information you need in the message is available. As shown in the following figure, there are options available that define how stringent the checks on messages coming into your system are. You must weigh both the advantages and disadvantages of how strict your conformance checking is for incoming messages. The stricter your conformance checking at run-time, the more messages will error and require manual intervention to process.
Typically you will decide to ignore the unexpected segments when you are in run-time mode, which complies with HL7’s recommendation to ignore unexpected elements. You may also want to enforce required elements to prevent the receiving of incomplete data. Corepoint Integration Engine provides the flexibility to ignore unexpected message elements and enforce required message elements as shown in the following conformance check options configuration window.
Corepoint Integration Engine can greatly reduce the time required to conformance check HL7 messages and increase accuracy by:
- Validating HL7 messages against any selected version (standard or user-modified)
- Ensuring messages comply with the desired format
- Eliminating or reducing time spent on message error correction once deployed
- Automatically checking messages against a defined custom format to find message nonconformance
About Corepoint Health
Corepoint Health has the healthcare IT experience and strength to deliver a dramatically simplified approach to internal and external data integration and health information exchange for hospitals, radiology centers, laboratories, and clinics. Our next generation software solutions are transformational and will streamline your IT environment, provide a fast track to achieving your interoperability goals, and create operational leverage within your organization. Corepoint Health’s solutions achieve a needed balance of being both intuitive and sophisticated while delivering solid functionality and performance.