Schedule a demo
Segment

Contact data

Identifies contact personnel associated with a provider in a referral transaction, such as an office manager, billing contact, or care coordinator at the referring or referred-to provider's organization. It is always paired with a preceding PRD segment in REF and RRI messages, carrying the contact role, name, address, and identifiers. It enables the receiving organization to reach the appropriate administrative personnel to coordinate the referral.

7fields
1required
v2.9HL7 version
ctd.py
from zato.hl7v2.v2_9 import CTD
from zato.hl7v2.v2_9 import CWE, XPN, XTN

ctd = CTD()
ctd.contact_role = CWE(
    identifier='IC',
    text='Insurance Company',
    name_of_coding_system='HL70131'
)
ctd.contact_name = XPN(
    family_name='Smith',
    given_name='Jane'
)

Build CTD segments in Python

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

1

Referral coordinator contact

Identifies a referral coordinator with role, name, and phone number

from zato.hl7v2.v2_9 import CTD
from zato.hl7v2.v2_9 import CWE, XPN, XTN

ctd = CTD()
ctd.contact_role = CWE(
    identifier='RC',
    text='Referral Coordinator',
    name_of_coding_system='HL70131'
)
ctd.contact_name = XPN(
    family_name='Martinez',
    given_name='Laura'
)
ctd.contact_communication_information = XTN(
    telecommunication_use_code='PRN',
    telecommunication_equipment_type='PH',
    telephone_number='5552013456'
)
2

Lab liaison with address and location

Provides contact details for a lab liaison including office address and facility location

from zato.hl7v2.v2_9 import CTD
from zato.hl7v2.v2_9 import CWE, PL, XAD, XPN

ctd = CTD()
ctd.contact_role = CWE(
    identifier='LL',
    text='Lab Liaison',
    name_of_coding_system='HL70131'
)
ctd.contact_name = XPN(
    family_name='Chen',
    given_name='William'
)
ctd.contact_address = XAD(
    street_address='200 Wellness Blvd',
    city='Portland',
    state_or_province='OR'
)
ctd.contact_location = PL(
    point_of_care='LAB-3',
    room='Room 110'
)
3

Scheduling coordinator with preferred contact method

Sets up a scheduling coordinator with email preference and professional identifier

from zato.hl7v2.v2_9 import CTD
from zato.hl7v2.v2_9 import CWE, PLN, XPN, XTN

ctd = CTD()
ctd.contact_role = CWE(
    identifier='SC',
    text='Scheduling Coordinator',
    name_of_coding_system='HL70131'
)
ctd.contact_name = XPN(
    family_name='Adebayo',
    given_name='Nkechi'
)
ctd.contact_communication_information = XTN(
    telecommunication_use_code='NET',
    telecommunication_equipment_type='Internet',
    telephone_number='scheduling@wellnessclinic.org'
)
ctd.preferred_method_of_contact = CWE(
    identifier='EMAIL',
    text='Email',
    name_of_coding_system='HL70185'
)
ctd.contact_identifiers = PLN(
    id_number='COORD-4421',
    type_of_id_number='UPIN'
)

Learn by building

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

Frequently asked questions

CTD contains contact data including name, role, address, and communication details. It identifies program coordinators and referral contacts for wellness services.

Use HL70131 table values for contact roles like EC, IC, or EP:

ctd.contact_role = CWE(
    identifier='IC',
    text='Insurance Company',
    name_of_coding_system='HL70131'
)

PRD identifies healthcare providers with clinical roles while CTD identifies administrative contacts. CTD is used for coordinators, insurance contacts, and other non-clinical personnel.

Yes, contact_communication_information is repeatable. You can include phone, fax, email, and other communication methods for wellness contacts.

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.

CTD field reference

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

#Python nameDatatypeUsageRepeatableTable
1contact_roleCWERequiredYesHL70131
2contact_nameXPNOptionalYes-
3contact_addressXADOptionalYes-
4contact_locationPLOptionalNo-
5contact_communication_informationXTNOptionalYes-
6preferred_method_of_contactCWEOptionalNoHL70185
7contact_identifiersPLNOptionalYesHL70338

Ready to build integrations?

Get started with Zato and connect your systems in minutes.

Open source In Python