HEALTHCARE COST & UTILIZATION PROJECT

User Support

Do Your own analysis
Explore Expert Research & Limited Datasets

HL7 Format for Transmitting Laboratory Results To MHA

Minnesota Hospital Association logo

NOTE: THIS DOCUMENT CONTAINS FIELD SEPARATORS SYMBOLIZED BY VERTICAL BARS. "[BAR]" INDICATES THE USE OF A BAR.

HL7 Format for Transmitting Laboratory Results To MHA
AHRQ Demonstration Project

Identification of Laboratory Test Results to Be Transmitted
Only results of qualifying laboratory tests designated in Appendix A (LOINC Coding of Qualifying Laboratory Tests) performed from 30 days prior to admission through the day of discharge on patients 18 years and older admitted for general medical or surgical care will be transmitted. Please inform Demonstration Project staff if you are unable to supply requested data on any of the Qualifying Laboratory Tests listed in Appendix A.

General Overview of the HL7 Format for Data Transmission
Laboratory results will be transmitted in an HL7 format. Minimum data requirements are described below. If a hospital has a standard HL7 format for reporting that includes all required information, either in recommended or in other HL7 fields, the hospital’s standard HL7 format can be used to transmit data. We can read the segments/fields we need and ignore the rest. However, if special programming is required to transmit required data, the following format is recommended.

The following HL7 segments can be used to transmit all required laboratory data:

MSH Hospital Identification & Transmittal Information
PID Patient Identification
PV1 Patient Visit
OBX Observation Results
NTE Notes & Comments

HL7 segments can be nested so that multiple patients can be included in a single transmission (MSH), multiple visits (i.e., hospitalizations) can be included for a single patient (PID), multiple observations (i.e., laboratory results) can be included for a single visit (PV1), and multiple notes and comments can be related to any observation (OBX).

Adjacent fields in HL7 transmissions are separated by a [BAR]. An empty field is denoted by two separators with no data separating them, i.e., [BAR BAR]. Each segment other than MSH is designated by its header (e.g., PID, PV1, OBX, NTE) followed by a separator and sequential numbers from beginning with 1 (e.g., PID[BAR]1[BAR], OBX[BAR]3[BAR], NTE[BAR]2[BAR]).

Please note that OBX, Field 7 contains the normal range for the test performed on the patient identified in the corresponding PID file. Normal ranges may vary with patients’ ages and genders. Please inform MHA staff if you are unable to provide an individualized normal range for any of the tests listed in Appendix A.

Detailed Description of Individual Segments

MSH – Message Header

Field # Content Max Length Content Required Comment
  MSH     Content always 'MSH'
1 Field Separator 1 Yes Content always '[BAR]'
2 ˆ~\& 4 Yes Content always 'ˆ~\&'
3 Sending Application 227 No  
4 Sending Facility 227 Yes MHA Hospital Identifier Code
5 Receiving Application 227 No  
6 Receiving Facility 227 Yes Recipient name or code (e.g., MHA)
7 Date/Time of Message 26 Yes CCYYMMDDHHMM (year, month, day, hour, minute)
8 Security 40 No  
9 Message Type 15 Yes Content always 'CSUˆZ01' (unsolicited study data, locally defined)
10 Message Control ID 20 No  
11 Processing ID 3 Yes Production (P), Training (T), Debug (D)
12 Version ID 60 Yes Content always '2.5.1'

Note: HL7 transmissions are represented using bar codes. Because the bar codes cannot be displayed here, the example given represents the information that the actual barcode would capture.

EXAMPLE:
MSH

Field 1 - Field Separator
Field 2 - ˆ~\&
Field 3 - Field Separator
Field 4 - 225
Field 5 - Field Separator
Field 6 - MHA
Field 7 - 200803231435
Field 8 - Field Separator
Field 9 - CSUˆZ01
Field 10 - 12345
Field 11 - P
Field 12 - 2.5.1

Note: All required fields completed. Field 10 completed but could have been left blank.

PID – Patient Identification

Field # Content Max Length Content Required Comment
  PID   Yes Content always 'PID'
