Schedule a demo
Segment

Test code configuration

Defines the configuration of a specific test code on a laboratory instrument, mapping a universal test identifier to a device-specific local code and carrying parameters such as calibration and QC settings. It is used in master-file-style configuration messages between LIS and analyzers or automation systems so that both systems agree on how tests are identified and processed on a given instrument.

14fields
2required
v2.9HL7 version
tcc.py
from zato.hl7v2.v2_9 import TCC
from zato.hl7v2.v2_9 import CWE, EI

tcc = TCC()
tcc.universal_service_identifier = CWE(
    identifier='GLU',
    text='Glucose'
)
identifier = EI(entity_identifier='TEST001')
tcc.equipment_test_application_identifier = identifier

Build TCC segments in Python

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

1

Glucose test configuration

Chemistry analyzer test setup

from zato.hl7v2.v2_9 import TCC
from zato.hl7v2.v2_9 import CWE, EI

tcc = TCC()
tcc.universal_service_identifier = CWE(
    identifier='GLU',
    text='Glucose',
    name_of_coding_system='LN'
)
tcc.equipment_test_application_identifier = EI(
    entity_identifier='TEST001',
    namespace_id='CHEM-ANALYZER'
)
tcc.automatic_repeat_allowed = 'Y'
2

CBC test configuration

Hematology analyzer test setup

from zato.hl7v2.v2_9 import TCC
from zato.hl7v2.v2_9 import CWE, EI

tcc = TCC()
tcc.universal_service_identifier = CWE(
    identifier='CBC',
    text='Complete Blood Count',
    name_of_coding_system='LN'
)
tcc.equipment_test_application_identifier = EI(
    entity_identifier='TEST002',
    namespace_id='HEMA-ANALYZER'
)
tcc.automatic_repeat_allowed = 'Y'
3

Lipid panel configuration

Chemistry analyzer lipid test

from zato.hl7v2.v2_9 import TCC
from zato.hl7v2.v2_9 import CWE, EI

tcc = TCC()
tcc.universal_service_identifier = CWE(
    identifier='LIPID',
    text='Lipid Panel',
    name_of_coding_system='LN'
)
tcc.equipment_test_application_identifier = EI(
    entity_identifier='TEST003',
    namespace_id='CHEM-ANALYZER'
)
tcc.automatic_repeat_allowed = 'N'

Learn by building

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

Frequently asked questions

TCC contains test code configuration information including test codes, equipment identifiers, and processing parameters for laboratory automation.

Use universal_service_identifier field with CWE datatype:

tcc.universal_service_identifier = CWE(
    identifier='GLU',
    text='Glucose',
    name_of_coding_system='LN'
)

Automatic repeat allows the analyzer to automatically rerun a test if results are outside expected ranges. Set automatic_repeat_allowed to Y or N.

TCC contains test configuration while EQU contains equipment status. TCC defines how tests run on specific equipment.

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.

TCC field reference

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

#Python nameDatatypeUsageRepeatableTable
1universal_service_identifierCWERequiredNo-
2equipment_test_application_identifierEIRequiredNo-
4auto_dilution_factor_defaultSNOptionalNo-
5rerun_dilution_factor_defaultSNOptionalNo-
6pre_dilution_factor_defaultSNOptionalNo-
7endogenous_content_of_pre_dilution_diluentSNOptionalNo-
8inventory_limits_warning_levelNMOptionalNo-
9automatic_rerun_allowedIDOptionalNoHL70136
10automatic_repeat_allowedIDOptionalNoHL70136
11automatic_reflex_allowedIDOptionalNoHL70136
12equipment_dynamic_rangeSNOptionalNo-
13unitsCWEOptionalNoHL70623
14processing_typeCWEOptionalNoHL70388
15test_criticalityCWEOptionalNo-

Ready to build integrations?

Get started with Zato and connect your systems in minutes.

Open source In Python