Creating a VMD

VMD files give an easy way to read HL7 and X12 files in a manner that can be understood by humans.

Follow these steps below to learn how this is done:

You probably have done this a million times now. Create a Component - I believe in you

  1. Choose Create File from the 3 dots beside the folder.

Screen Shot 2024-09-18 at 5.13.50 PM.png
  1. Name the file test and choose .vmd from the drop down arrow. Click CREATE to add the file.

Screen Shot 2024-09-18 at 5.16.45 PM.png
  1. Click the ellipsis as shown below, and click IMPORT:

  1. Choose HL7 v2.4 and select ADTA01 and click Import.

Iguana will automatically create a Matching Rule based on the imported definition. You can edit the matching rules as needed. The order of the matching rules matters! Iguana will check incoming messages against the matching rule list in order, the first match is applied. For example, see Creating a Catchall Matching Rule.

  1. Copy this ADT A01 message below to match what we imported into our test.vmd file:

MSH|^~\&|MESA_ADT|XYZ_ADMITTING|iFW|ZYX_HOSPITAL|||ADT^A01|103102|P|2.4|||||||| EVN||200007010800||||200007010800 PID|||583295^^^ADT1||DOE^JANE||19610615|M-||2106-3|123 MAIN STREET^^GREENSBORO^NC^27401-1020|GL|(919)379-1212|(919)271-3434~(919)277-3114||S||PATID12345001^2^M10|123456789|9-87654^NC NK1|1|BATES^RONALD^L|SPO|||||20011105 PV1||E||||||5101^NELL^FREDERICK^P^^DR|||||||||||V1295^^^ADT1|||||||||||||||||||||||||200007010800|||||||| PV2|||^ABDOMINAL PAIN OBX|1|HD|SR Instance UID||1.123456.2.2000.31.2.1||||||F|||||| AL1|1||^PENICILLIN||PRODUCES HIVES~RASH AL1|2||^CAT DANDER DG1|001|I9|1550|MAL NEO LIVER, PRIMARY|19880501103005|F|| PR1|2234|M11|111^CODE151|COMMON PROCEDURES|198809081123 ROL|45^RECORDER^ROLE MASTER LIST|AD|CP|KATE^SMITH^ELLEN|199505011201 GT1|1122|1519|BILL^GATES^A IN1|001|A357|1234|BCMD|||||132987 IN2|ID1551001|SSN12345678
  1. Click Add Sample Data button in the translator:

  1. Paste the message, then give the sample data a name and click ADD:

  1. It will create a new Samples folder with your sample message inside:

In your main.lua file the main function will look like this:

function main(Data) local message = hl7.parse{vmd='test.vmd', data=Data} trace(message) end
  • Now that the sample data is imported correctly, we can map it to the .vmd file we have created.

  • Using hl7.parse{} we will trace the message to view it:

 

Related pages