1 Set ID – PID 4 Yes Content sequential number from 1 to n where n is the total number of unique patients whose data are included in this transmission (max = 9,999)
2 Patient ID 20 Yes Medical record number required unless alternate unique identifier provided in Field 4
3 Patient Identifier List 250 No  
4 Alternate Patient ID 20 No May be used for an alternate patient identifier (see Field 2) or for a secondary patient identifier
  Patient Name 250 No  
6 Mother's Maiden Name 250 No  
7 Date/Time of Birth 26 Yes CCYYMMDD (year, month, day); time not required if age > 1 month
8 Administrative Sex 1 Yes  
9 Patient Alias 250 No  
10 Race 250 No  
11 Patient Address 250 No  
12 County Code 4 No  
13 Phone Number – Home 250 No  
14 Phone Number - Business 250 No  
15 Primary Language 250 No  
16 Marital Status 250 No  
17 Religion 250 No  
18 Patient Account Number 250 No  

Note: Fields 19-30 of PID exist but are not relevant to these data specifications.

Note: HL7 transmissions are represented using bar codes. Because the bar codes cannot be displayed here, the example given represents the information that the actual barcode would capture.

EXAMPLE:
PID

Field 1 - 1
Field 2 - 987654321
Field 3 - Field Separator
Field 4 - Field Separator
Field 5 - Field Separator
Field 6 - Field Separator
Field 7 - 19350109
Field 8 - M
Field 9 - Field Separator
Field 10 - Field Separator
Field 11 - Field Separator
Field 12 - Field Separator
Field 13 - Field Separator
Field 14 - Field Separator
Field 15 - Field Separator
Field 16 - Field Separator
Field 17 - Field Separator
Field 18 - 543216789

Note: All required fields completed. Field 2 could be blank if an alternate unique identifier is provided in Field 4. Field 4 blank, but a secondary identifier may be provided in this field. Field 18 is completed but could have been left blank.

PV1 – Patient Visit

Field # Content Max Length Content Required Comment
  PV1   Yes Content always 'PV1'
1 Set ID – PV1 4 Yes Content sequential number from 1 to n where n is the total number of hospital admissions for each patient in this transmission (max = 9,999)
44 Admit Date/Time 26 Yes CCYYMMDDHHMM (year, month, day, hour, minute) Hour and minute should be included if known
45 Discharge Date/Time 26 No CCYYMMDDHHMM (year, month, day, hour, minute) Should be provided if known at time of transmission; hour and minute should be included if known

Note: Fields 2-43 and 46-52 of PV1 exist but are not relevant to these data specifications.

Note: HL7 transmissions are represented using bar codes. Because the bar codes cannot be displayed here, the example given represents the information that the actual barcode would capture

EXAMPLE:
PV1

Field 1 - 1
Field 2 through Field 43 - Field Separator
Field 44 - 20080315
Field 45 - 20080318

Note: All required fields completed. Field 44 would contain hour and minute of admission if these are known. Field 45 could be blank if the date of discharge is not known and would contain hour and minute of discharge if these are known.

OBX - Observation/Result

Field # Content Max Length Content Required Comment
  OBX   Yes Content always 'OBX'
1 Set ID - OBX 4 Yes Content sequential number from 1 to n where n is the total number of qualifying observations (i.e., required laboratory results from 30 days prior to admission through the date of discharge) for each patient hospitalization in this transmission (max = 9,999)
2 Value Type 2 Yes Result type: NM=numeric; ST=character string; CE=coded element
3 Observation Identifier 250 Yes LOINC code
4 Observation Sub-ID 20 No  
5 Observation Value 9999 Yes Value of test
6 Units 250 Yes Units
7 References Range 60 Yes Low value - high value
8 Abnormal Flags 5 No Not required, but flag may be inserted to denote an abnormal value
9 Probability 5 No  
10 Nature of Abnormal Test 2 No  
11 Observation Result Status 1 Yes C=correction; D= deletes the OBX record; F=final result; I=specimen in the lab, results pending; O=Order detail only, no result; P=preliminary result; R=results entered, not verified; S=partial results; X=results cannot be obtained for this specimen; W=posting is wrong, results sent for wrong patient
12 Effective Date of Reference Range 26 No  
13 User Defined Access Checks 20 No  
14 Date/Time of the Observation 26 Yes CCYYMMDDHHMM (year, month, day, hour, minute) Date/Time sample obtained; hour and minute should be included if known
15 Producer's ID 250 No  
16 Responsible Observer 250 No  
17 Observation Method 250 No  
18 Equipment Instance Identifier 22 No  
19 Date/Time of the Analysis 26 No CCYYMMDDHHMM (year, month, day, hour, minute) If available, should be provided as check on Date/Time of Observation; hour and minute should be included if known

