MajwareMAJWARE
HL7 v2.x Reference

HL7 Segment Reference

Field-level reference for every HL7 v2.x segment. Each entry includes data types, required/optional status, common values from real healthcare systems, and troubleshooting tips written from production experience.

35
Segments
788+
Fields documented
v2.3 — v2.7
HL7 version

Message Control

6

Patient Administration

7
PID39 fields

Patient Identification

The PID segment contains the primary patient identification information including name, date of birth, address, and medical record numbers. It is the cornerstone of patient identity in HL7 v2.x messages and appears in virtually every ADT, order, and result message.

PD122 fields

Patient Additional Demographics

The PD1 segment carries supplemental patient demographic information that does not fit in the PID segment, including living situation, primary care provider, advance directives, and immunization registry status.

PV152 fields

Patient Visit

The PV1 segment contains information specific to a patient's visit or encounter, including patient class, assigned location, attending provider, and admission and discharge details. It is the core encounter record in HL7 v2.x.

PV250 fields

Patient Visit - Additional Information

The PV2 segment contains supplemental visit information not carried in PV1, including expected dates, visit descriptions, prior service dates, and special program codes. It provides additional context about the patient's visit that supports clinical and administrative workflows.

NK139 fields

Next of Kin / Associated Parties

The NK1 segment contains information about the patient's next of kin and other associated parties such as emergency contacts, guarantors, and authorized representatives. Multiple NK1 segments can appear in a message for different associated parties.

MRG7 fields

Merge Patient Information

The MRG segment contains the prior identifiers for a patient before a merge or move operation. It is sent in ADT A34 through A40 messages to allow receiving systems to update their patient index when a merge or move occurs.

AL16 fields

Allergy Information

The AL1 segment carries patient allergy information including allergen type, allergen identity, severity, and documented reactions. Multiple AL1 segments can be included in a message for patients with multiple allergies.

Financial

5

Scheduling

5

Other

4

Parse HL7 messages instantly

Paste any HL7 message into our free viewer. Segment explorer, field decoder, and validation — all client-side, nothing uploaded.

Open HL7 Message Viewer →

HL7 Integration Guide

Deep dive into HL7 v2.x interface design — channel configuration, segment mapping, acknowledgment modes, and Mirth Connect patterns.

Read the Guide →