Parse an HL7 message

Verified
Added by iNTERFACEWARE

How to parse an HL7 message and create an HL7 output message

Source Code
local Msg, Name = hl7.parse{vmd='example/demo.vmd',data=Data}
local Out = hl7.message{vmd='example/demo.vmd',name=Name}
Description
How to parse an HL7 message and create an HL7 output message
Usage Details

When you parse an HL7 input message you also need to create an HL7 output message. The reason for this is that hl7.parse() returns a read-only node tree (so you always have an unchanged copy of the original message). Therefore you also need to use hl7.message() to create a writable node tree to use when mapping, filtering and transforming the message.

How to use the snippet:

  • Paste the code into a Filter or To Translator script
  • Change the vmd parameter if you want to use a different VMD file
  • Do not change the data parameter (99.9% of the time it is correct as is)