Provides instrument-specific and test-specific processing parameters for a particular test, including auto-dilution factor, rerun dilution factor, analyte repeat status (original, rerun, or reflex), and whether automatic repeat or reflex testing should be initiated. It is used in laboratory automation and instrument interfacing messages to communicate test-level processing details between analyzers, laboratory automation systems, and LIS.
from zato.hl7v2.v2_9 import TCD
from zato.hl7v2.v2_9 import CWE
tcd = TCD()
tcd.universal_service_identifier = CWE(identifier='24325-3')How to construct and work with real-world TCD segments.
General health panel with automatic repeat and specimen volume
from zato.hl7v2.v2_9 import TCD
from zato.hl7v2.v2_9 import CQ, CWE, SN
tcd = TCD()
tcd.universal_service_identifier = CWE(
identifier='24325-3',
text='General health panel',
name_of_coding_system='LN',
)
tcd.auto_dilution_factor = SN(
sn_2='1',
sn_3=':',
sn_4='10',
)
tcd.rerun_dilution_factor = SN(
sn_2='1',
sn_3=':',
sn_4='5',
)
tcd.pre_dilution_factor = SN(
sn_2='1',
sn_3=':',
sn_4='2',
)
tcd.endogenous_content_of_pre_dilution_diluent = SN(
sn_2='0',
sn_3=':',
sn_4='1',
)
tcd.automatic_repeat_allowed = 'Y'
tcd.reflex_allowed = 'Y'
tcd.analyte_repeat_status = CWE(
identifier='OK',
text='Ready',
)
tcd.specimen_consumption_quantity = CQ(
quantity='250',
units=CWE(
identifier='uL',
name_of_coding_system='UCUM',
),
)
tcd.pool_size = '1'
tcd.auto_dilution_type = CWE(
identifier='AUTO',
text='Instrument',
)Trace-element panel with conservative dilution and reflex disabled
from zato.hl7v2.v2_9 import TCD
from zato.hl7v2.v2_9 import CQ, CWE, SN
tcd = TCD()
tcd.universal_service_identifier = CWE(
identifier='57634-3',
text='Trace minerals screening',
name_of_coding_system='LN',
)
tcd.auto_dilution_factor = SN(
sn_2='1',
sn_3=':',
sn_4='4',
)
tcd.reflex_allowed = 'N'
tcd.analyte_repeat_status = CWE(
identifier='HOLD',
text='Hold',
)
tcd.specimen_consumption_quantity = CQ(
quantity='120',
units=CWE(
identifier='uL',
name_of_coding_system='UCUM',
),
)
tcd.pool_size = '2'
tcd.auto_dilution_type = CWE(
identifier='MAN',
text='Manual',
)Performance screening test with pool size and dilution ladder
from zato.hl7v2.v2_9 import TCD
from zato.hl7v2.v2_9 import CQ, CWE, SN
tcd = TCD()
tcd.universal_service_identifier = CWE(
identifier='62253-4',
text='Muscle enzyme profile',
name_of_coding_system='LN',
)
tcd.auto_dilution_factor = SN(
sn_2='1',
sn_3=':',
sn_4='8',
)
tcd.rerun_dilution_factor = SN(
sn_2='1',
sn_3=':',
sn_4='8',
)
tcd.pre_dilution_factor = SN(
sn_2='1',
sn_3=':',
sn_4='3',
)
tcd.endogenous_content_of_pre_dilution_diluent = SN(
sn_2='0',
sn_3=':',
sn_4='1',
)
tcd.automatic_repeat_allowed = 'N'
tcd.reflex_allowed = 'Y'
tcd.analyte_repeat_status = CWE(
identifier='RUN',
text='Running',
)
tcd.specimen_consumption_quantity = CQ(
quantity='75',
units=CWE(
identifier='uL',
name_of_coding_system='UCUM',
),
)
tcd.pool_size = '4'
tcd.auto_dilution_type = CWE(
identifier='MIX',
text='Mixed mode',
)Step-by-step guides for working with HL7 v2 in Zato.
Structured numeric (SN) carries a comparator and two numbers separated by a delimiter, often a colon for ratios. Your analyzer driver should emit the same pattern the instrument firmware expects for wellness and screening assays.
from zato.hl7v2.v2_9 import SN
ratio = SN(
sn_2='1',
sn_3=':',
sn_4='10',
)Use the TCD segment on the parsed HL7 object:
from zato.hl7v2.v2_9 import TCD, CWE
tcd = TCD()
tcd.universal_service_identifier = CWE(
identifier='24325-3',
text='Cholesterol',
)
tcd.pool_size = '5'Fields 6 and 7 use table HL70136 style yes or no values to indicate whether the analyzer may repeat a measurement or launch a follow-up test without a new order. Wellness sites often keep these conservative to avoid extra volume use.
Field 9 is a CQ pairing an amount with UCUM units for aspirated volume:
from zato.hl7v2.v2_9 import TCD
from zato.hl7v2.v2_9 import CQ, CWE
tcd = TCD()
tcd.specimen_consumption_quantity = CQ(
quantity='250',
units=CWE(
identifier='uL',
name_of_coding_system='UCUM',
),
)Pool size greater than one appears when the analyzer combines multiple specimen aspirates for a batch wellness run. Keep OBR and OBX context aligned so reporting software can explain pooled versus single-participant results.
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 TCD segment, HL7 v2.9.
| # | Python name | Datatype | Usage | Repeatable | Table |
|---|---|---|---|---|---|
| 1 | universal_service_identifier | CWE | Required | No | - |
| 2 | auto_dilution_factor | SN | Optional | No | - |
| 3 | rerun_dilution_factor | SN | Optional | No | - |
| 4 | pre_dilution_factor | SN | Optional | No | - |
| 5 | endogenous_content_of_pre_dilution_diluent | SN | Optional | No | - |
| 6 | automatic_repeat_allowed | ID | Optional | No | HL70136 |
| 7 | reflex_allowed | ID | Optional | No | HL70136 |
| 8 | analyte_repeat_status | CWE | Optional | No | HL70389 |
| 9 | specimen_consumption_quantity | CQ | Optional | No | - |
| 10 | pool_size | NM | Optional | No | - |
| 11 | auto_dilution_type | CWE | Optional | No | HL70945 |
Get started with Zato and connect your systems in minutes.