Sends a remote-control instruction to a laboratory instrument or automated device, carrying a sequential command number, the coded command to execute, and whether a response is required. It is used in equipment-management and automation messages to start, stop, calibrate, or clear instruments from a central laboratory information system.
from zato.hl7v2 import ECD
ecd = ECD()
ecd.reference_command_number = '1'
ecd.remote_control_command = 'CL'How to construct and work with real-world ECD segments.
Sending a clear command to an analyzer requiring acknowledgment
from zato.hl7v2.v2_9 import ECD
from zato.hl7v2.v2_9 import CWE
ecd = ECD()
ecd.reference_command_number = '1'
ecd.remote_control_command = CWE(
identifier='CL',
text='Clear',
name_of_coding_system=
'HL70368'
)
ecd.response_required = 'Y'Issuing an initialize command to prepare equipment for a run
from zato.hl7v2.v2_9 import ECD
from zato.hl7v2.v2_9 import CWE
ecd = ECD()
ecd.reference_command_number = '2'
ecd.remote_control_command = CWE(
identifier='IN',
text='Initialize',
name_of_coding_system=
'HL70368'
)
ecd.response_required = 'Y'Sending an emergency stop without requiring a response
from zato.hl7v2.v2_9 import ECD
from zato.hl7v2.v2_9 import CWE
ecd = ECD()
ecd.reference_command_number = '3'
ecd.remote_control_command = CWE(
identifier='ES',
text='Emergency stop',
name_of_coding_system=
'HL70368'
)
ecd.response_required = 'N'Step-by-step guides for working with HL7 v2 in Zato.
ECD sends remote-control commands to laboratory instruments and automated devices. Each command has a sequence number, a coded instruction (clear, initialize, stop, etc.), and an optional flag indicating whether the device must respond.
The remote_control_command uses CWE with HL7 table 0368:
from zato.hl7v2.v2_9 import ECD, CWE
ecd = ECD()
ecd.reference_command_number = '1'
ecd.remote_control_command = CWE(
identifier='CL',
text='Clear',
name_of_coding_system=
'HL70368'
)HL7 table 0368 defines equipment commands. Common values include:
from zato.hl7v2.v2_9 import ECD, CWE
ecd = ECD()
ecd.reference_command_number = '1'
# CL = Clear
ecd.remote_control_command = CWE(identifier='CL')
# IN = Initialize
ecd.remote_control_command = CWE(identifier='IN')
# ES = Emergency stop
ecd.remote_control_command = CWE(identifier='ES')Set response_required to Y or N using HL7 table 0136:
from zato.hl7v2.v2_9 import ECD
ecd = ECD()
ecd.reference_command_number = '1'
ecd.remote_control_command = 'CL'
ecd.response_required = 'Y'Access the fields directly after creating the segment:
from zato.hl7v2.v2_9 import ECD
ecd = ECD()
ecd.reference_command_number = '1'
ecd.remote_control_command = 'CL'
cmd_num = ecd.reference_command_number
command = ecd.remote_control_commandZato 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 ECD segment, HL7 v2.9.
| # | Python name | Datatype | Usage | Repeatable | Table |
|---|---|---|---|---|---|
| 1 | reference_command_number | NM | Required | No | - |
| 2 | remote_control_command | CWE | Required | No | HL70368 |
| 3 | response_required | ID | Optional | No | HL70136 |
| 5 | parameters | TX | Optional | Yes | - |
Get started with Zato and connect your systems in minutes.