iNTERFACEWARE Products Manual > Installing and Using Chameleon > Tutorials and Exercises > Application to HL7 > Step 2 - Mapping Data To HL7 > Defining the Tables > Defining the MessageInfo Table |
|
Looking for Iguana v.5 or v.6? Learn More or see the Help Center.
The MessageInfo table will contain all the data to be included in the MSH segment of the message. To determine this data, start by examining the MSH segment in the Message Browser:
If you expand the MSH segment node of the sample message, you'll see the complete list of fields defined for this segment: In this display, fields that must be included in a valid MSH segment are marked with an orange flag. These fields are:
In addition to the mandatory fields described above, it is useful to specify the following fields in the MSH segment:
Many of the fields described above do not need to be included in your MessageInfo table, as Chameleon takes care of them for you. Your table only needs to include the following:
Now that you know what fields need to be included in the MessageInfo table, you can create the table itself:
The MessageInfo Table window now looks like this: Each row of the MessageInfo Table window represents a column of the data table it is defining. To fill in the MessageInfo Table, perform the following steps:
When you are finished defining the table, it should look like this:
For the final step of the MessageInfo table creation process, recall that four of the six columns of the table have predefined values that will be included in every MSH segment you generate:
To set these predefined values, you will use outbound scripts. You can define an outbound script for any data field in the table; this script modifies data obtained from the table. An outbound script can also be used to generate data if none exists. The modified or generated data is then used when producing the MSH segment. Outbound scripts are stored in the Outbound Script column of the MessageInfo table. They are written in Python, a well-known scripting language.
To create outbound scripts for the MessageInfo table:
In outbound scripts, value is a special variable that represents the data for a field. In this script, value is set to 'TEST CLIENT'. This means that, in every generated message, the SendingApplication field of the MSH segment will always be set to 'TEST CLIENT'. You will need similar outbound scripts for the other fields you need to define. For the SendingFacility field, the outbound script is:
For ProcessingID, the outbound script is:
Lastly, the VersionID outbound script is:
When you are finished, the MessageInfo table looks like this: This completes the definition of the table associated with the MSH segment. |