Schedule a demo
Segment

UB82 billing data

Was designed to carry data elements required for UB-82 (Uniform Bill 1982) institutional claims in the United States, including condition codes, value codes, and occurrence codes. Deprecated as of v2.3 and withdrawn in v2.6, legacy billing system interfaces may still encounter this segment, but modern implementations use UB2 or other billing segments instead.

0fields
0required
v2.9HL7 version
ub1.py
from zato.hl7v2.v2_9 import UB1

ub1 = UB1()
ub1.set_id_ub1 = '1'
ub1.type_of_bill_code = '71'
ub1.claim_code = '001'
ub1.statement_covered_period = '20260101-20260331'
ub1.diagnosis_related_group = '470'

Build UB1 segments in Python

How to construct and work with real-world UB1 segments.

1

Wellness preventive care visit

Annual health screening with preventive services bundle

from zato.hl7v2.v2_9 import UB1

ub1 = UB1()
ub1.set_id_ub1 = '1'
ub1.type_of_bill_code = '71'
ub1.claim_code = '001'
ub1.statement_covered_period = '20240101-20240331'
ub1.diagnosis_related_group = '470'
ub1.diagnosis_code = [
    {'diagnosis_code': 'Z00.00', 'description': 'Encounter for general adult     medical exam', 'coding_system': 'ICD10CM'},
    {'diagnosis_code': 'V70.0', 'description': 'General medical     examination', 'coding_system': 'ICD9CM'},
]
ub1.procedure_code = [
    {'procedure_code': '99396', 'description': 'Periodic comprehensive     preventive medicine reevaluation', 'coding_system': 'HCPCS'},
]
ub1.revenue_code = [
    {'revenue_code': '450', 'description': 'Preventive care     services', 'coding_system': 'UB92'},
]
ub1.value_code = [
    {'value_code': '01', 'description': 'Preventive care',     'coding_system': 'UB92'},
    {'value_code': 'F1', 'description': 'Wellness program     participant', 'coding_system': 'UB92'},
]
2

Fitness assessment package

Comprehensive wellness evaluation with body composition analysis

from zato.hl7v2.v2_9 import UB1

ub1 = UB1()
ub1.set_id_ub1 = '1'
ub1.type_of_bill_code = '71'
ub1.claim_code = '002'
ub1.statement_covered_period = '20240215-20240215'
ub1.diagnosis_related_group = '470'
ub1.diagnosis_code = [
    {'diagnosis_code': 'Z13.220', 'description': 'Encounter for screening     for lipoid disorders', 'coding_system': 'ICD10CM'},
]
ub1.procedure_code = [
    {'procedure_code': 'G0422', 'description': 'Initial preventive care     examination', 'coding_system': 'HCPCS'},
    {'procedure_code': '97001', 'description': 'Physical therapy     evaluation', 'coding_system': 'HCPCS'},
    {'procedure_code': '97110', 'description': 'Therapeutic     procedure', 'coding_system': 'HCPCS'},
]
ub1.revenue_code = [
    {'revenue_code': '520', 'description': 'Physical therapy',     'coding_system': 'UB92'},
]
ub1.value_code = [
    {'value_code': '970', 'description': 'Physical therapy',     'coding_system': 'UB92'},
    {'value_code': 'BF', 'description': 'Fitness assessment',     'coding_system': 'UB92'},
]
3

Nutrition counseling session

Individualized wellness nutrition planning and education

from zato.hl7v2.v2_9 import UB1

ub1 = UB1()
ub1.set_id_ub1 = '1'
ub1.type_of_bill_code = '71'
ub1.claim_code = '003'
ub1.statement_covered_period = '20240310-20240310'
ub1.diagnosis_related_group = '470'
ub1.diagnosis_code = [
    {'diagnosis_code': 'Z71.3', 'description': 'Dietary counseling     and surveillance', 'coding_system': 'ICD10CM'},
]
ub1.procedure_code = [
    {'procedure_code': '97802', 'description': 'Medical nutrition     therapy', 'coding_system': 'HCPCS'},
    {'procedure_code': '97755', 'description': 'Body composition     analysis', 'coding_system': 'HCPCS'},
]
ub1.revenue_code = [
    {'revenue_code': '410', 'description': 'Nutrition services',     'coding_system': 'UB92'},
]
ub1.value_code = [
    {'value_code': 'A1', 'description': 'Nutrition counseling',     'coding_system': 'UB92'},
]

Learn by building

Step-by-step guides for working with HL7 v2 in Zato.

Frequently asked questions

UB1 carries UB82 billing information for healthcare claims, including diagnosis codes, procedure codes, revenue codes, and value codes used for insurance reimbursement.

Use Z00 series ICD-10CM codes for preventive encounters and HCPCS G0422 for initial preventive care examinations. Revenue code 450 indicates preventive care services.

UB1 supports ICD-9CM, ICD-10CM for diagnoses, HCPCS for procedures, and UB92 for revenue and value codes. Each code should include the appropriate coding system identifier.

Use YYYYMMDD-YYYYMMDD format for date ranges, or YYYYMMDD for single dates.

ub1.statement_covered_period = '20240101-20240331'
# or
ub1.statement_covered_period = '20240215'

Code 71 represents institutional claims for facilities other than hospitals, such as wellness centers, rehabilitation facilities, and outpatient clinics.

Zato connects to any system that speaks HL7v2 over MLLP or FHIR over REST. This includes Epic, Cerner, Meditech, Allscripts, and other EHR platforms.

Yes, Zato has built-in MLLP support for sending and receiving HL7v2 messages. MLLP channels handle the framing protocol automatically.

Zato supports HL7 v2.9, which is backward compatible with earlier versions including v2.3, v2.5, and v2.7. Standard segments and datatypes are available as typed Python classes.

Yes. Zato handles both HL7v2 and FHIR natively, so you can parse v2 messages and build FHIR resources with IG-specific extensions in the same service. Typed Python classes are available for both protocols, including extensions from US Core, UK Core, Da Vinci, and other Implementation Guides.

UB1 field reference

Complete list of fields in the UB1 segment, HL7 v2.9.

#Python nameDatatypeUsageRepeatableTable

Ready to build integrations?

Get started with Zato and connect your systems in minutes.

Open source In Python