Reference·PV1 Segment·PV1-7
HL7 v2 Reference

Testing HL7 v2 PV1-7: What Attending Doctor Actually Needs to Handle

Jul 27, 2026 · 4 min read
← PV1-4 PV1-8 →

PV1-7 looks like a simple name field until you realize it is really an ID plus five or six name components bundled together, and provider-matching logic that trusts the wrong piece breaks the moment a source system sends the ID in a format the receiving system doesn't recognize.

Quick answer

PV1-7 is the seventh field of the PV1 segment — a composite (XCN data type) that identifies the physician of record for the visit, combining a provider ID with their name components.

What this field contains

Component 1
ID Number — the provider identifier, e.g. an NPI or internal code
Component 2
Family Name
Component 3
Given Name
Component 4
Middle Name or Initial
Component 6
Prefix, e.g. Dr.
Component 7+
Degree, source table, and assigning authority, when populated

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 7th field (445566^PATEL^RAJ^S^^MD) identifies Dr. Raj S. Patel as the attending physician. Synthetic patient — not a real person.

Where this trips people up

The ID component in PV1-7 can be an internal medical-record-system code, an NPI, or something else entirely, depending on the sending system, and it is rarely obvious which one just by looking at the message. Integrations that assume the ID is always an NPI and use it to look up a provider directly will fail to match legitimate attending physicians whenever a feed sends its own internal identifier instead.

Testing HL7 v2 PV1: The Fields Your System Actually Needs to Handle
Healthcare Data Interoperability: A Practical Explainer for IT Leaders
How to Write EDI Test Cases That Actually Catch Go-Live Failures
Test provider-matching logic against realistic data
Synthibase generates synthetic PV1 segments with realistic attending, referring, and consulting doctor composites — including mismatched ID formats.
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.