HL7 to HL7

Understanding transform.vmd

Iguana has some dependencies on Chameleon for the hl7.parse{} and hl7.message{} functions.

We will only need a few features of Chameleon. To edit the VMD hover your mouse over the context menu icon and click on Get…

This will download the transform.vmd and load it into Chameleon so you can edit it:

You can see the three Message Definitions. The only things that matter are the Identity and Message Grammar.

The Identity configuration specifies the matching rules that hl7.parse{} uses.

There are two matching rules:

  1. ADT – MSH.9 field with value ADT
  2. Lab – MSH.9 field with value ORU

While the Catchall is configured to catch everything else:

This configuration is accessible by clicking on any matching order Change… button

Note: The checkbox for Make last message definition match any message.

What each message definition parses is determined by the Message Grammar. Let’s look at those:

This is the one for the ADT message:

Notice how it doesn’t have any Z-segments? That’s why they did not show up before. If we wanted to we could define a Z-segment and put it into the grammar for this message.

The Catchall message only has one segment defined:

This is because we do not know the grammar of unknown messages other than the fact that all HL7 messages have a MSH header.

Leave A Comment?