iNTERFACEWARE Products Manual > Learning Center > Tutorials and Sample Scenarios > Working With Other Message Formats > Processing Non-HL7 Messages Using Iguana and Chameleon > Writing the Global Inbound Script |
|
Looking for Iguana v.5 or v.6? Learn More or see the Help Center.
Iguana and Chameleon normally expect incoming messages to be in the HL7 message format. If your messages, such as the sample messages shown here, are in a different format, you can use a Global Inbound Script to convert the messages to HL7 format. This script must:
In this example, one custom segment, ZSU, has been defined. Each line of message data in the incoming message will be converted into a separate ZSU segment. To create the Global Inbound Script:
This Python script does the following:
The GetTimeStampMsecs() function enables you to define the message control ID for the MSH segment that you are creating. Each message control ID uniquely defines a specific HL7 message. To define the message control ID, create a Segment Inbound Script for field 10 of the MSH segment in your VMD file. To do this:
This script takes the timestamp returned by GetTimestampMsecs() and appends it to the value of MessageControlID that was already defined in the message. The result is a unique message ID for this message. When the Global Inbound Script and the Segment Inbound Script defined above are run on the sample messages in this tutorial, the result looks something like this:
This message is in HL7 format, and can be processed by a message definition in a VMD file. The next step is to create the message definition. |