Skip to main content

HL7 to Database

HL7 to Database is an example component for mapping HL7 messages to a database table. This component is designed as a sink (destination) component which will read in HL7 messages from a queue and insert them into a database.

How to set it up:

Import the HL7 -> Database component

On the Dashboard, click +COMPONENT and search for HL7 to Database.

Enter the Translator to view the example starter code - Click Edit > Make a Copy and Edit

Familiarize yourself with the what the script is doing. Step by step comments are included to help walk through each line.

To summarize:

  • HL7 inbound messages are parsed using a VMD - adt.vmd.

  • A VDB file is used to create a staging table mirroring the database.

  • The Lua file, mapping.vmd, includes the logic to map the HL7 fields to the database table fields.

  • Iguana connects to the database and the staging table is merged with the database table to insert a new row of HL7 data.

Connect an upstream component and test your integration - Run your components!

HL7 to Database is a sink component which is designed to receive queued messages. Link a component like the HL7 Server to HL7 to Database and use the Simulator to generate a stream of HL7 messages to be inserted into the database.

Once linked, run your components! Your integration may look like this:

See Linking components.