NEWFree ROI Calculators — quantify what prior auth and siloed data are costing your organization.Prior Auth ROI Siloed Data ROI
HL7 v2Segment7 min read

HL7 UB2 Segment: UB-92 Data

The UB2 segment carries the institutional-billing data elements that populate a UB-92 (HCFA-1450) claim form. It captures covered and non-covered days, condition codes, value amounts and codes, occurrence codes and dates, occurrence span codes and dates, document control numbers, and the state and national form-locator overflow fields specific to the UB-92 paper claim. UB2 is the successor to the UB1 segment, which carries the earlier UB-82 form data, and the two share the same institutional-billing vocabulary.

Purpose

UB2 conveys the financial and stay-related details a provider reports to a payer on a UB-92 claim. These elements describe how much of a stay is covered, which condition and occurrence codes apply, the value amounts and codes that justify reimbursement, and the form-locator data states and national programs require. UB2 is informational at the segment level; the standard marks its fields as optional and relies on UB-specific value, condition, and occurrence code sets rather than general HL7 tables.

Used in

UB1 (UB-82 form data) and UB2 (UB-92 form data) carry institutional-billing form information, while GP1 and GP2 carry grouping and reimbursement (DRG-based) data. UB2 appears in BAR (billing and account) messages and in ADT institutional-billing contexts, typically following the PID and PV1 segments that establish patient and visit context.

Field-by-field reference

Source: HAPI HL7v2 v2.5.1 javadocs (UB2.html). Length is shown as ; Required and Table # are taken from the HL7 v2.5.1 standard where well-established. Many UB2 fields use UB-specific value, condition, and occurrence codes that have no general HL7 table, so those Table # cells are left .

SeqNameData TypeLengthReqRepeatTable #Description
UB2-1Set ID - UB2siOSequence number for this UB2 instance
UB2-2Co-Insurance Days (9)stONumber of co-insurance days in stay
UB2-3Condition Code (24-30)isOYUB-92 condition codes describing the claim
UB2-4Covered Days (7)stONumber of covered days in stay
UB2-5Non-Covered Days (8)stONumber of non-covered days in stay
UB2-6Value Amount & CodeuvcOYValue codes and their dollar amounts
UB2-7Occurrence Code & Date (32-35)ocdOYOccurrence codes and associated dates
UB2-8Occurrence Span Code/Dates (36)ospOYOccurrence span codes with start and end dates
UB2-9UB92 Locator 2 (State)stOYState-defined data for form locator 2
UB2-10UB92 Locator 11 (State)stOYState-defined data for form locator 11
UB2-11UB92 Locator 31 (National)stONational data for form locator 31
UB2-12Document Control NumberstOYPayer document control numbers
UB2-13UB92 Locator 49 (National)stOYNational data for form locator 49
UB2-14UB92 Locator 56 (State)stOYState-defined data for form locator 56
UB2-15UB92 Locator 57 (National)stONational data for form locator 57
UB2-16UB92 Locator 78 (State)stOYState-defined data for form locator 78
UB2-17Special Visit CountnmONumber of special visits on the claim

Most-used fields

  • UB2-1 Set ID - UB2: identifies the instance when more than one UB2 appears; optional even when present.
  • UB2-3 Condition Code (24-30): repeating UB-92 condition codes that qualify the claim for payer rules.
  • UB2-4 Covered Days (7) and UB2-5 Non-Covered Days (8): the split between payable and non-payable days in the stay.
  • UB2-6 Value Amount & Code: repeating value codes paired with dollar amounts that drive reimbursement.
  • UB2-7 Occurrence Code & Date (32-35) and UB2-8 Occurrence Span Code/Dates (36): repeating event and span documentation for the stay.

Version differences (2.3 to 2.8.2)

  • UB2 was introduced to carry UB-92 (HCFA-1450) form data after the UB-82 form was superseded; the legacy UB1 segment remained for UB-82 reporting.
  • Through v2.5.1 UB2 retains its full set of state and national form-locator fields and repeating value, condition, occurrence, and occurrence-span groups.
  • Composite data-type refinements across the 2.3 to 2.8.2 range (notably the value-amount UVC, occurrence OCD, and occurrence-span OSP composites) tightened component definitions without changing UB2 field order.
  • In later 2.x releases institutional billing increasingly relies on the grouping/reimbursement segments GP1 and GP2 alongside UB2. Confirm field availability against the specific version in use.

Common mistakes

  • Treating Set ID UB2-1 as required. It is optional in the standard; do not reject a UB2 that omits it.
  • Confusing UB2 (UB-92) with UB1 (UB-82). The segments are not interchangeable and use different form-locator fields.
  • Assuming day-count fields are numeric. In UB2, Co-Insurance, Covered, and Non-Covered days (UB2-2, UB2-4, UB2-5) are ST strings, not NM.
  • Expecting general HL7 tables for condition, value, and occurrence codes. UB2 uses UB-specific code sets, not normalized HL7 tables, for most fields.
  • Collapsing repeating fields. UB2-3, UB2-6, UB2-7, UB2-8, and several locator fields repeat; flattening them loses claim detail.

