Schedule a demo
Segment

Participation information

Identifies the participants involved in an activity or event, such as providers, devices, or organizations. It carries the role of participation, action code, person/provider type, organization unit type, begin and end date/times, and device-related fields including UDI identifier, manufacture and expiry dates, lot and serial numbers, and device type. This segment replaces ROL in HL7v2.9 and appears in clinical and administrative messages.

24fields
2required
v2.9HL7 version
prt.py
from zato.hl7v2 import PRT

prt = PRT()
prt.action_code = 'AD'
prt.role_of_participation = 'PP'
prt.device_type = 'INF'

Build PRT segments in Python

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

1

Provider participation

Records a primary provider participation with role, action code, and date range

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

prt = PRT()
prt.participation_instance_id = EI(
    entity_identifier='PRT-001',
    namespace_id='MAIN'
)
prt.action_code = 'AD'
prt.role_of_participation = CWE(
    identifier='PP',
    text='Primary provider',
    name_of_coding_system='HL70912'
)
prt.begin_date_time_arrival_time = (
    '20240601080000'
)
prt.end_date_time_departure_time = (
    '20240601170000'
)
2

Device tracking

Records a medical device participation with UDI, lot number, serial number, and type

from zato.hl7v2.v2_9 import PRT
from zato.hl7v2.v2_9 import CWE, CNE, EI

prt = PRT()
prt.action_code = 'AD'
prt.role_of_participation = CWE(
    identifier='DEV',
    text='Device',
    name_of_coding_system='HL70912'
)
prt.udi_device_identifier = EI(
    entity_identifier='UDI-12345',
    namespace_id='FDA'
)
prt.device_manufacture_date = (
    '20230101'
)
prt.device_expiry_date = '20260101'
prt.device_lot_number = 'LOT-A001'
prt.device_serial_number = 'SN-99887766'
prt.device_type = CNE(
    identifier='INF',
    text='Infusion pump',
    name_of_coding_system='HL70961'
)
3

Consulting provider

Records a consulting provider with organization type and preferred contact method

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

prt = PRT()
prt.participation_instance_id = EI(
    entity_identifier='PRT-003',
    namespace_id='MAIN'
)
prt.action_code = 'AD'
prt.role_of_participation = CWE(
    identifier='CP',
    text='Consulting provider',
    name_of_coding_system='HL70912'
)
prt.person_provider_type = CWE(
    identifier='MD',
    text='Physician',
    name_of_coding_system='HL70406'
)
prt.organization_unit_type = CWE(
    identifier='DEPT',
    text='Department',
    name_of_coding_system='HL70406'
)
prt.begin_date_time_arrival_time = (
    '20240801'
)
prt.preferred_method_of_contact = CWE(
    identifier='TEL',
    text='Telephone',
    name_of_coding_system='HL70185'
)

Learn by building

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

Frequently asked questions

PRT identifies participants in clinical and administrative activities. It carries the participation role, action code, provider/device type, date range, and device-specific fields like UDI, lot number, and serial number. It replaces the ROL segment in HL7v2.9.

The role_of_participation field uses CWE with HL7 table 0912:

from zato.hl7v2.v2_9 import PRT, CWE

prt = PRT()
prt.role_of_participation = CWE(
    identifier='PP',
    text='Primary provider',
    name_of_coding_system='HL70912'
)

Use the device fields for UDI, lot, serial, and type:

from zato.hl7v2.v2_9 import PRT, EI, CNE

prt = PRT()
prt.udi_device_identifier = EI(
    entity_identifier='UDI-12345',
    namespace_id='FDA'
)
prt.device_lot_number = 'LOT-A001'
prt.device_serial_number = 'SN-99887766'
prt.device_type = CNE(
    identifier='INF',
    text='Infusion pump',
    name_of_coding_system='HL70961'
)

Use the begin and end date/time fields:

from zato.hl7v2.v2_9 import PRT

prt = PRT()
prt.begin_date_time_arrival_time = (
    '20240601080000'
)
prt.end_date_time_departure_time = (
    '20240601170000'
)

The preferred_method_of_contact field uses CWE with HL7 table 0185:

from zato.hl7v2.v2_9 import PRT, CWE

prt = PRT()
prt.preferred_method_of_contact = CWE(
    identifier='TEL',
    text='Telephone',
    name_of_coding_system='HL70185'
)

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.

PRT field reference

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

#Python nameDatatypeUsageRepeatableTable
1participation_instance_idEIOptionalNo-
2action_codeIDRequiredNo-
3action_reasonCWEOptionalNo-
4role_of_participationCWERequiredNoHL70912
5personXCNOptionalYes-
6person_provider_typeCWEOptionalNo-
7organization_unit_typeCWEOptionalNoHL70406
8organizationXONOptionalYes-
9locationPLOptionalYes-
10deviceEIOptionalYes-
11begin_date_time_arrival_timeDTMOptionalNo-
12end_date_time_departure_timeDTMOptionalNo-
13qualitative_durationCWEOptionalNo-
14addressXADOptionalYes-
15telecommunication_addressXTNOptionalYes-
16udi_device_identifierEIOptionalNo-
17device_manufacture_dateDTMOptionalNo-
18device_expiry_dateDTMOptionalNo-
19device_lot_numberSTOptionalNo-
20device_serial_numberSTOptionalNo-
21device_donation_identificationEIOptionalNo-
22device_typeCNEOptionalNoHL70961
23preferred_method_of_contactCWEOptionalNoHL70185
24contact_identifiersPLNOptionalYesHL70338

Ready to build integrations?

Get started with Zato and connect your systems in minutes.

Open source In Python