Communicates the current dispense status of a blood product (such as ready to dispense, dispensed, or returned) from the transfusion service back to the ordering system. It carries the donation identifier, product code, blood type, expiration date, and current status. BPX appears in BPS (Blood Product Dispense Status) messages and is used to track a blood product's lifecycle from cross-matching through dispensing.
from zato.hl7v2 import BPX, CWE
bpx = BPX()
status = CWE(identifier='READY', text='Ready for event')
bpx.bp_dispense_status = status
bpx.bp_quantity = '1'How to construct and work with real-world BPX segments.
Dispense status, workflow status, timestamp, and required quantity
from zato.hl7v2.v2_9 import BPX
from zato.hl7v2.v2_9 import CWE
bpx = BPX()
bpx.set_id_bpx = '1'
bpx.bp_dispense_status = CWE(
identifier='READY',
text='Ready for community allocation',
)
bpx.bp_status = 'CO'
bpx.bp_date_time_of_status = '20240415120000'
bpx.bp_quantity = '1'Donation id, component, intended use, product, lot, blood group, and testing
from zato.hl7v2.v2_9 import BPX
from zato.hl7v2.v2_9 import CNE, CWE, EI, XON
bpx = BPX()
bpx.set_id_bpx = '1'
bpx.bp_dispense_status = CWE(
identifier='STAGED',
text='Staged for wellness event',
)
bpx.bp_status = 'CO'
bpx.bp_date_time_of_status = '20240415121500'
bpx.bc_donation_id = EI(
entity_identifier='DON2024',
universal_id_type='BBANK',
)
bpx.bc_component = CNE(
identifier='PLT',
text='Platelet concentrate',
)
bpx.bc_donation_type_intended_use = CNE(
identifier='APHER',
text='Apheresis collection',
)
bpx.cp_commercial_product = CWE(
identifier='PLASMA01',
text='Plasma preparation',
)
bpx.cp_manufacturer = XON(organization_name='Heartland Plasma',)
bpx.cp_lot_number = EI(
entity_identifier='LOT88',
universal_id_type='LOT',
)
bpx.bp_blood_group = CNE(
identifier='ABPOS',
text='AB Rh positive',
)
bpx.bc_special_testing = [
CNE(
identifier='QUALCHK',
text='Quality verification check',
),
]
bpx.bp_expiration_date_time = '20250630120000'
bpx.bp_quantity = '1'
bpx.bp_amount = '250'
bpx.bp_units = CWE(identifier='ML', text='mL')Unique id, actual location and address, receiver, dispenser, action code
from zato.hl7v2.v2_9 import BPX
from zato.hl7v2.v2_9 import CNE, CWE, EI, PL, XAD, XCN, XON
bpx = BPX()
bpx.set_id_bpx = '1'
bpx.bp_dispense_status = CWE(
identifier='ALLOC',
text='Allocated to wellness event',
)
bpx.bp_status = 'CO'
bpx.bp_date_time_of_status = '20240415120000'
bpx.bc_donation_id = EI(
entity_identifier='DON2024',
universal_id_type='BBANK',
)
bpx.bc_component = CNE(
identifier='PLT', text='Platelet concentrate')
bpx.bc_donation_type_intended_use = CNE(
identifier='APHER', text='Apheresis donation')
bpx.cp_commercial_product = CWE(
identifier='PLASMA01', text='Plasma preparation')
bpx.cp_manufacturer = XON(organization_name='Heartland Plasma',)
bpx.cp_lot_number = EI(
entity_identifier='LOT88',
universal_id_type='LOT',
)
bpx.bp_blood_group = CNE(
identifier='ABPOS', text='AB Rh positive')
bpx.bc_special_testing = [
CNE(
identifier='QUALCHK',
text='Quality verification check',
),
]
bpx.bp_expiration_date_time = '20250630120000'
bpx.bp_quantity = '1'
bpx.bp_amount = '200'
bpx.bp_units = CWE(identifier='ML', text='mL')
bpx.bp_unique_id = EI(
entity_identifier='UID01',
universal_id_type='WELL',
)
bpx.bp_actual_dispensed_to_location = PL(
point_of_care='VENUE',
room='HALL1',
bed='A',
)
bpx.bp_actual_dispensed_to_address = XAD(
street_address='300 Event Plaza',
city='Denver',
state_or_province='CO',
zip_or_postal_code='80205',
country='USA',
)
bpx.bp_dispensed_to_receiver = XCN(
person_identifier='440011',
family_name='RIVER',
given_name='ALEX',
suffix='RN',
)
bpx.bp_dispensing_individual = XCN(
person_identifier='550022',
family_name='MEADOW',
given_name='JORDAN',
suffix='MD',
)
bpx.action_code = 'A'Step-by-step guides for working with HL7 v2 in Zato.
BPX communicates dispense status and workflow state for a blood bank unit, the time of that status, donation and product identifiers, preparation and testing context, quantity, hand-off location, and staff involved in community drive and inventory workflows. It works with BPO and BTX and aligns with ORC, OBR, PID, and PV1.
Fields 1–4 and 14 are required: set_id_bpx, bp_dispense_status, bp_status, bp_date_time_of_status, and bp_quantity. Populate optional donation, component, and location fields when your integration guide expects them.
from zato.hl7v2.v2_9 import BPX, CWE
bpx = BPX()
bpx.set_id_bpx = '1'
bpx.bp_dispense_status = CWE(
identifier='READY', text='Ready for event')
bpx.bp_status = 'CO'
bpx.bp_date_time_of_status = '20240415120000'
bpx.bp_quantity = '1'Use the CNE constructor with identifier and text for coded entries that include a coding system name when your interface specifies it.
from zato.hl7v2.v2_9 import BPX, CNE
bpx = BPX()
bpx.bc_component = CNE(
identifier='PLT',
text='Platelet concentrate',
)Field 12 may repeat in ER7 with ~ between testing entries. In Python, assign a list of CNE instances to bc_special_testing.
BPX focuses on preparation and dispense status for a unit, while BTX records transfusion or disposition milestones and related timing for the same product context. Your message profile should define when each segment appears.
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 BPX segment, HL7 v2.9.
| # | Python name | Datatype | Usage | Repeatable | Table |
|---|---|---|---|---|---|
| 1 | set_id_bpx | SI | Required | No | - |
| 2 | bp_dispense_status | CWE | Required | No | HL70510 |
| 3 | bp_status | ID | Required | No | HL70511 |
| 4 | bp_date_time_of_status | DTM | Required | No | - |
| 5 | bc_donation_id | EI | Optional | No | - |
| 6 | bc_component | CNE | Optional | No | HL70577 |
| 7 | bc_donation_type_intended_use | CNE | Optional | No | HL70578 |
| 8 | cp_commercial_product | CWE | Optional | No | HL70512 |
| 9 | cp_manufacturer | XON | Optional | No | - |
| 10 | cp_lot_number | EI | Optional | No | - |
| 11 | bp_blood_group | CNE | Optional | No | HL70579 |
| 12 | bc_special_testing | CNE | Optional | Yes | HL70580 |
| 13 | bp_expiration_date_time | DTM | Optional | No | - |
| 14 | bp_quantity | NM | Required | No | - |
| 15 | bp_amount | NM | Optional | No | - |
| 16 | bp_units | CWE | Optional | No | HL70581 |
| 17 | bp_unique_id | EI | Optional | No | - |
| 18 | bp_actual_dispensed_to_location | PL | Optional | No | - |
| 19 | bp_actual_dispensed_to_address | XAD | Optional | No | - |
| 20 | bp_dispensed_to_receiver | XCN | Optional | No | - |
| 21 | bp_dispensing_individual | XCN | Optional | No | - |
| 22 | action_code | ID | Optional | No | - |
Get started with Zato and connect your systems in minutes.