Reference·PV2 Segment·PV2-2
HL7 v2 Reference

HL7 v2 PV2-2 Field Guide: Accommodation Code Values and Common Mistakes

Jul 27, 2026 · 4 min read
PV2-3 →

A one-field typo in Accommodation Code can quietly assign a test patient to the wrong room class and send a bad charge downstream - and nobody notices until billing reconciliation.

Quick answer

PV2-2 is a coded element (typically CE or CWE depending on version) that records what kind of accommodation the patient requested or was assigned - private room, semi-private, ward, and so on. It's usually drawn from a site-defined or user-defined table rather than a single universal HL7 table, which means the actual code values differ from one facility's configuration to the next. For test data purposes, treat it as a lookup value that must match whatever table the receiving system expects, not a free-text field.

Valid code values

A
Private — single-occupancy room accommodation
B
Semi-Private — shared room, typically two beds
W
Ward — multi-bed shared accommodation
I
Isolation — infection-control or protective isolation room
S
Suite — upgraded accommodation, common in maternity or VIP scenarios

Example

Synthetic example Generated by Synthibase
PV2||A^SEMI-PRIVATE^HL70129|R65.2^ABDOMINAL PAIN RLQ^I10||||20260726073000|20260729120000||||20260724150000||||||||||||1^HOME^HL70112

PV2-2 here carries the triplet A^SEMI-PRIVATE^HL70129 - a code, its display text, and the table it was pulled from.

Where this trips people up

Teams frequently assume Accommodation Code is standardized across the industry the way admin sex or marital status is. It isn't - it's almost always a locally defined table (HL70129 is a placeholder table name many systems reuse, not a fixed universal list). When you build synthetic PV2-2 values, pull from the actual table the target system publishes rather than inventing plausible-looking codes, or your "valid" test message will fail validation for a reason that has nothing to do with the scenario you're actually testing.

Testing HL7 v2 PV2: The Fields Your System Actually Needs to Handle
HL7 ADT Messages: A01 through A08 Explained
Synthetic Patient Data: Complete Guide for Software Testing
Generate accurate coded test values automatically
Synthibase keeps HL7 v2 coded fields like PV2-2 aligned to the tables your target systems actually use, so your synthetic messages validate cleanly instead of failing on made-up codes.
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.