Examples

Minimal UB2 (covered and non-covered days only):

UB2|1|||30|5

Fully populated UB2:

UB2|1|4|A1~A2|30|5|46^1200.00~47^350.00|A1^20260601~A2^20260603|71^20260601^20260605|LOC2A~LOC2B|LOC11|NAT31|DCN778901~DCN778902|NAT49A~NAT49B|LOC56|NAT57|LOC78|2

Annotated breakdown:

UB2|1|4|A1~A2|30|5|46^1200.00~47^350.00|A1^20260601~A2^20260603|71^20260601^20260605|...
    |  | |     |  |  |                  |                       |
    |  | |     |  |  |                  |                       +-> UB2-8 Occurrence Span: code 71, 06/01/2026 to 06/05/2026
    |  | |     |  |  |                  +-------------------------> UB2-7 Occurrence Code & Date: A1 on 06/01, A2 on 06/03
    |  | |     |  |  +--------------------------------------------> UB2-6 Value Amount & Code: 46 = $1200.00, 47 = $350.00
    |  | |     |  +-----------------------------------------------> UB2-5 Non-Covered Days = 5
    |  | |     +--------------------------------------------------> UB2-4 Covered Days = 30
    |  | +--------------------------------------------------------> UB2-3 Condition Codes = A1, A2 (repeating)
    |  +----------------------------------------------------------> UB2-2 Co-Insurance Days = 4
    +-------------------------------------------------------------> UB2-1 Set ID - UB2 = 1

In-context excerpt inside a BAR^P01 (billing account) message, after PID and PV1:

MSH|^~&|REGISTRATION|MERCYGEN|BILLING|MERCYGEN|20260610113000||BAR^P01^BAR_P01|MSG10242|P|2.5.1
EVN|P01|20260610113000
PID|1||MRN884412^^^MERCYGEN^MR||DOE^JANE^Q||19710204|F
PV1|1|I|3WEST^312^A^MERCYGEN||||1023^WELBY^MARCUS|||MED||||A|||1023^WELBY^MARCUS|IP|ACC778901|||||||||||||||||||||||||20260601|20260605
UB2|1|4|A1~A2|30|5|46^1200.00~47^350.00|A1^20260601|71^20260601^20260605|||NAT31|DCN778901|||||2

Second in-context excerpt (a shorter UB-92 report following PV1):

MSH|^~&|REGISTRATION|RIVEROAKS|BILLING|RIVEROAKS|20260609090000||BAR^P01^BAR_P01|MSG55013|P|2.5.1
EVN|P01|20260609090000
PID|1||MRN200337^^^RIVEROAKS^MR||SMITH^ROBERT^A||19640812|M
PV1|1|I|5EAST^501^B^RIVEROAKS||||2210^HOUSE^GREGORY|||SUR||||A|||2210^HOUSE^GREGORY|IP|ACC661204|||||||||||||||||||||||||20260520|20260528
UB2|1||B1|8|0|48^900.00||||||DCN661204||||||

FHIR mapping

  • Source: UB2.
  • Target: Not mapped at the segment level.
  • Notes: No segment-level ConceptMap is published in the v2-to-FHIR IG for UB2. Institutional-billing data maps conceptually to the FHIR Claim resource (UB-04/837I billing). Covered and non-covered days, value codes, occurrence and occurrence-span data, and document control numbers align with Claim.supportingInfo and Claim.identifier rather than a single normalized field.

Engine considerations

  • UB2 fields are optional; a conformant engine should accept a UB2 with only a few populated fields and not reject on missing Set ID.
  • Handle the day-count fields (UB2-2, UB2-4, UB2-5) as ST strings, not numerics, when round-tripping.
  • Preserve repetitions in UB2-3, UB2-6, UB2-7, UB2-8, and the repeating locator fields. Use repetition-aware accessors so entries do not collapse.
  • Validate value-amount (UVC), occurrence (OCD), and occurrence-span (OSP) composites by component rather than as flat strings.
  • Be explicit about UB2 versus UB1 routing, since both can appear in institutional-billing flows and use different form locators.

How Vorro parses and produces UB2

Vorro parses UB2 into a normalized institutional-billing model that keeps each repeating group intact: condition codes (UB2-3), value amount and code pairs (UB2-6), occurrence code and date pairs (UB2-7), and occurrence span entries (UB2-8) are read as lists. Day-count fields are preserved as ST strings to match the standard, and document control numbers (UB2-12) and the state and national locator fields are passed through without alteration. When producing UB2, Vorro emits fields in standard sequence, populates only the elements present in the source claim, and leaves the UB-specific code values unaltered so downstream payers receive them in their primary form.

Sources

← Back to HL7 v2 Guide

Ready to Integrate This Into Your Workflow?

Talk to a Vorro expert about implementing HL7 v2 in your specific environment.

Browse HL7 v2 Guides