Configuring HL7 version validation
Configure an HL7 DFDL model to validate the version of HL7 used by the messages that are received.
Before you start:
- Import one of the HL7 DFDL libraries into your workspace. You can import the libraries from the Healthcare: HL7 to HL7 DFDL pattern, see Integrating with HL7 applications for more information.
There are three versions of the HL7 DFDL model, one for HL7 version 2.7, one for HL7 version 2.6, and one
for HL7 version 2.5.1
and earlier. It is recommended that you use the DFDL model that matches the
version of HL7 used by
the messages that you are processing. However, by default, the models
do not check the HL7 version
that is used by incoming HL7 messages.
If you want to ensure that you are processing messages that are using
the expected version of HL7,
then you can enable version validation in your model by using the
following procedure.
You updated the DFDL schema.
If you receive any messages that do not match your required HL7 version (when you use the updated DFDL schema definition) then the DFDL parsing stops at the MSH.12 field, and the error message that is defined in the assertion is shown in the toolkit and the trace. For example,
A DFDL assert with condition '{./VID.1 eq '2.7'}' evaluated to false with message 'Incompatible HL7 version' during the parsing of 'MSH.12.VersionID'