Provides billing instructions to the filling application for an ordered service, specifying when to charge (such as on order or on result), the charge type, and the account to be billed. It is an optional segment that follows order detail segments in ORM and other order messages, allowing the ordering system to direct how and where charges should be posted.
from zato.hl7v2 import BLG, CCD, CX
blg = BLG()
blg.when_to_charge = CCD(
ccd_1='O', ccd_2='Order complete')
blg.account_id = CX(
id_number='ACCT001')How to construct and work with real-world BLG segments.
Charge after the visit completes, professional fee type, and wellness account id
from zato.hl7v2.v2_9 import BLG
from zato.hl7v2.v2_9 import CCD, CX, CWE
blg = BLG()
blg.when_to_charge = CCD(ccd_1='O', ccd_2='Order complete')
blg.charge_type = 'R'
blg.account_id = CX(
id_number='ACCT2024', assigning_authority='WELL')
blg.charge_type_reason = CWE(
identifier='WV',
text='Wellness visit bundle',
name_of_coding_system='HL70475')Deferred billing until results are finalized with preventive-care reason
from zato.hl7v2.v2_9 import BLG
from zato.hl7v2.v2_9 import CCD, CX, CWE
blg = BLG()
blg.when_to_charge = CCD(
ccd_1='S', ccd_2='Service complete')
blg.charge_type = 'P'
blg.account_id = CX(
id_number='SCREEN99', assigning_authority='PREV')
blg.charge_type_reason = CWE(
identifier='PREV',
text='Preventive screening package',
name_of_coding_system='HL70475')Order-completion timing with coaching program account and reason
from zato.hl7v2.v2_9 import BLG
from zato.hl7v2.v2_9 import CCD, CX, CWE
blg = BLG()
blg.when_to_charge = CCD(ccd_1='O', ccd_2='Order complete')
blg.charge_type = 'C'
blg.account_id = CX(
id_number='NUTRI450', assigning_authority='COACH')
blg.charge_type_reason = CWE(
identifier='COACH',
text='Nutrition coaching program',
name_of_coding_system='HL70475')Step-by-step guides for working with HL7 v2 in Zato.
BLG tells downstream billing systems when to post charges, which charge category applies, which financial account to use, and the business reason for that choice. It is usually paired with order or observation segments in the same message.
Field when_to_charge uses the CCD datatype with HL70100 (when to charge). Populate both components for a clear code and display text:
from zato.hl7v2.v2_9 import BLG, CCD
blg = BLG()
blg.when_to_charge = CCD(
ccd_1='O', ccd_2='Order complete')Use account_id with the CX datatype so identifiers stay structured:
from zato.hl7v2.v2_9 import BLG, CX
blg = BLG()
blg.account_id = CX(
id_number='ACCT2024', assigning_authority='WELL')charge_type_reason is a CWE referencing HL70475. It explains why the charge type was selected—for example a bundled wellness program or preventive package.
BLG provides billing control on an order or observation, while FT1 records detailed financial transaction lines. A message may carry BLG near ORC/OBR and FT1 rows that expand posted amounts for the same encounter.
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.
Complete list of fields in the BLG segment, HL7 v2.9.
| # | Python name | Datatype | Usage | Repeatable | Table |
|---|---|---|---|---|---|
| 1 | when_to_charge | CCD | Optional | No | HL70100 |
| 2 | charge_type | ID | Optional | No | HL70122 |
| 3 | account_id | CX | Optional | No | - |
| 4 | charge_type_reason | CWE | Optional | No | HL70475 |
Get started with Zato and connect your systems in minutes.