Health Level Seven (HL7) Interface Specifications

  1. Introduction

This document describes eClaims HL7 file output  for interfacing with information systems.

  1. HL7 Messages

A message is the smallest unit of data transferred between systems. It is comprised of a group of segments in a defined sequence. Each message has a message type that defines its purpose.

For example, the ADT Message type is used to transmit portions of a patient’s Patient Administration (ADT) data from one system to another. A 3 character code contained within each message identifies its type.

The real-world event that initiates an exchange of messages is called a trigger event.

These codes represent values such as “A patient is admitted” or “An order event occurred.”

There is a one-to-many relationship between message types and trigger event codes. The same trigger event code may not be associated with more than one message type.

  1. Segments

A segment is a logical grouping of data fields. Segments of a message may be required or optional. They may occur only once in a message or they may be allowed to repeat.

Each segment is given a name.

For example, the ADT message may contain the following segments:

  • Message Header (MSH)
  • Event Type (EVN)
  • Patient ID (PID)
  • Patient Visit (PV1).

Each segment is identified by a unique 3 character code known as the Segment ID.

  1. Fields

A field is a string of characters. HL7 does not care how systems actually store data within an application.

When fields are transmitted, they are sent as character strings.

Except where noted, HL7 data fields may take on the null value. Sending the null value, which is transmitted as two double quote marks (“ ”), is different from omitting an optional data field. The difference appears when the contents of a message will be used to update a record in a database rather than create a new one. If no value is sent, (i.e., it is omitted) the old value should remain unchanged. If the null value is sent, the old value should be changed to null.

  1. Position (Sequence Within the Segment)

This is the ordinal position of the data field within the segment. This number is used to refer to the data field in the text comments that follow the segment definition table.

In the segment attribute tables, this information is in a column labelled SEQ.

  1. Maximum Length

The maximum length is the maximum number of characters that one occurrence of the data field may occupy. It is calculated to include the component and subcomponent separators. Because the maximum length is that of a single occurrence, the repetition separator is not included in calculating the maximum length.

In the segment attribute tables, this information is in a column labelled LEN.

  1. Data Type

The data type restricts the contents of the data field. There are a number of data types defined by HL7.

The data types used in this specification are described in the following table.

Data Type Category
or Data Type(Alphanumeric)
Data Type Name Notes and Format
CE Coded Element Identifier ^ text ^ name of coding system ^ alternate identifier ^ alternate text ^ name of alternate coding system
CM Composite Combination of components of varying data types
CQ Composite quantity with units quantity (NM) ^ units (CE)
CX Extended composite
ID with check digit
ID ^ check digit ^ code identifying the check digit scheme employed^ assigning authority^ identifier type code^ assigning facility
EI Entity identifier Entity identifier ^ namespace ID ^ universal ID ^ universal ID type
FT Formatted text Data This data type is derived from the string data type by allowing the addition of embedded formatting instructions. These instructions are limited to those that are intrinsic and independent of the circumstances under which the field is being used. See section 2.8.19 “Use of escape sequences in text fields” of the HL7 2.3.1 Standard Specifications for a list of allowed formatting commands.
HD Hierarchic designator Namespace ID ^ universal ID ^ universal ID type
ID Coded value for HL7 defined tables Valued from a table of HL7 legal values
IS Coded value for user-defined tables Valued from a table of site legal values
PT Processing type Processing ID ^ processing mode
ST String String data is left justified with trailing blanks optional
TQ Timing quantity Utilizes the Priority component for order priority
TS Time Stamp YYYYMMDDHHMMSS
TX Text Data String data meant for user display
XCN Extended composite id number and name for persons ID ^ family name ^ given name ^ middle initial or name
XPN Extended person name family name ^ given name ^ middle initial or name^Suffix^Prefix^Degree^TypeCode
NM Numeric A number represented as a series of ASCII numeric characters consisting of an optional leading sign (+ or -), the digits and an optional decimal point.
XAD Extended Address This data type specifies the address of a person, place or organization plus associated information.
XTN Extended Telecommunication Number  See section 2.8.52 “XTN – extended telecommunication number” of the HL7 v2.3.1 Standard Specifications documentation.
PL Person Location This data type is used to specify a patient location within a healthcare institution
DT Date Specifies the century and year with optional precision to month and day.
TQ Timing Quantity Describes when a service should be performed and how frequently.
ED Encapsulated Data This data type transmits encapsulated data from a source system to a destination system. It contains the identity of the source system, the type of data, the encoding method of the data, and the data itself. This data type is similar to the RP (reference pointer) data type of Section 2.8.36, “RP – reference pointer,” except that instead of pointing to the data on another system, it contains the data which is to be sent to that system.
  1. Optionality

