The segment definition file is were the HL7 segments are defined.  The
HL7 control reads the segment definition file during the Init method. 
The segment that are defined in the segment definition 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 file
looks like:


1     ST     REQ     NO_RPT      1     Field separator
4     ST     REQ     NO_RPT      2     Encoding characters
15    ST     OPT     NO_RPT      3     Sending application
20    ST     OPT     NO_RPT      4     Sending facility
15    ST     OPT     NO_RPT      5     Receiving application
30    ST     OPT     NO_RPT      6     Receiving facility
26    TS     OPT     NO_RPT      7     Date/time of message
40    ST     OPT     NO_RPT      8     Security
7     ID     OPT     NO_RPT      9     Message type
20    ST     REQ     NO_RPT      10    Message control ID
1     ID     REQ     NO_RPT      11    Processing ID
8     ID     REQ     NO_RPT      12    Version ID
15    NM     OPT     NO_RPT      13    Sequence number
180   ST     OPT     NO_RPT      14    Continuation pointer
2     ID     OPT     NO_RPT      15    Accept acknowledgement type
2     ID     OPT     NO_RPT      16    Application acknowledgement type
2     ID     OPT     NO_RPT      17    Country code
MSH

2     ID     REQ     NO_RPT      1     Acknowledgement code
20    ST     REQ     NO_RPT      2     Message Control ID
80    ST     OPT     NO_RPT      3     Text Message
15    NM     OPT     NO_RPT      4     Expected Sequence Number
1     ID     OPT     NO_RPT      5     Delayed Acknowledgement type
100   CE     OPT     NO_RPT      6     Error Condition
MSA

80    CM     REQ     NO_MAX      1     Error Code and Location
ERR

60    ST     OPT     NO_RPT      1     Continuation Pointer
DSC

3     ID     REQ     NO_RPT      1     Event Type Code
19    TS     REQ     NO_RPT      2     Date/Time of Event
19    TS     OPT     NO_RPT      3     Date/Time Planned Event
3     ID     OPT     NO_RPT      4     Event Reason Code
5     ID     OPT     NO_RPT      5     Operator ID
EVN

4     SI     OPT     NO_RPT      1     Set ID - Patient ID
16    CK     OPT     NO_RPT      2     Patient ID (External ID)
16    CK     REQ     NO_MAX      3     Patient ID (Internal ID)
12    ST     OPT     NO_RPT      4     Alternate Patient ID
48    PN     REQ     NO_RPT      5     Patient Name
30    ST     OPT     NO_RPT      6     Mother's Maiden Name
8     TS     OPT     NO_RPT      7     Date of Birth
1     ID     OPT     NO_RPT      8     Sex
48    PN     OPT     NO_MAX      9     Patient Alias
1     ID     OPT     NO_RPT      10    Race
106   AD     OPT     3           1     Patient Address
4     ID     OPT     NO_RPT      2     county code
40    TN     OPT     3           3     Phone Number - Home
40    TN     OPT     3           4     Phone Number - Business
25    ST     OPT     NO_RPT      5     Language - Patient
1     ID     OPT     NO_RPT      6     Marital Status
3     ID     OPT     NO_RPT      7     Religion
20    CK     OPT     NO_RPT      8     Patient Account Number
16    ST     OPT     NO_RPT      9     SSN Number - Patient
25    CM     OPT     NO_RPT      20    Driver's Lic Num - Patient
20    CK     OPT     NO_RPT      1     Mother's Identifier
1     ID     OPT     NO_RPT      2     Ethnic Group
25    ST     OPT     NO_RPT      3     Birth Place
2     ID     OPT     NO_RPT      4     Multiple Birth Indicator
2     NM     OPT     NO_RPT      5     Birth Order
2     ID     OPT     NO_MAX      6     Citizenship
60    ID     OPT     NO_RPT      7     Veterans Military Status
PID

 

Back to Home Page.

This page, and all contents, are Copyright © 1998 by Gary M. Gallagher.
Sparrow Technologies Incorporated - http://www.sparrow-technologies.com