HL7 to HL7

Understanding Differences

The first issue is that Z-segments from the original data feed are not being mapped. Let’s look at that:

The original message at the top has the ZID segment at the end, but the mapped output string does not. Why does our logic not pick that Z-segment up?

The answer is to be found by looking at the Orig node tree returned by hl7.parse{}

Notice there is no ZID segment? Why?

The reason is simple: it is clearly explained by the warning we saw earlier from hl7.parse:

  • The hl7.parse{} function can only map segments that are defined in the VMD it uses
  • The transform.vmd does not contain a Z-segment definition

To pick up the Z-segment using hl7.parse{} we would need to edit the transform.vmd file in Chameleon and add a definition for the Z-segment.

The Translator however gives us many options. Here are some possible solutions:

  1. Decide that it’s correct to filter out Z-segments
    • Then we could tweak the CheckTransform function so missing Z-segments do not raise an error
  2. Alter the VMD file to include a definition for the Z-segments
  3. Make a reusable module which can find and pass through Z-segments

In this case we’re going to go for option 3 and make a reusable module that can filter out Z-segments. This illustrates one of the greatest core strengths of the Translator, namely that it’s an extensible environment which encourages the use of reusable modules to perform common tasks.

A big part of our mission here at iNTERFACEWARE is to provide these kinds of modules and encourage sharing of tips and ideas like this within our user community. Ask about our Linked In community.

Leave A Comment?