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.
from zato.hl7v2 import PRT
prt = PRT()
prt.action_code = 'AD'
prt.role_of_participation = 'PP'
prt.device_type = 'INF'How to construct and work with real-world PRT segments.
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'
)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'
)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'
)Step-by-step guides for working with HL7 v2 in Zato.
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.
Complete list of fields in the PRT segment, HL7 v2.9.
| # | Python name | Datatype | Usage | Repeatable | Table |
|---|---|---|---|---|---|
| 1 | participation_instance_id | EI | Optional | No | - |
| 2 | action_code | ID | Required | No | - |
| 3 | action_reason | CWE | Optional | No | - |
| 4 | role_of_participation | CWE | Required | No | HL70912 |
| 5 | person | XCN | Optional | Yes | - |
| 6 | person_provider_type | CWE | Optional | No | - |
| 7 | organization_unit_type | CWE | Optional | No | HL70406 |
| 8 | organization | XON | Optional | Yes | - |
| 9 | location | PL | Optional | Yes | - |
| 10 | device | EI | Optional | Yes | - |
| 11 | begin_date_time_arrival_time | DTM | Optional | No | - |
| 12 | end_date_time_departure_time | DTM | Optional | No | - |
| 13 | qualitative_duration | CWE | Optional | No | - |
| 14 | address | XAD | Optional | Yes | - |
| 15 | telecommunication_address | XTN | Optional | Yes | - |
| 16 | udi_device_identifier | EI | Optional | No | - |
| 17 | device_manufacture_date | DTM | Optional | No | - |
| 18 | device_expiry_date | DTM | Optional | No | - |
| 19 | device_lot_number | ST | Optional | No | - |
| 20 | device_serial_number | ST | Optional | No | - |
| 21 | device_donation_identification | EI | Optional | No | - |
| 22 | device_type | CNE | Optional | No | HL70961 |
| 23 | preferred_method_of_contact | CWE | Optional | No | HL70185 |
| 24 | contact_identifiers | PLN | Optional | Yes | HL70338 |
Get started with Zato and connect your systems in minutes.