Optionality indicates whether the field is required, optional, or conditional in a segment. The designations are:

  • R—required
  • O—optional
  • C—conditional on the trigger event or on other field(s)
  • X—not used with this trigger event

In the segment attribute tables this information is in a column labelled OPT

  1. Repetition

Repetition indicates whether the field may repeat. The designations are:

  • N—No repetition
  • Y—The field may repeat an indefinite or site-determined number of times.
  • (integer)—The field may repeat up to the number of times specified by the integer.

Each occurrence may contain the number of characters specified by the field’s maximum length. In the segment attribute tables, this information is in a column labelled RP/#.

  1. Message Delimiters

In constructing a message, the following special characters are used.

Segment terminator—The segment terminator is always a carriage return (in ASCII, a hex 0D).

  • Field separator
  • Component separator
  • Subcomponent separator
  • Repetition separator
  • Escape character

The other delimiters are defined in the MSH segment with the field delimiter in the fourth character position. Other delimiters occurring as in the field called Encoding Characters are indicated in the first field after the segment ID.

The delimiter values used in the MSH segment are the delimiter values used throughout the entire message. Each delimiter character can be escaped when required to be used as a field value as opposed to a delimiter.

Delimiter Suggested Value Encoding Character Position Escaping Character Usage
Segment Terminator <cr>
hex 0D
\n Terminates a segment record. This value cannot be changed by implementers.
Field Separator | \F\ Separates two adjacent data fields within a segment. It also separates the segment ID from the first data field in each segment.
Component Separator ^ 1 \S\ Separates adjacent components of data fields where allowed.
Subcomponent Separator & 4 \T\ Separates adjacent subcomponents of data fields where allowed. If there are no subcomponents, this character may be omitted.
Repetition Separator ~ 2 \R\ Separates multiple occurrences of a field where allowed.
Escape Character \ 3 Not supported Escape character for use with any field represented by an ST, TX or FT data type, or for use with the data (fourth) component of the ED data type. If no escape characters are used in a message, this character may be omitted. However, it must be present if subcomponents are used in the message.
  1. Messages

This section describes the HL7 messages eClaims produces. The segments listed for every message type are required, segments in square brackets are optional, and segments that do not appear are ignored.

11.1 ADT A04 – Register a Patient

  • MSH
  • PID
  • PV1

11.2 ADT A08 – Update Patient Information

  • MSH
  • PID
  • PV1

11.3 ADT A18 – Merge Patient Information – Patient ID Only

  • MSH
  • PID
  • MRG 

11.4 ORM O01 – General Order Message

This message may contain multiple OBR segments but each repetition must follow a PID segment.

  • MSH
  • PID
  • PV1
  • ORC
  • OBR

11.5 ORU R01 – Observational Results

  • MSH
  • PID
  • PV1
  • ORC
  • OBR
  • OBX

Many report headers (OBR) may be sent beneath each patient segment, with many separate observation segments (OBX) beneath each OBR. Note segments (NTE) may be inserted after any of the segments.

The note segment applies to the entity that immediately precedes it, i.e., the patient, if it follows the PID segment, the observation, if it follows the OBR segment, and the individual result, if it follows the OBX segment.

  1. Segments

Note: In the Optional/Required column, R indicates that the field is required in the segment.

12.1 MSH – Message Header

# Field Name HL7 Type Optional/Required Repeated Comment
1 Field Separator ST R
2 Encoding Characters ST R
3 Sending Application HD eClaims
4 Sending Facility HD eClaims Client Name / ACSS
5 Receiving Application HD
6 Receiving Facility HD
7 Message Date/Time TS Date and time the HL7 file was generated                                      EG: 20160101113022
8 Security ST  N/A
9 Message Type CM R
10 Message Control ID ST N/A
11 Processing ID PT N/A
12 Version ID ID N/A
13 Sequential Number NM
14 Continuation Pointer ST
15 Accept Acknowledgement type ID
16 Application Acknowledgement type ID
17 Country Code ID  AU
18 Character Set ID R  ASCII
19 Language of Message CE  ENG
20 Alternate Character Set Handling Scheme ID

12.2 PID – Patient Identification and Details

