HL7 v2.5.1 Specificationsv2.5.1

to moveEnter to openTry PID-5, ADT, 0004

Filter by chapter

HL7 v2 segments

A segment is one line of an HL7 message. It starts with a three-letter code saying what the line is about, and everything after that is fields separated by pipes.

What a segment is

Here is a short admission message. Four lines, four segments, and the code at the start of each one tells you what you are looking at.

MSH|^~\&|EPIC|STJOSEPH|LABSYS|STJOSEPH|20240314093015||ADT^A01|MSG00017|P|2.5.1 EVN|A01|20240314093000 PID|1||1000345678^^^STJOSEPH^MR||CARTWRIGHT^ELEANOR^MAY^^^^L||19510822|F PV1|1|I|3W^312^A^STJOSEPH

MSH is the header, which every message begins with.EVN says what happened and when.PID says who the patient is.PV1 says where they are being admitted.

Read in order, those four lines say one thing. St Joseph admitted Eleanor Cartwright on 14 March 2024 and put her in bed A of room 312 on ward 3 West.

Required and optional

A message type states which segments it expects and whether each one has to be there. An R segment must be present, an O segment is optional, and a C segment is required only when some stated condition holds. The same marks appear against every field inside a segment.

For an admission, that leaves four segments you cannot omit, which is the message above. The ADT page shows the full structure and what each of the optional ones would add.

The seven to learn first

The standard defines 151 segments. Almost all ordinary traffic is these 7. Each page has a worked example, notes on the fields that cause trouble, and a FHIR mapping.

HL7 segments list

144 more, running from allergies to waveform data. Their pages carry the field table as published.

Show the other 144 segments
SegmentNameFieldsChapter
ABSAbstract Segment1406
ACCAccident Segment1106
ADDaddendum segment102
AFFProfessional Affiliation Segment515
AIGAppointment Information - General Resource Segment1410
AILAppointment Information - Location Resource Segment1210
AIPAppointment Information - Personnel Resource Segment1210
AISAppointment Information - Service Segment1210
AL1Patient Allergy Information Segment603
APRAppointment Preferences Segment510
ARQAppointment Request Segment2510
AUTAuthorization Information Segment1011
BHSbatch header segment1202
BLCBlood Code Segment206
BLGBilling Segment404
BPOBlood Product Order Segment1404
BPXBlood Product Dispense Status Segment2104
BTSbatch trailer segment302
BTXBlood Product Transfusion/Disposition Segment1904
CDMCharge Description Master Segment1308
CERCertificate Detail Segment3115
CM0Clinical Study Master Segment1108
CM1Clinical Study Phase Master Segment308
CM2Clinical Study Schedule Master Segment408
CNSClear Notification Segment613
CONConsent Segment2509
CSPClinical Study Phase Segment407
CSRClinical Study Registration Segment1607
CSSClinical Study Data Schedule Segment307
CTDContact Data Segment711
CTIClinical Trial Identification Segment307
DB1Disability Segment803
DG1Diagnosis Segment2106
DRGDiagnosis Related Group Segment1106
DSCcontinuation pointer segment202
DSPdisplay data segment505
ECDEquipment Command Segment513
ECREquipment Command Response Segment313
EDUEducational Detail Segment915
EQLEmbedded Query Language405
EQPEquipment Log/Service Segment513
EQUEquipment Detail Segment513
ERQEvent replay query305
ERRerror segment1202
EVNEvent Type Segment703
FACFacility1207
FHSfile header segment1202
FT1Financial Transaction Segment3106
FTSfile trailer segment202
GOLGoal Detail Segment2112
GP1Grouping/Reimbursement - Visit506
GP2Grouping/Reimbursement - Procedure Line Item1406
GT1Guarantor Segment5706
IAMPatient Adverse Reaction Information Segment - Unique Identifier2003
IIMInventory Item Master Segment1508
IN2Insurance Additional Information Segment7206
IN3Insurance Additional Information, Certification Segment2506
INVInventory Detail Segment2013
IPCImaging Procedure Control Segment904
ISDInteraction Status Detail Segment313
LANLanguage Detail Segment415
LCCLocation Charge Code Segment408
LCHLocation Characteristic Segment508
LDPLocation Department Segment1208
LOCLocation Identification Segment908
LRLLocation Relationship Segment608
MFAMaster File Acknowledgment Segment608
MFEMaster File Entry Segment508
MFIMaster File Identification Segment608
MRGMerge Patient Information Segment703
MSAmessage acknowledgment segment602
NCKSystem Clock Segment114
NDSNotification Detail Segment413
NK1Next of Kin / Associated Parties Segment3903
NPUBed Status Update Segment203
NSCApplication Status Change Segment914
NSTApplication Control-Level Statistics Segment1514
NTEnotes and comments segment402
ODSdietary orders, supplements, and preferences segment404
ODTdiet tray instructions segment304
OM1General Segment (Fields That Apply to Most Observations)4708
OM2Numeric Observation Segment1008
OM3Categorical Service/Test/Observation Segment708
OM4Observations That Require Specimens Segment1408
OM5Observation Batteries (Sets) Segment308
OM6Observations that are Calculated from Other Observations208
OM7Additional Basic Attributes (Fields That Apply to Most Observations/Services)2408
ORGPractitioner Organization Unit Segment1215
OVRoverride segment502
PCRPossible Causal Relationship Segment2307
PD1Patient Additional Demographic Segment2103
PDAPatient Death and Autopsy Segment903
PDCProduct Detail Country Segment1507
PEOProduct Experience Observation Segment2507
PESProduct Experience Sender1307
PR1Procedures Segment2006
PRAPractitioner Detail Segment1215
PRBProblem Detail Segment PRB2512
PRCPricing Segment1808
PRDprovider data segment911
PSHProduct Summary Header Segment1407
PTHPathway Segment612
PV2Patient Visit - Additional Information Segment4903
QAKquery acknowledgment segment605
QIDquery identification segment205
QPDquery parameter definition305
QRDOriginal-Style Query Definition1205
QRFOriginal style query filter1005
QRIquery response instance segment305
RCPresponse control parameter segment705
RDFtable row definition segment205
RDTtable row data segment105
RF1Referral Information Segment1111
RGSResource Group Segment310
RMIRisk Management Incident Segment306
ROLRole Segment1212
RQ1Requisition Detail-1 Segment704
RQDRequisition Detail Segment1004
RXAsegment usage in vaccine messages2604
RXCPharmacy/Treatment Component Order Segment904
RXDPharmacy/Treatment Dispense3304
RXEPharmacy/Treatment Encoded Order Segment4404
RXGPharmacy/Treatment Give Segment2604
RXOPharmacy/Treatment Order Segment2804
RXRPharmacy/Treatment Route Segment604
SACSpecimen Container Detail Segment4413
SCHSchedule Activity Information Segment2710
SFTsoftware segment602
SIDSubstance Identifier Segment413
SPMSpecimen Segment2907
SPRStored Procedure Request Definition405
STFStaff Identification Segment3815
TCCTest Code Configuration Segment1413
TCDTest Code Detail Segment813
TQ1Timing/Quantity Segment1404
TQ2Timing/Quantity Relationship1004
TXATranscription Document Header Segment2309
UB1UB82 Data Segment2306
UB2UB92 Data Segment1706
URDResults/update Definition705
URSUnsolicited Selection905
VARVariance Segment612
VTQVirtual Table Query Request505
ZL7(proposed example only)208