Creating VMD Tables for an ADT message

Introduction

Creating VMD Tables for an ADT message: In this tutorial you will learn how to create a VMD file containing database tables corresponding to an HL7 ADT message.

We will create a file that uses similar table structures to the demo.vmd files that are included supplied with Iguana. This way you have something to compare to, and you can try it in the basic tutorials.

To create a custom VMD file to match your HL7 message structure, just follow the same steps using your own table structure. Substitute your own message requirements in the steps that copy/compare the supplied message or demo.vmd.

If you have any questions about using Chameleon please contact us at support@interfaceware.com.

Note: The demo.vmd file supplied with different versions of Iguana has changed over the years — so yours may not exactly match the one used here (but it will be similar).

You can download this version of demo.vmd which is the one we use on this page.

Tutorial Instructions [top]

  1. Run Chameleon
    For example you can search for “chameleon” in Windows 10:
    search for chameleon windows 10
    Note: Chameleon is a Windows only program that is bundled with the Iguana for Windows install.
  2. Close the Chameleon welcome screen.
  3. Create an empty VMD by clicking the New button on the toolbar:
    chameleon new VMD
  4. Create the ADT message.
    1. Click Message on the toolbar to create a message:
      chameleon new message
    2. Change the message name to ADT.
      Click on the name to edit it and type “ADT”:
    3. Double click the Identity and enter “ADT Event” in the Description:
  5. Add the patient table to match the demo.vmd.
    Note: To add custom tables simply create tables that match your requirements.

    1. Click Table on the toolbar to create a table:
      chameleon new table
    2. Change the table name to patient.
      Click twice (slowly) on the name to edit it and type “patient”:
    3. Double click the renamed patient table to edit it.
    4. Enter “Patient Table” in the Description field:
    5. Add the Id Key column to the patient table.
      Click in the column field and replace “Column1” with “Id”:

      Then select the Key check box:
    6. Add the remaining columns.
      Note: All columns are String except for Dob which is Date Time.

      • LastName
      • GivenName
      • Race
      • PhoneHome
      • PhoneBusiness
      • Religion
      • MaritalStatus
      • Ssn
      • LicenseNumber
      • Dob (data type: Date Time)
      • Sex
      • Weight
    7. When you have finished the table will look like this:
  6. Add the remaining table to match the demo.vmd.
    Note: To add custom tables simply create tables that match your requirements.

    1. Create the kin table, no key column, all columns are String.
      • Description: “Next of kin”
      • PatientId
      • LastName
      • FirstName
      • Relationship
    2. When you have finished the table will look like this:
      chameleon next of kin table
  7. Add the Tables to the new message definition.
    1. Edit the ADT Message Grammar by double clicking on it:

      This will open the message grammar dialog:
    2. Right click and insert the Tables into the Table Grammar pane:
      chameleon insert table into grammar
    3. The Table Grammar pane should now contain both tables:
      chameleon message grammar

      Tip: You can re-order the tables using click and drag.

    4. Ignore the “Grammar root is not set” warning as this is a legacy setting that is not required when using VMD files with Iguana:
      chameleon grammar root not set
  8. Compare the new table grammar to demo.vmd.
    Note: When using your own tables check that they match your requirements.

    1. Open the supplied demo.vmd (<install dir>\edit\admin\other\demo.vmd) in Chameleon.
      Get the demo.vmd from the Translator project file pane:
      Iguana open vmd
    2. Then click Open to open it in Chameleon:
      open in chameleon
    3. Comparing the two message grammars shows they are the same:
      Compare table definition chameleon
    4. Compare the table definitions.
      1. Double click the patient tables and compare definitions:
      2. Compare the kin table the same way.
  9. The demo.vmd contains extra segments (and composites) that are not needed. Because it is best practice to keep our VMD as simple as possible we will not add any of these.
    Here you can see some of the extra (unused) segments:
    chameleon unused segments

    Note: Keeping the VMD as simple as possible (minimum number of messages, no unused segments) helps to reduce overheads and improve performance.
  10. Save your new VMD file as demo_tables.vmd.
  11. Test the demo_tables.vmd file in a project.
    1. Open a channel that uses the demo.vmd:
    2. Add demo_tables.vmd to the project, using the [+] link:
    3. Duplicate the db.tables{} statement using demo_tables.vmd:
    4. Compare both Out table node trees as you can see they are identical (other than the order):
      view messages

More Information [top]