# Field Name HL7 Type Optional/Required Repeated Comments
1 Set ID NM
2 Patient External ID CX R
3 Patient Internal ID CX R R eClaims Patient Number and Medicare card number and/or DVA number if present.
EG: 102.1^^^ACSS^PIEC~21111111115^^^AUSHIC^MC
4 Patient Alternate ID CX R
5 Patient Name XPN R eClaims Patient Last Name^First^Mi^^Title
6 Mother’s Maiden name XPN
7 Patient Date of Birth TS R eClaims DOB/Age
8 Patient Sex ID R eClaims Sex
9 Patient Alias XPN R N/A
10 Patient Race ID Re-Used as the Date and Time the exam pick up
11 Patient Address XAD R eClaims Address^City^State^P/Code
12 Country Code ID
13 Home Phone XTN R eClaims Home Phone
14 Business Phone XTN R eClaims Work Phone
15 Language CE
16 Marital Status ID
17 Religion ID
18 Account Number CX N/A
19 Social Security Number ST See PID-3 – Patient Internal ID for Medicare Card Number
20 Driver License Number CM
21 Mothers ID CX R
22 Ethnic Group ID
23 Birth Place ST
24 Multiple Birth Indicator ID
25 Birth Order NM
26 Citizenship ID R
27 Veterans Military Status CE See PID-3 – Patient Internal ID for DVA Card Number
28 Nationality CE
29 Death Date/Time TS  N/A
30 Death Indicator ID  N/A

12.3 PVI – Patient Visit Details

# Field Name HL7 Type Optional/Required Repeated Comments
1 Set ID NM
2 Patient Class ID R
3 Patient Location PL R eClaims Practice Data screen. City
4 Admission Type ID R
5 Pre-admit Number CX
6 Prior Location PL
7 Attending Doctor XCN R R eClaims Servicing Provider
Doctor Number^Last Name^Name^Title
8 Referring Doctor XCN R R eClaims Referring provider Number
Referring Doctor provider number^Last Name^First Name^^^Title^^^^External ID
9 Consulting Doctor XCN R R
10 Hospital Service ID R
11 Temporary Location PL
12 Pre-admit test indicator ID
13 Re-admission Indicator ID
14 Admit Source ID
15 Ambulatory Status ID R
16 VIP Indicator ID
17 Admitting doctor XCN R R
18 Patient Type ID R eClaims ExamNo
19 Visit ID CX R Uniquely identifies an encounter/visit.
20 Financial Class CM R  N/A
21 Charge Price Indicator ID   N/A
22 Courtesy Code ID   N/A
23 Credit Rating ID   N/A
24 Contract Code ID R   N/A
25 Contract Effective Date DT R   N/A
26 Contract Amount NM R   N/A
27 Contract Period NM R   N/A
28 Interest Code ID   N/A
29 Transfer to Bad Debt Code ID   N/A
30 Transfer to Bad Debt Date DT   N/A
31 Bad Debt Agency Code ID   N/A
32 Bad Debt Date Transfer Amount NM   N/A
33 Bad Debt Date recovery Amount NM   N/A
34 Delete Account Indication ID   N/A
35 Delete Account Date DT   N/A
36 Discharge Disposition ID   N/A
37 Discharge Location CM   N/A
38 Diet Type ID   N/A
39 Servicing Facility ID   N/A
40 Bed Status ID   N/A
41 Account Status ID   N/A
42 Pending Location PL   N/A
43 Prior Temporary Location PL   N/A
44 Admit Date/Time TS   N/A
45 Discharge Date/Time TS   N/A. Required in a message ending an encounter/visit.
46 Current Balance NM   N/A
47 Total Charge NM   N/A
48 Total Adjustments NM   N/A
49 Total Payments NM   N/A
50 Alternative Visit ID CX   N/A
51 Visit indicator ID   N/A
52 Other Healthcare Provider XCN R   N/A

12.4 ORC – Order Control Segment

This segment conveys the order control information.

# Field Name HL7 Type Optional/Required Comments
1 Order Control ID R NW—Add new order
SC—Update order
CA—Cancel order
RE—Observations to follow
2 Placer Order Number EI eClaims ExamNo. If presented should be identical to OBR-2.
3 Filler Order Number EI R eClaims position index of item number. Uniquely identifies the order. If presented should be identical to OBR-3.
4 Placer Group Number EI
5 Order Status ID R SC—Order scheduled
CA—Order cancelled
CM—Order is complete
6 Response Flag ID
7 Quantity Timing TQ R  N/A. The time the order was scheduled to(the scan/test should) take place, inthe fourth component.
The priority information of the orderin the sixth component. If presented, it should be identical to OBR-27.
8 Parent CM  N/A
9 Transaction Date/Time TS  N/A
10 Entered By XCN  N/A
11 Verified By XCN  N/A
12 Ordering Provider XCN  N/A. Ordering referring physician. If presented should be identical to OBR-16
13 Enterer Location PL  N/A
14 Callback Phone Number XTN  N/A. If presented should be identical to OBR-17.
15 Order Date/Time TS  N/A
16 Order Control Code Reason CE  N/A
17 Entering Oranization CE  N/A
18 Entering Device CE  N/A
19 Action By XCN  N/A

