Skip to content
Contact Us

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.

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.

Segments that identify the patient and their associated parties.

Segments that track the patient’s encounter and clinical events.

Segments that drive the order-result lifecycle — from order placement through result delivery.

Segments for billing, insurance, and diagnosis coding.

Segments for appointment management and clinical document tracking.