Schedule a demo
Conformance and infrastructure

Messaging

This scenario models a smooth handoff of a patient wellness summary from one facility to another using FHIR messaging patterns. The sending system packages the content in a bundle, addresses it with a message header, and follows a message definition that keeps processing predictable for receivers. The clinical tone remains routine: the transfer completes successfully and supports continuity of preventive care.

5resources / instance
5FHIR types
10instances
messaging.py
from zato_fhir.test.r4.v1 import Scenarios, TestData

for transfer in Scenarios.messaging:
    patient = transfer.patient
    for name in patient.name:
        print(name.text)

    definition = transfer.message_definition
    print(definition.eventCoding)

    header = transfer.message_header
    ec = header.eventCoding
    if ec is not None:
        print(ec.code)

    bundle = transfer.bundle
    print(bundle.type_)

    subscription = transfer.subscription
    print(subscription.status)

About this scenario

This scenario models a smooth handoff of a patient wellness summary from one facility to another using FHIR messaging patterns. The sending system packages the content in a bundle, addresses it with a message header, and follows a message definition that keeps processing predictable for receivers. The clinical tone remains routine: the transfer completes successfully and supports continuity of preventive care.

A subscription resource represents monitoring for similar transfers in the future, which is useful for testing notification pipelines and deduplication logic. Together, the resources exercise parsing of envelopes, resolution of definitions, and fan-out rules without introducing error narratives or failed deliveries in the synthetic dataset.

FHIR resources in this scenario

5 resources per instance, 50 total across 10 instances.

FHIR resource typeRole in this scenario
PatientPerson whose wellness record is transferred
MessageDefinitionRules and structure for the transfer message
MessageHeaderRouting and event metadata for the message
BundlePayload carrying the transferred wellness content
SubscriptionChannel that monitors for future transfer events
FHIR resources per instance5
Total resources (10 instances)50
Distinct resource types5
Scenario identifier`Scenarios.messaging`

At a glance

5
FHIR resources per instance
50
Total resources (10 instances)
5
Distinct resource types
Scenarios.messaging
Scenario identifier

Ready to build integrations?

Get started with Zato and connect your systems in minutes.

Open source In Python