12.5 OBR – Order Segment

This segment conveys the order information.

# Field Name DT OPT Notes
1 Set ID NM
2 Placer Order Number EI eClaims ExamNo. Should be identical to ORC-2, if present.
3 Filler Order Number EI R eClaims position index of item number. This is the unique order identification number. It may be the same as the accession number (see field 18). Should be identical to ORC-3, if present.
4 Universal Service ID CE R The first component of this field contains the MBS item code that indicates the procedure. The second component contains a description of the procedure.
eClaims MBS Item code^description^MBS
5 Priority ID
6 Requested Date/Time TS eClaims Ref Date
7 Observation Date/Time TS eClaims Job Date
8 Observation End Date/Time TS eClaims Job Date
9 Collection Volume CQ
10 Collector ID XCN
11 Specimen Action Code ID
12 Danger Code CE
13 Relevant Clinical Information ST
14 Specimen Received Date/Time TS
15 Specimen Source CM R Contains the body part in the fourth component and laterality in the fifth component: |^^^KNEE^LEFT|
16 Ordering Provider XCN R eClaims Referring provider Number
Referring Doctor provider number^Last Name^First Name^^^Title^^^^AUSHICPR^ExternalID
17 Order Call Back Phone Number XTN Should be identical to ORC-14, if presented.
18 Placer Field 1 ST R eClaims position index of item number
19 Placer Field2 ST eClaims ExamNo
20 Filler Field 1 ST eClaims Item code-00
21 Filler Field 2 ST
22 Results Date/Time TS Same as OBX-14-Observation Date/Time if presented in an ORU message
23 Charge To Practice CM
24 Diagnostic Service Section ID ID R Scanner ID.
25 Result Status ID R Same as OBX-11-Observation Result Status if presented in an ORU message.
26 Parent Result CM
27 Quantity Timing TQ R eClaims Job Date
28 Result Copies To XCN
29 Parent Order CM  N/A
30 Transportation Mode ID  N/A
31 Reason For Study CE  N/A. This information may help radiologists in future diagnostics (or in current analysis if the order information will be transmitted as soon as it is ordered using the ORM message).
32 Principal Result Interpreter CM  N/A. This field conveys the name of the radiologist who read the study in the following format: |8798&Jordan&Michael|
33 Assistant Result Interpreter CM  N/A. This field conveys the name of the assistant radiologist in the following format: |98548&Pippen&Scottie|
34 Technician CM  N/A
35 Transcriptionist CM  N/A
36 Scheduled Date/Time TS  N/A
37 Number of Sample Containers NM  N/A
38 Transport Logistics of Collected Sample CE  N/A
39 Collectors Comment CE  N/A
40 Transport Arrangement Responsibility CE  N/A
41 Transport Arranged ID  N/A
42 Escort Required ID  N/A
43 Planned Patient Transport Comment CE  N/A

12.6 OBX – Observation/Report Segment

# Field Name DT OPT Comments
1 Set ID NM R Sequential number of the OBX segment within the message.
2 Value type ID R FT – Formatted Text (Display) or ED – Encapsulated Data. See Table 0125 – Value Type
3 Observation Identifier CE R Identifies the section of the report.
REPORT^^LN
4 Observation Sub-ID ST A numeric value that may be used to sort the report lines (the OBX segments)
5 Observation Value ST R This section contain the text that typed in the report (FT) or Encapsulated Data (ED) segment can be used to transmit images or documents.
6 Units CE
7 Reference Range ST
8 Abnormal Flags ID
9 Probability NM
10 Nature Of Abnormal Test ID
11 Observation Result Status ID R The status of the report. For example, ‘P’ (Preliminary results), ‘F’ (Final results). Should be identical for all OBX segments of the same report. If OBR-25-Result Status exists, it should be identical. See table 0085 – Observation result status codes interpretation.
12 Normal Values Date/Time TS
13 Access Checks ST
14 Observation Date/Time TS R The report date and time are both required. Should be identical for all OBX segments of the same report. If OBR-22-Results Date/Time exists it should be identical.
15 Producer ID CE
16 Responsible Observer XCN R This field conveys the ID, name and other details of the radiologist who verified the report in the following format: |8765^Tom^JERRY|
17 Observation Method CE
18 Equipment Instance Identifier EI