Reference·HL7 v2·PV1
HL7 v2 Reference

Testing HL7 v2 PV1: The Fields Your System Actually Needs to Handle

Jul 27, 2026 · 6 min read

PV1 is the segment that turns a patient identity into an actual hospital stay — where they are, who is treating them, and how the visit is billed. It shows up in nearly every ADT message and in most orders and results too, which means a single mis-mapped field here can ripple into bed boards, provider schedules, and billing systems at once.

Quick answer

PV1 (Patient Visit) is the HL7 v2 segment that carries encounter-level data — patient class, location, care team, admission and discharge details — and typically follows PID as the third or fourth segment in a message.

The fields that actually matter in practice

PV1-2 →
Patient Class — I/O/E/etc. — drives routing logic in most downstream systems
PV1-3 →
Assigned Patient Location — a composite of unit^room^bed — the field bed management boards live on
PV1-7 →
Attending Doctor — a repeatable XCN composite — ID, name, and credential all packed into one field
PV1-18 →
Patient Type — looks like Patient Class but is separately, and often inconsistently, maintained
PV1-19 →
Visit Number — the encounter ID — nearly everything charted during the stay keys off this
PV1-36 →
Discharge Disposition — only populated on discharge — sent empty on every other event type
PV1-44 →
Admit Date/Time — format drift between date-only and full timestamp is a frequent go-live bug

Example

Synthetic example Generated by Synthibase
PV1|1|I|3W^301^B^HOSP|U|||445566^PATEL^RAJ^S^^MD|667788^JONES^MARY^E^^MD|889900^LEE^DAVID^R^^MD|CAR||||7|||998877^CHEN^LISA^K^^MD|I|8827364501|MCR||||||||||||||||01||||||||202607261430

A synthetic inpatient cardiology admission, from attending doctor through discharge disposition. Synthetic patient — not a real person.

Where this trips people up

PV1-3 (Assigned Patient Location) is a composite field, and teams frequently build bed-management integrations against only the first two or three components — point of care and room — while ignoring the facility and building/floor components further down. That works fine in a single-building test environment and then breaks the moment the same integration goes live across a multi-facility health system where two units share a room number.

HL7 ADT Messages: A01 through A08 Explained
How to Build a Test Environment Strategy for a Multi-Hospital System
Generate synthetic PV1 segments in seconds
Synthibase generates realistic HL7 v2 messages with fully populated PV1 segments — every visit field, every code value, zero PHI.
Start free trial →
This page is written independently by Synthibase for testing and informational purposes. It is not an official publication of HL7 International or X12/Washington Publishing Company, and is not a substitute for reviewing the official standard or your trading partner's companion guide. See our Terms of Service for full legal terms.