This tutorial uses the Iguana Translator to map patient data from a database to an outgoing stream of HL7 messages. It is based on work done to with a client to convert a legacy Iguana 4.5 Database channel to the Iguana Translator.
One thing that is a little unusual is the structure of the NHCCVSREPORT table that is used to populate the interface. This table was originally set up by our client specifically for driving the interface in Iguana 4. He used a mixture of stored procedures and VB.NET code to populate the table, which made sense for working with the From Database channel component in Iguana 4. With Translator it would be a lot easier to pull the data directly from the database, by using SELECT queries. However we decided to use the existing NHCCVSREPORT table as it is already available, and a reliable proven solution.
- The client currently uses a legacy Iguana 4.5 channel:
- The channel uses the a legacy From Database component
- Two database tables are supplied for retrieving the data:
- NHCCVS: A “queue” containing the messages to be processed.
- NHCCVSREPORT: A table containing the data for those records.
- The data is output using a custom HL7 message format NHCCVIS, as defined by the client.
- The client has supplied us with the CVISOutbound.vmd file that defines the format of the custom message, and the tables.
- The client needs to verify that the new solution produces the same results as the legacy channel.
- Implement a new channel in the Iguana Translator:
- It will use a From Translator component to poll the database for messages to be processed.
- It will use a Filter component to map the data to the NHCCVIS message.
- It will use an LLP Cient component to send out the HL7 messages.
- We will use the file to create the message and the database tables.
- We will create a regression test channel, to compare the output from the new and old solutions.
A Better Solution?
If we were creating this from scratch rather than converting an old channel we would suggest one change. We would not use the NHCCVSREPORT table, instead we would use SQL queries in the Translator to pull the data directly from the database tables. This would make the solution much quicker and easier to develop (certainly easier than stored procedures and VB.NET), and all the code is in kept in one place, contained in the Translator. Because of this, the solution would be simpler and easier to maintain.
Now we have defined the problem and the solution. The next step is to create the database tables that we will use for this tutorial.