Tracks the inventory of substances (reagents, tips, calibrators, waste) and equipment state indicators on laboratory instruments and analyzers. It carries substance identifier, status, quantity (initial, current, available), consumption rate, and expiration information. INV is used in equipment-to-LAS and LAS-to-LIS communication via automation messages to monitor reagent levels and trigger reordering or maintenance actions.
from zato.hl7v2.v2_9 import INV
from zato.hl7v2.v2_9 import CWE
inv = INV()
inv.substance_identifier = CWE(identifier='VITD')How to construct and work with real-world INV segments.
Liquid calibrator with lot, shelf life, and on-board stability
from zato.hl7v2.v2_9 import INV
from zato.hl7v2.v2_9 import CQ, CWE
inv = INV()
inv.substance_identifier = CWE(
identifier='VITD',
text='Vitamin D reagent',
)
inv.substance_status = CWE(
identifier='ACT',
text='Active'
)
inv.substance_type = CWE(
identifier='LIQ',
text='Liquid',
)
inv.inventory_container_identifier = CWE(identifier='RACK-A',)
inv.container_carrier_identifier = CWE(identifier='CART-A',)
inv.position_on_carrier = CWE(identifier='POS1',)
inv.initial_quantity = '50'
inv.current_quantity = '48'
inv.available_quantity = '48'
inv.consumption_quantity = '2'
inv.quantity_units = CWE(identifier='test')
inv.expiration_date_time = '20251230120000'
inv.first_used_date_time = '20240401090000'
inv.test_fluid_identifiers = CWE(
identifier='VIT',
text='Wellness panel'
)
inv.manufacturer_lot_number = 'LOT88A'
inv.manufacturer_identifier = CWE(
identifier='ACME',
text='Acme Diagnostics',
)
inv.supplier_identifier = CWE(
identifier='SUPP',
text='SupplyCo',
)
inv.on_board_stability_time = CQ(
quantity='30',
units=CWE(
identifier='d',
name_of_coding_system='UCUM',
),
)
inv.target_value = CQ(
quantity='100',
units=CWE(
identifier='ng/mL',
name_of_coding_system='UCUM',
),
)
inv.equipment_state_indicator_type_code = CWE(
identifier='READY',
text='Ready',
)
inv.equipment_state_indicator_value = CQ(
quantity='95',
units=CWE(
identifier='percent',
name_of_coding_system='UCUM',
),
)Micronutrient panel cartridge with remaining tests and carrier slot
from zato.hl7v2.v2_9 import INV
from zato.hl7v2.v2_9 import CQ, CWE
inv = INV()
inv.substance_identifier = CWE(
identifier='NUTR',
text='Nutrition panel',
)
inv.substance_status = CWE(
identifier='OK',
text='Ready'
)
inv.substance_type = CWE(
identifier='KIT',
text='Kit',
)
inv.inventory_container_identifier = CWE(identifier='SLOT-B2',)
inv.container_carrier_identifier = CWE(identifier='SKID-3',)
inv.position_on_carrier = CWE(identifier='B2',)
inv.initial_quantity = '200'
inv.current_quantity = '180'
inv.available_quantity = '180'
inv.consumption_quantity = '20'
inv.quantity_units = CWE(identifier='test')
inv.expiration_date_time = '20260601120000'
inv.first_used_date_time = '20240415100000'
inv.test_fluid_identifiers = CWE(
identifier='IRON',
text='Assay'
)
inv.manufacturer_lot_number = 'LOT-N44'
inv.manufacturer_identifier = CWE(
identifier='NUTRI',
text='NutriLab',
)
inv.supplier_identifier = CWE(
identifier='VEND',
text='VendorCo',
)
inv.on_board_stability_time = CQ(
quantity='14',
units=CWE(
identifier='d',
name_of_coding_system='UCUM',
),
)
inv.target_value = CQ(
quantity='1',
units=CWE(
identifier='unit',
name_of_coding_system='UCUM',
),
)
inv.equipment_state_indicator_type_code = CWE(
identifier='OK',
text='Operational',
)
inv.equipment_state_indicator_value = CQ(
quantity='1',
units=CWE(
identifier='unit',
name_of_coding_system='UCUM',
),
)Exercise physiology assay with target concentration and state flag
from zato.hl7v2.v2_9 import INV
from zato.hl7v2.v2_9 import CQ, CWE
inv = INV()
inv.substance_identifier = CWE(
identifier='FIT',
text='Fitness calibrator',
)
inv.substance_status = CWE(
identifier='RUN',
text='Running'
)
inv.substance_type = CWE(
identifier='STD',
text='Standard',
)
inv.inventory_container_identifier = CWE(identifier='WELL-01',)
inv.container_carrier_identifier = CWE(identifier='LINE-2',)
inv.position_on_carrier = CWE(identifier='A1',)
inv.initial_quantity = '25'
inv.current_quantity = '22'
inv.available_quantity = '22'
inv.consumption_quantity = '3'
inv.quantity_units = CWE(identifier='vial')
inv.expiration_date_time = '20250930120000'
inv.first_used_date_time = '20240420080000'
inv.test_fluid_identifiers = CWE(
identifier='CK',
text='Marker'
)
inv.manufacturer_lot_number = 'LOT-F12'
inv.manufacturer_identifier = CWE(
identifier='SPORT',
text='SportLab',
)
inv.supplier_identifier = CWE(
identifier='LOG',
text='Logistics',
)
inv.on_board_stability_time = CQ(
quantity='7',
units=CWE(
identifier='d',
name_of_coding_system='UCUM',
),
)
inv.target_value = CQ(
quantity='50',
units=CWE(
identifier='U/L',
name_of_coding_system='UCUM',
),
)
inv.equipment_state_indicator_type_code = CWE(
identifier='CAL',
text='Calibrated',
)
inv.equipment_state_indicator_value = CQ(
quantity='1',
units=CWE(
identifier='ratio',
name_of_coding_system='UCUM',
),
)Step-by-step guides for working with HL7 v2 in Zato.
HL7v2 reserves INV position 14 for backward compatibility. Interfaces keep the extra delimiter so field positions stay aligned with instrument drivers that still expect the older layout.
Access the INV segment and quantity fields by name:
from zato.hl7v2.v2_9 import INV
from zato.hl7v2.v2_9 import CWE
inv = INV()
inv.substance_identifier = CWE(identifier='VITD',)
inv.manufacturer_lot_number = 'L2025'
inv.current_quantity = '800'Both use the CQ datatype with a numeric quantity and coded units:
from zato.hl7v2.v2_9 import INV
from zato.hl7v2.v2_9 import CQ, CWE
inv = INV()
inv.on_board_stability_time = CQ(
quantity='30',
units=CWE(
identifier='d',
name_of_coding_system='UCUM',
),
)Use multiple CWE rows when an interface reports separate inventory states such as active shelf life versus onboard stability. Your middleware can normalize them into a single operational view for wellness scheduling.
INV carries quantity and shelf metadata for a substance on the analyzer. SID narrows lot and manufacturer detail for that material, while TCD defines analyzer test configuration. Together they describe what is installed, how it is identified, and how it is consumed for each assay.
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 INV segment, HL7 v2.9.
| # | Python name | Datatype | Usage | Repeatable | Table |
|---|---|---|---|---|---|
| 1 | substance_identifier | CWE | Optional | No | HL70451 |
| 2 | substance_status | CWE | Optional | Yes | HL70383 |
| 3 | substance_type | CWE | Optional | No | HL70384 |
| 4 | inventory_container_identifier | CWE | Optional | No | HL70599 |
| 5 | container_carrier_identifier | CWE | Optional | No | HL70600 |
| 6 | position_on_carrier | CWE | Optional | No | HL70601 |
| 7 | initial_quantity | NM | Optional | No | - |
| 8 | current_quantity | NM | Optional | No | - |
| 9 | available_quantity | NM | Optional | No | - |
| 10 | consumption_quantity | NM | Optional | No | - |
| 11 | quantity_units | CWE | Optional | No | HL70602 |
| 12 | expiration_date_time | DTM | Optional | No | - |
| 13 | first_used_date_time | DTM | Optional | No | - |
| 15 | test_fluid_identifiers | CWE | Optional | Yes | HL70603 |
| 16 | manufacturer_lot_number | ST | Optional | No | - |
| 17 | manufacturer_identifier | CWE | Optional | No | HL70385 |
| 18 | supplier_identifier | CWE | Optional | No | HL70386 |
| 19 | on_board_stability_time | CQ | Optional | No | - |
| 20 | target_value | CQ | Optional | No | - |
| 21 | equipment_state_indicator_type_code | CWE | Optional | No | HL70942 |
| 22 | equipment_state_indicator_value | CQ | Optional | No | - |
Get started with Zato and connect your systems in minutes.