MedblocksHL7 v2 Specificationv2.5.1

↑↓ to moveEnter to openTry PID-5, ADT, 0004

HL7 v2 segments

A segment is one line of an HL7 message. It starts with a three-letter code that defines its purpose.

What a segment is

Here is a short admission message. It consists of four segments : MSH (Message Header), EVN (Event Type), PID (Patient Identification) and PV1 (Patient Visit).

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.

Common segments

The standard defines 151 segments. Each page has a worked example, notes on the fields that cause trouble, and a FHIR mapping. These are some of the common segments:

All segments

Here's a list of all 151 segments, along with the chapter and the number of fields each segment has.

Filter by chapter

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
IN1Insurance Segment5306
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
MSHmessage header segment2102
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
OBRObservation Request Segment5004
OBXObservation/Result Segment2507
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
ORCCommon Order Segment3104
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
PIDPatient Identification Segment3903
PR1Procedures Segment2006
PRAPractitioner Detail Segment1215
PRBProblem Detail Segment PRB2512
PRCPricing Segment1808
PRDprovider data segment911
PSHProduct Summary Header Segment1407
PTHPathway Segment612
PV1Patient Visit Segment5203
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