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]
- Run Chameleon
For example you can search for “chameleon” in Windows 10:
Note: Chameleon is a Windows only program that is bundled with the Iguana for Windows install. - Close the Chameleon welcome screen.
- Create an empty VMD by clicking the New button on the toolbar:
- Create the ADT message.
- Click Message on the toolbar to create a message:
- Change the message name to ADT.
Click on the name to edit it and type “ADT”:
- Double click the Identity and enter “ADT Event” in the Description:
- Click Message on the toolbar to create a message:
- Add the patient table to match the demo.vmd.
Note: To add custom tables simply create tables that match your requirements.
- Click Table on the toolbar to create a table:
- Change the table name to patient.
Click twice (slowly) on the name to edit it and type “patient”:
- Double click the renamed patient table to edit it.
- Enter “Patient Table” in the Description field:
- 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:
- 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
- When you have finished the table will look like this:
- Click Table on the toolbar to create a table:
- Add the remaining table to match the demo.vmd.
Note: To add custom tables simply create tables that match your requirements.- Create the kin table, no key column, all columns are String.
- Description: “Next of kin”
- PatientId
- LastName
- FirstName
- Relationship
- When you have finished the table will look like this:
- Create the kin table, no key column, all columns are String.
- Add the Tables to the new message definition.
- Edit the ADT Message Grammar by double clicking on it:
This will open the message grammar dialog:
- Right click and insert the Tables into the Table Grammar pane:
- The Table Grammar pane should now contain both tables:
Tip: You can re-order the tables using click and drag.
- Ignore the “Grammar root is not set” warning as this is a legacy setting that is not required when using VMD files with Iguana:
- Edit the ADT Message Grammar by double clicking on it:
- Compare the new table grammar to demo.vmd.
Note: When using your own tables check that they match your requirements.- Open the supplied demo.vmd (<install dir>\edit\admin\other\demo.vmd) in Chameleon.
Get the demo.vmd from the Translator project file pane:
- Then click Open to open it in Chameleon:
- Comparing the two message grammars shows they are the same:
- Compare the table definitions.
- Double click the patient tables and compare definitions:
- Compare the kin table the same way.
- Double click the patient tables and compare definitions:
- Open the supplied demo.vmd (<install dir>\edit\admin\other\demo.vmd) in Chameleon.
- 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:
Note: Keeping the VMD as simple as possible (minimum number of messages, no unused segments) helps to reduce overheads and improve performance. - Save your new VMD file as demo_tables.vmd.
- Test the demo_tables.vmd file in a project.
- Open a channel that uses the demo.vmd:
- Add demo_tables.vmd to the project, using the [+] link:
- Duplicate the
db.tables{}
statement using demo_tables.vmd:
- Compare both
Out
table node trees as you can see they are identical (other than the order):
- Open a channel that uses the demo.vmd: