Schedule a demo
Segment

Allergy reaction

Provides granular per-reaction detail for a single allergy occurrence documented in an associated IAM segment, including the specific reaction code, severity, sensitivity to causative agent, and management actions taken. Introduced in v2.8, it repeats under IAM segments in ADT and allergy-update messages. It enables systems like EHRs and pharmacy applications to exchange structured multi-reaction data for a given allergen.

4fields
2required
v2.9HL7 version
iar.py
from zato.hl7v2.v2_9 import IAR
from zato.hl7v2.v2_9 import CWE

iar = IAR()
iar.allergy_reaction_code = CWE(
    identifier='HIVES',
    text='Hives'
)
iar.allergy_severity_code = CWE(
    identifier='MO',
    text='Moderate'
)

Build IAR segments in Python

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

1

Hives reaction

Skin reaction to food allergen

from zato.hl7v2.v2_9 import IAR
from zato.hl7v2.v2_9 import CWE

iar = IAR()
iar.allergy_reaction_code = CWE(
    identifier='HIVES',
    text='Hives'
)
iar.allergy_severity_code = CWE(
    identifier='MO',
    text='Moderate',
    name_of_coding_system='HL70128'
)
iar.sensitivity_to_causative_agent_code = CWE(text='Urticaria on arms and torso')
2

GI distress reaction

Digestive reaction to supplement

from zato.hl7v2.v2_9 import IAR
from zato.hl7v2.v2_9 import CWE

iar = IAR()
iar.allergy_reaction_code = CWE(
    identifier='GI',
    text='GI Distress'
)
iar.allergy_severity_code = CWE(
    identifier='MI',
    text='Mild',
    name_of_coding_system='HL70128'
)
iar.sensitivity_to_causative_agent_code = CWE(text='Nausea and stomach cramps')
3

Respiratory reaction

Breathing difficulty from allergen

from zato.hl7v2.v2_9 import IAR
from zato.hl7v2.v2_9 import CWE

iar = IAR()
iar.allergy_reaction_code = CWE(
    identifier='RESP',
    text='Respiratory'
)
iar.allergy_severity_code = CWE(
    identifier='SV',
    text='Severe',
    name_of_coding_system='HL70128'
)
iar.sensitivity_to_causative_agent_code = CWE(text='Wheezing and shortness of breath')

Learn by building

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

Frequently asked questions

IAR contains allergy reaction information including reaction types, severity, and descriptions for wellness program safety documentation.

Common reaction types include HIVES (skin reaction), GI (gastrointestinal), and RESP (respiratory) reactions.

Use allergy_severity_code field with HL70128 values:

iar.allergy_severity_code = CWE(
    identifier='SV',
    text='Severe',
    name_of_coding_system='HL70128'
)

IAM contains the allergy information while IAR contains specific reaction details. Multiple IAR segments can follow an IAM to describe different reactions.

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.

IAR field reference

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

#Python nameDatatypeUsageRepeatableTable
1allergy_reaction_codeCWERequiredNo-
2allergy_severity_codeCWERequiredNoHL70128
3sensitivity_to_causative_agent_codeCWEOptionalNoHL70436
4managementSTOptionalNo-

Ready to build integrations?

Get started with Zato and connect your systems in minutes.

Open source In Python