HL7 v2 PV1-2 Field Guide: Patient Class Codes and Common Mistakes
PV1-2 is one of the first fields most routing rules check, which means any code value a rule engine has never seen — a recurring outpatient, a preadmit, an observation stay — tends to fall through to a default branch nobody actually reviewed.
PV1-2 is the second field of the PV1 segment — a required, site-defined code that classifies the type of patient visit, such as inpatient, outpatient, or emergency.
Valid code values
Example
The 2nd field (I) marks this as an inpatient visit. Synthetic patient — not a real person.
Where this trips people up
This field is technically site-defined, so the exact list of valid codes varies by facility — some hospitals actively use R for recurring patients or B for obstetrics, others never send them. Interfaces built and tested against only I and O will mis-route or reject those less common values the first time a source system that uses them goes live, usually during an acquisition or new-facility onboarding.