The message rules file is were the HL7 rules are
defined. The
HL7 control reads the message rule file during the Init method.
The rules that are defined in the message rule file are used whenever
an HL7 message is read in through the SetMessage method or written
out through the GetMessage method. Below is a sample of what the
message rule file looks like:
ACK:MSH MSA [ ERR ]
## line 1
MCF:MSH MSA [ ERR ]
ADTA01:MSH EVN PID PV1 GT1 <IN1 [IN2]>
## line 3
ADTA02:MSH EVN PID PV1 [PV2]
ADTA18:MSH EVN PID MRG
ADTA28;ADTA01
## line 6
ADTA29;ADTA02
ADTA31;ADTA01
DFTP03:MSH EVN PID [PV1][PV2] <OBX> {FT1}
## line 9
At first glance, the above sample may seem a little crytic. Lets take
a look at the first couple of line.
The first line defines a ACK
message. The colon(:) is used to seprate the
event name from the segement names. The ACK message has a MSH segment, MSA
segment and ERR segment. The MSH and MSA segment are required, the ERR
segment is optional.
The third line defines a A01 message
in the ADT chapter of the HL7 manual. Notice the
<IN1 [IN2]>, this means that the insurance segment IN1 and IN2 are repeatable and
that
IN1 is required and IN2 is optional.
The sixth line defines a A28 message
in the ADT chapter of the HL7 manual. Notice
the ;ADTA01, this means that the A28 event shares the share message structure as
the A01 event.
The ninth line defines a P03 message in the DFT chapter
of the HL7 manual. Notice
the {FT1}, this means that the FT1 is required and can repeat.
This page, and all contents, are Copyright © 1998 by
Gary M. Gallagher.
Sparrow Technologies Incorporated - http://www.sparrow-technologies.com