Note: HL7 transmissions are represented using bar codes. Because the bar codes cannot be displayed here, the example given represents the information that the actual barcode would capture.

EXAMPLE:
OBX

Field 1 - 1
Field 2 - NM
Field 3 - 2951-2^SODIUM SERPL-SCNC
Field 4 - Field Separator
Field 5 - 138
Field 6 - MEQ/L
Field 7 - 135-146
Field 8 - Field Separator
Field 9 - Field Separator
Field 10 - Field Separator
Field 11 - F
Field 12 - Field Separator
Field 13 - Field Separator
Field 14 - 200801100930
Field 15 - Field Separator
Field 16 - Field Separator
Field 17 - Field Separator
Field 18 - Field Separator
Field 19 - 200801101430

NTE – Notes & Comments

Field # Content Max Length Content Required Comment
  NTE   Yes Content always 'NTE'
1 Set ID – NTE 4 Yes Content numbered to correspond to the number of the OBX field to which the note or comment relates (max = 9,999)
2 Source of Comment 8 Yes L=Ancillary department (filler); P=Orderer (placer); O=Other
3 Comment 65536 Yes 'Sample hemolyzed' always should be commented in this field when it is observed; NTE comments also may transmit other required data by special arrangement with project staff
4 Comment type 250 No  

Note: If an NTE segment is needed (e.g. the sample is hemolyzed), it would follow the appropriate OBX segment.

Note: HL7 transmissions are represented using bar codes. Because the bar codes cannot be displayed here, the example given represents the information that the actual barcode would capture.

EXAMPLE:
NTE

Field 1 - 2
Field 2 - L
Field 3 - Sample Hemolyzed

