iNTERFACEWARE Products Manual > Learning Center > Tutorials and Sample Scenarios > Working With a Database > Database to HL7 > Step 3 - Generating Messages > Basic Database Schema |
|
Looking for Iguana v.5 or v.6? Learn More or see the Help Center.
The database schema for this channel consists of the following tables:
In this tutorial example, you have created a table named PatientRegistration, so a table named PatientRegistration is defined for your database. For example, here is a PatientRegistration table with two data rows defined:
The PatientRegistration table in the database is identical to the table in your VMD file, except that two fields have been added: MESSAGE_ID and PARENT_ID. MESSAGE_ID contains a value that serves as a message identifier: no two MESSAGE_ID values can be the same.
In this tutorial example, a message definition named PatientRegister is defined in the VMD file, so a status table named PatientRegister is created. This status table consists of two columns:
To generate messages from the data in the PatientRegistration table, you must create rows in the PatientRegister status table whose MESSAGE_ID values match the MESSAGE_ID values in the PatientRegistration table:
When you set the status to W (for "waiting"), you tell Iguana to generate messages from the rows of the PatientRegistration data table whose MESSAGE_ID values are msg001 and msg002. Iguana then generates HL7 messages based on the data contained in these two rows. When Iguana has finished generating an HL7 message, it removes the W from the STATUS column for that message. If an error occurs while trying to generate the message, error information is placed in the STATUS column; this error information is truncated if it is longer than 255 characters. A message is considered successfully sent if the receiving party sends an ACKnowledgment message in return; in this case, the STATUS column is modified to contain Success.
Now that you know how messages are sent, you are ready to try sending some test messages through the channel that you have created. |