Reference·PV1 Segment·PV1-1
HL7 v2 Reference

What Is HL7 v2 PV1-1? Set ID, Explained for Testers

Jul 27, 2026 · 4 min read
PV1-2 →

Most messages only ever carry a single PV1 segment, so PV1-1 sits there as a harmless "1" for years — until a message type that legitimately repeats PV1 shows up and an interface that assumed a constant value starts silently overwriting visit data.

Quick answer

PV1-1 is the first field of the PV1 segment — a simple incrementing sequence number used to distinguish multiple PV1 segments when more than one appears in the same message.

What this field contains

1
First (and usually only) PV1 segment in the message
2
Second PV1 segment, if the message repeats the segment
n
Increments by one for each additional repetition

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

The first field (1) marks this as the sole PV1 segment in the message. Synthetic patient — not a real person.

Where this trips people up

Parsers that hardcode an assumption of "exactly one PV1 per message" tend to ignore PV1-1 entirely, which works fine until a message type or trading partner sends a legitimate repeat. When that happens, code that keys visit records off segment position instead of PV1-1 will overwrite the first visit with the second instead of storing both — a bug that only surfaces once real-world message variety hits the interface.

Testing HL7 v2 PV1: The Fields Your System Actually Needs to Handle
HL7 ADT Messages: A01 through A08 Explained
How to Write EDI Test Cases That Actually Catch Go-Live Failures
Test every PV1 repetition pattern automatically
Synthibase generates synthetic HL7 messages with single and repeating PV1 segments — so edge cases show up in testing, not production.
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.