Nested Segments in a Single Transmission
Instead of a set of single segments (i.e., one MSH with one PID, one PV1, and one OBX with or without an NTE, segments may be nested in a single MSH transmission. Such a transmission might consist of one MSH followed by PID[BAR]1 for a first patient, PV1[BAR]1 for a first hospitalization for the first patient, OBX[BAR]1 for the results of the first laboratory test associated with the hospitalization, OBX[BAR]2 for the results of the second laboratory test associated with the hospitalization, NTE[BAR]2 for a note concerning the second laboratory test, OBX[BAR]3 for the results of the third laboratory test associated with the hospitalization, PV1[BAR]2 for the second hospitalization for the first patient, OBX[BAR]1 for the results of the first laboratory test associated with the second hospitalization, OBX[BAR]2 for the results of the second laboratory test associated with the second hospitalization, PID[BAR]2 for a second patient, PV1[BAR]1 for a first hospitalization for this second patient, and OBX[BAR]1 for the results of the second laboratory test associated with the first hospitalization for the second patient.

An HL7 OBR segment exists, but is not required for this project. However, for hospitals that already use HL7 and utilize a nested OBR segment to transmit the date and time observations were made, OBR Field 7 may be used instead of OBX Field 14. Similarly, NTE Field 3 may be used to convey data required in OBX Field 11. Please inform project staff if you have a standard HL7 transmission protocol that assigns required data elements to fields other than those shown in the templates in the previous section.

EXAMPLE OF TRANSMISSION DESCRIBED ABOVE:

MSH[BAR]ˆ~\&[BAR][BAR]225[BAR][BAR]MHA[BAR]200803231435[BAR][BAR]CSUˆZ01[BAR]12345[BAR]P[BAR]2.5.1
PID[BAR]1[BAR]987654321[BAR][BAR][BAR][BAR][BAR]19350109[BAR]M[BAR][BAR][BAR][BAR][BAR][BAR][BAR][BAR][BAR] [BAR]543216789
PV1[BAR]1[BAR][BAR][BAR][BAR][BAR][BAR][BAR][BAR][BAR][BAR][BAR][BAR][BAR][BAR][BAR][BAR][BAR] [BAR][BAR][BAR][BAR][BAR][BAR][BAR][BAR][BAR][BAR][BAR][BAR][BAR][BAR][BAR][BAR][BAR][BAR][BAR] [BAR][BAR][BAR][BAR][BAR]20080115[BAR]20080118
OBX[BAR]1[BAR]NM[BAR]2951-2ˆSODIUM SERPL-SCNC[BAR][BAR]138[BAR]MEQ/L[BAR]135-146[BAR][BAR][BAR][BAR]F[BAR][BAR][BAR]200801100930[BAR][BAR][BAR][BAR][BAR]200801101430
OBX[BAR]2[BAR]NM[BAR]2823-3ˆPOTASSIUM SERPL-SCNC[BAR][BAR]6.2[BAR]MEQ/L[BAR]3.5-5.0[BAR][BAR][BAR][BAR]F[BAR][BAR][BAR]200801151130[BAR][BAR][BAR][BAR][BAR]200801151500
OBX[BAR]3[BAR]NM[BAR]2823-3ˆPOTASSIUM SERPL-SCNC[BAR][BAR]4.4[BAR]MEQ/L[BAR]3.5-5.0[BAR][BAR][BAR][BAR]F[BAR][BAR][BAR]200801160815[BAR][BAR][BAR][BAR][BAR]200801161145
NTE[BAR]2[BAR]L[BAR]Sample Hemolyzed
PV1[BAR]2[BAR][BAR][BAR][BAR][BAR][BAR][BAR][BAR][BAR][BAR][BAR][BAR][BAR][BAR][BAR][BAR][BAR][BAR][BAR] [BAR][BAR][BAR][BAR][BAR][BAR][BAR][BAR][BAR][BAR][BAR][BAR][BAR][BAR][BAR][BAR][BAR][BAR][BAR] [BAR][BAR][BAR]20080318[BAR]20080322
OBX[BAR]1[BAR]NM[BAR]2951-2ˆSODIUM SERPL-SCNC[BAR][BAR]141[BAR]MEQ/L[BAR]135-146[BAR][BAR][BAR][BAR]F[BAR][BAR][BAR]2008031801030[BAR][BAR][BAR][BAR][BAR]200803180140
OBX[BAR]2[BAR]NM[BAR]2823-3ˆPOTASSIUM SERPL-SCNC[BAR][BAR]4.1[BAR]MEQ/L[BAR]3.5-5.0[BAR][BAR][BAR][BAR]F[BAR][BAR][BAR]2008031801030[BAR][BAR][BAR][BAR][BAR]200803180140
PID[BAR]2[BAR]123456789[BAR][BAR][BAR][BAR][BAR]19420222[BAR]M[BAR][BAR][BAR][BAR][BAR][BAR][BAR][BAR] [BAR][BAR]987612345
PV1[BAR]1[BAR][BAR][BAR][BAR][BAR][BAR][BAR][BAR][BAR][BAR][BAR][BAR][BAR][BAR][BAR][BAR][BAR][BAR][BAR] [BAR][BAR][BAR][BAR][BAR][BAR][BAR][BAR][BAR][BAR][BAR][BAR][BAR][BAR][BAR][BAR][BAR][BAR][BAR] [BAR][BAR][BAR]20080315[BAR]20080317
OBX[BAR]1[BAR]NM[BAR]1751-7ˆALBUMIN SERPL-MCNC[BAR][BAR]3.8[BAR]G/DL[BAR]3.6-5.2[BAR][BAR][BAR][BAR]F[BAR][BAR][BAR]200803181530[BAR][BAR][BAR][BAR][BAR]200803191100


Internet Citation: HL7 Format for Transmitting Laboratory Results To MHA. Healthcare Cost and Utilization Project (HCUP). December 2010. Agency for Healthcare Research and Quality, Rockville, MD. www.hcup-us.ahrq.gov/datainnovations/clinicaldata/AppendixL_HL7DataTransmissionReqs.jsp.
Are you having problems viewing or printing pages on this website?
If you have comments, suggestions, and/or questions, please contact hcup@ahrq.gov.
Privacy Notice, Viewers & Players
Last modified 12/13/10