Reference·PV1 Segment·PV1-18
HL7 v2 Reference

Testing HL7 v2 PV1-18: What Patient Type Actually Needs to Handle

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

PV1-18 uses code values that often look nearly identical to PV1-2, which leads a lot of integrations to treat them as duplicates of each other — right up until a facility configures the two fields to diverge, and half the billing logic built on that assumption quietly breaks.

Quick answer

PV1-18 is the eighteenth field of the PV1 segment — a site-defined code classifying the patient type for billing and reporting purposes, maintained separately from Patient Class in PV1-2.

Common code values (facility-defined, examples only)

I
Inpatient
O
Outpatient
E
Emergency
B
Observation
S
Same-day surgery

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 18th field (I) marks the patient type as inpatient, matching Patient Class here — but the two fields are independently maintained. Synthetic patient — not a real person.

Where this trips people up

Some facilities use PV1-18 specifically to flag billing-relevant statuses — like observation stays that are clinically similar to inpatient care but reimbursed differently — while PV1-2 stays "I" the whole time. Interfaces that read only Patient Class and ignore Patient Type will miss that distinction entirely, which is a real problem when observation-versus-inpatient status directly affects how a claim gets paid.

Testing HL7 v2 PV1: The Fields Your System Actually Needs to Handle
Regression Testing for EHR Upgrades: A Complete Guide
How to Write EDI Test Cases That Actually Catch Go-Live Failures
Test Patient Class and Patient Type divergence
Synthibase generates synthetic PV1 segments where Patient Class and Patient Type intentionally differ — surfacing billing-logic bugs before they hit real claims.
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.