Schedule a demo
Segment

Risk management incident

Carries incident reporting data for risk management and patient safety systems, including the incident code, the date and time the incident occurred, and a classification of the incident type. It appears in patient administration and event reporting messages to document adverse events, near-misses, and other reportable occurrences for quality assurance and regulatory compliance.

3fields
0required
v2.9HL7 version
rmi.py
from zato.hl7v2 import RMI

rmi = RMI()
rmi.date_time_incident = '20260315100000'
rmi.incident_type_code = 'MED'

Build RMI segments in Python

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

1

Medication incident

Medication error incident reported with date, incident code, and type classification

from zato.hl7v2.v2_9 import RMI
from zato.hl7v2.v2_9 import CWE

rmi = RMI()
rmi.risk_management_incident_code = CWE(
    identifier='MEDERR',
    text='Medication error',
    name_of_coding_system='HL70427'
)
rmi.date_time_incident = '20240315100000'
rmi.incident_type_code = CWE(
    identifier='MED',
    text='Medication',
    name_of_coding_system='HL70428'
)
2

Fall incident

Patient fall reported with the incident code and classification for safety tracking

from zato.hl7v2.v2_9 import RMI
from zato.hl7v2.v2_9 import CWE

rmi = RMI()
rmi.risk_management_incident_code = CWE(
    identifier='FALL',
    text='Patient fall',
    name_of_coding_system='HL70427'
)
rmi.date_time_incident = '20240610143000'
rmi.incident_type_code = CWE(
    identifier='SAF',
    text='Safety',
    name_of_coding_system='HL70428'
)
3

Equipment malfunction

Biomedical equipment malfunction reported for risk management review

from zato.hl7v2.v2_9 import RMI
from zato.hl7v2.v2_9 import CWE

rmi = RMI()
rmi.risk_management_incident_code = CWE(
    identifier='EQUIP',
    text='Equipment failure',
    name_of_coding_system='HL70427'
)
rmi.date_time_incident = '20240820090000'
rmi.incident_type_code = CWE(
    identifier='INF',
    text='Infrastructure',
    name_of_coding_system='HL70428'
)

Learn by building

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

Frequently asked questions

RMI reports risk management incidents such as medication errors, patient falls, equipment malfunctions, and other adverse events. It carries an incident code, timestamp, and classification type for quality assurance and regulatory reporting.

The risk_management_incident_code field uses the CWE datatype with HL7 table 0427:

from zato.hl7v2.v2_9 import RMI, CWE

rmi = RMI()
rmi.risk_management_incident_code = CWE(
    identifier='MEDERR',
    text='Medication error',
    name_of_coding_system='HL70427'
)

The incident_type_code field uses the CWE datatype with HL7 table 0428:

from zato.hl7v2.v2_9 import RMI, CWE

rmi = RMI()
rmi.incident_type_code = CWE(
    identifier='MED',
    text='Medication',
    name_of_coding_system='HL70428'
)

Yes, all three fields in RMI are optional. However, in practice at least the incident code and date/time are typically populated:

from zato.hl7v2.v2_9 import RMI, CWE

rmi = RMI()
rmi.risk_management_incident_code = CWE(
    identifier='FALL',
    text='Patient fall',
    name_of_coding_system='HL70427'
)
rmi.date_time_incident = '20240610'

Populate all three fields for a complete incident record:

from zato.hl7v2.v2_9 import RMI, CWE

rmi = RMI()
rmi.risk_management_incident_code = CWE(
    identifier='EQUIP',
    text='Equipment failure',
    name_of_coding_system='HL70427'
)
rmi.date_time_incident = (
    '20240820090000'
)
rmi.incident_type_code = CWE(
    identifier='INF',
    text='Infrastructure',
    name_of_coding_system='HL70428'
)

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.

RMI field reference

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

#Python nameDatatypeUsageRepeatableTable
1risk_management_incident_codeCWEOptionalNoHL70427
2date_time_incidentDTMOptionalNo-
3incident_type_codeCWEOptionalNoHL70428

Ready to build integrations?

Get started with Zato and connect your systems in minutes.

Open source In Python