Records clinical observations about an adverse product experience including the event onset, exacerbation, improvement, and end dates, whether the event was serious or expected, and the patient outcome. It appears in product experience report messages (P07/P08) and provides the clinical timeline and severity classification needed for regulatory adverse event reporting.
from zato.hl7v2 import PEO
peo = PEO()
peo.event_onset_date_time = '20260315'
peo.event_serious = 'Y'
peo.patient_outcome = 'R'How to construct and work with real-world PEO segments.
Records a serious event with onset, end date, and patient outcome indicating recovery
from zato.hl7v2.v2_9 import PEO
peo = PEO()
peo.event_onset_date_time = (
'20240315100000'
)
peo.event_ended_data_time = (
'20240320160000'
)
peo.event_serious = 'Y'
peo.event_expected = 'N'
peo.patient_outcome = 'R'Captures an event that worsened before improving, with observer qualification
from zato.hl7v2.v2_9 import PEO
peo = PEO()
peo.event_onset_date_time = (
'20240501080000'
)
peo.event_exacerbation_date_time = (
'20240503120000'
)
peo.event_improved_date_time = (
'20240510'
)
peo.event_serious = 'Y'
peo.patient_outcome = 'R'
peo.primary_observers_qualification = (
'PH'
)Event record with observer aware date, confirmation source, and identity divulgence flag
from zato.hl7v2.v2_9 import PEO
peo = PEO()
peo.event_onset_date_time = '20240701'
peo.event_serious = 'N'
peo.event_expected = 'Y'
peo.patient_outcome = 'SE'
peo.primary_observers_qualification = (
'PH'
)
peo.confirmation_provided_by = 'PH'
peo.primary_observer_aware_date_time = (
'20240702'
)
peo.primary_observers_identity_may_be_divulged = (
'Y'
)Step-by-step guides for working with HL7 v2 in Zato.
PEO records clinical observations about an adverse product experience, including the event timeline (onset, exacerbation, improvement, end), whether the event was serious or expected, and the patient outcome. It is used in product experience report messages for regulatory adverse event reporting.
The event_serious field uses HL7 table 0238 to indicate whether the event was serious:
from zato.hl7v2.v2_9 import PEO
peo = PEO()
# Y = Yes (serious)
peo.event_serious = 'Y'
# N = No (not serious)
peo.event_serious = 'N'The patient_outcome field uses HL7 table 0241 to classify the result:
from zato.hl7v2.v2_9 import PEO
peo = PEO()
# R = Recovered
peo.patient_outcome = 'R'
# SE = Sequelae
peo.patient_outcome = 'SE'
# D = Died
peo.patient_outcome = 'D'Use the DTM-typed date fields to record the full clinical timeline of the event:
from zato.hl7v2.v2_9 import PEO
peo = PEO()
peo.event_onset_date_time = (
'20240501080000'
)
peo.event_exacerbation_date_time = (
'20240503120000'
)
peo.event_improved_date_time = (
'20240510'
)
peo.event_ended_data_time = (
'20240515'
)Use the observer fields to record who observed the event and when:
from zato.hl7v2.v2_9 import PEO
peo = PEO()
peo.primary_observers_qualification = (
'PH'
)
peo.confirmation_provided_by = 'PH'
peo.primary_observer_aware_date_time = (
'20240702'
)
peo.primary_observers_identity_may_be_divulged = (
'Y'
)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 PEO segment, HL7 v2.9.
| # | Python name | Datatype | Usage | Repeatable | Table |
|---|---|---|---|---|---|
| 1 | event_identifiers_used | CWE | Optional | Yes | HL70678 |
| 2 | event_symptom_diagnosis_code | CWE | Optional | Yes | HL70679 |
| 3 | event_onset_date_time | DTM | Required | No | - |
| 4 | event_exacerbation_date_time | DTM | Optional | No | - |
| 5 | event_improved_date_time | DTM | Optional | No | - |
| 6 | event_ended_data_time | DTM | Optional | No | - |
| 7 | event_location_occurred_address | XAD | Optional | Yes | - |
| 8 | event_qualification | ID | Optional | Yes | HL70237 |
| 9 | event_serious | ID | Optional | No | HL70238 |
| 10 | event_expected | ID | Optional | No | HL70239 |
| 11 | event_outcome | ID | Optional | Yes | HL70240 |
| 12 | patient_outcome | ID | Optional | No | HL70241 |
| 13 | event_description_from_others | FT | Optional | Yes | - |
| 14 | event_description_from_original_reporter | FT | Optional | Yes | - |
| 15 | event_description_from_patient | FT | Optional | Yes | - |
| 16 | event_description_from_practitioner | FT | Optional | Yes | - |
| 17 | event_description_from_autopsy | FT | Optional | Yes | - |
| 18 | cause_of_death | CWE | Optional | Yes | HL70680 |
| 19 | primary_observer_name | XPN | Optional | Yes | - |
| 20 | primary_observer_address | XAD | Optional | Yes | - |
| 21 | primary_observer_telephone | XTN | Optional | Yes | - |
| 22 | primary_observers_qualification | ID | Optional | No | HL70242 |
| 23 | confirmation_provided_by | ID | Optional | No | HL70242 |
| 24 | primary_observer_aware_date_time | DTM | Optional | No | - |
| 25 | primary_observers_identity_may_be_divulged | ID | Optional | No | HL70243 |
Get started with Zato and connect your systems in minutes.