Documents deviations (variances) from an expected clinical pathway, goal, or problem plan, capturing the variance instance, classification, description, and who identified it. It accompanies GOL, PRB, and PTH segments in patient care messages, allowing clinical repositories and quality improvement systems to track exceptions and outcomes in care plan execution.
from zato.hl7v2.v2_9 import VAR
from zato.hl7v2.v2_9 import EI, DTM, XCN
var = VAR()
var.variance_instance_id = EI(entity_identifier='VAR001')
var.documented_date_time = DTM('20260115')How to construct and work with real-world VAR segments.
Variance from fitness plan
from zato.hl7v2.v2_9 import VAR
from zato.hl7v2.v2_9 import EI, DTM, XCN, CWE
var = VAR()
var.variance_instance_id = EI(entity_identifier='VAR001')
var.documented_date_time = DTM('20240115')
var.stated_variance_date_time = DTM('20240115')
var.variance_originator = XCN(
family_name='Smith',
given_name='John',
prefix='Dr'
)
var.variance_classification = CWE(text='Missed scheduled exercise session')Variance from nutrition plan
from zato.hl7v2.v2_9 import VAR
from zato.hl7v2.v2_9 import EI, DTM, XCN, CWE
var = VAR()
var.variance_instance_id = EI(entity_identifier='VAR002')
var.documented_date_time = DTM('20240116')
var.stated_variance_date_time = DTM('20240116')
var.variance_originator = XCN(
family_name='Chen',
given_name='Lisa',
suffix='RD'
)
var.variance_classification = CWE(text='Exceeded daily calorie target')Variance from preventive care plan
from zato.hl7v2.v2_9 import VAR
from zato.hl7v2.v2_9 import EI, DTM, XCN, CWE
var = VAR()
var.variance_instance_id = EI(entity_identifier='VAR003')
var.documented_date_time = DTM('20240117')
var.stated_variance_date_time = DTM('20240117')
var.variance_originator = XCN(
family_name='Johnson',
given_name='Sarah',
suffix='MD'
)
var.variance_classification = CWE(text='Missed annual wellness screening')Step-by-step guides for working with HL7 v2 in Zato.
VAR contains variance information including variance identifiers, dates, and descriptions for tracking deviations from wellness care plans.
Use variance_originator field with XCN datatype:
var.variance_originator = XCN(
family_name='Smith',
given_name='John',
prefix='Dr'
)PTH defines the care pathway while VAR tracks deviations from that pathway. Variances help identify when wellness plans need adjustment.
Common wellness variances include missed exercise sessions, diet plan deviations, and missed screening appointments.
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 VAR segment, HL7 v2.9.
| # | Python name | Datatype | Usage | Repeatable | Table |
|---|---|---|---|---|---|
| 1 | variance_instance_id | EI | Required | No | - |
| 2 | documented_date_time | DTM | Required | No | - |
| 3 | stated_variance_date_time | DTM | Optional | No | - |
| 4 | variance_originator | XCN | Optional | Yes | - |
| 5 | variance_classification | CWE | Optional | No | - |
| 6 | variance_description | ST | Optional | Yes | - |
Get started with Zato and connect your systems in minutes.