HL7 v2 Segment Reference
An HL7 segment is a single line within an HL7 v2 message, starting with a three-character identifier (MSH, PID, PV1, etc.) followed by pipe-delimited fields containing clinical, administrative, or financial data. Segments are the building blocks of every HL7 message.
Segment Structure
Section titled “Segment Structure”Every segment follows the same format:
SEG|Field1|Field2|Field3|...- Segment ID: Three uppercase letters (MSH, PID, OBX, etc.)
- Field separator: Pipe character
|between fields - Components: Caret
^separates components within a field - Repetitions: Tilde
~separates repeated values - Empty fields: Consecutive pipes
||indicate an empty field
See our Data Types reference for detailed component structure.
Message Header
Section titled “Message Header” MSH — Message Header Encoding characters, sending/receiving applications, message type, processing ID, and version.
Patient Segments
Section titled “Patient Segments”Segments that identify the patient and their associated parties.
PID — Patient Identification MRN, name, DOB, demographics, identifiers, and assigning authority.
NK1 — Next of Kin Emergency contacts, responsible parties, relationship codes, and contact roles.
AL1 — Patient Allergy Allergy types, severity codes, reaction descriptions, and patient safety alerts.
GT1 — Guarantor Financially responsible party — demographics, employer, and billing contact.
Visit & Event Segments
Section titled “Visit & Event Segments”Segments that track the patient’s encounter and clinical events.
PV1 — Patient Visit Patient class, assigned location, attending physician, admit/discharge dates.
EVN — Event Type Trigger event codes, event timestamps, operator identification, and event reason.
Order & Result Segments
Section titled “Order & Result Segments”Segments that drive the order-result lifecycle — from order placement through result delivery.
ORC — Common Order Order control codes, placer/filler numbers, order status, and ordering provider.
OBR — Observation Request Universal service identifier, specimen information, result status, and diagnostic section.
OBX — Observation/Result Value types (NM, ST, CE, TX, ED), abnormal flags, result status, and LOINC coding.
NTE — Notes and Comments Free-text notes annotating orders, results, and other segments.
Financial & Insurance Segments
Section titled “Financial & Insurance Segments”Segments for billing, insurance, and diagnosis coding.
IN1 — Insurance Information Plan ID, group number, coverage dates, and payer integration.
FT1 — Financial Transaction CPT/HCPCS codes, charge amounts, modifiers, and revenue cycle data.
DG1 — Diagnosis ICD-10 codes, diagnosis types, priority, and DRG grouping.
Scheduling & Document Segments
Section titled “Scheduling & Document Segments”Segments for appointment management and clinical document tracking.
SCH — Scheduling Activity Appointment IDs, duration, status codes, and resource management.
TXA — Transcription Document Header Document types, authentication status, authorship, and document lifecycle.
Related Resources
Section titled “Related Resources” HL7 Message Types ADT, ORU, ORM, SIU, DFT, MDM, and ACK message references.
HL7 Sample Messages Complete annotated sample messages for hands-on learning.
HL7 Workbench Parse and validate HL7 messages with segment highlighting and field lookup.
HL7 Resource Center Message types, segments, reference guides, and integration tools.
HL7 Integration Services HL7 v2 interface development, message routing, and integration architecture.