Open source. Self-hosted. Python.

Healthcare interoperability
in Python

The open-source integration platform for HL7 v2, FHIR and EDIFACT. Connect EHRs, labs and payers, and put AI agents to work on clinical data, securely, in Python.

181
FHIR resources
v2.9
HL7 support
MCP
AI agents call your services
healthcare.py
Trusted by healthcare organizations worldwide

Every standard as native Python

HL7 v2 segments, FHIR resources and EDIFACT messages are Python classes with autocompletion and type checking.

Parse any HL7 v2 message

ADT, ORU, ORM and every other message type become typed Python objects. Read fields by name and serialize the message back to ER7 in one call.

Message parsing
hl7v2_parsing.py

Build FHIR resources as Python classes

All 181 resource types and their datatypes, with autocompletion and type checking in the editor, and JSON out with a single to_json call.

FHIR resources
fhir_resources.py

HL7 v2 to FHIR in one call

to_fhir maps a whole message to a FHIR transaction bundle with Patient, Encounter, Practitioner and Observations included. The standard translation tables are built in.

HL7 v2 to FHIR
adt_to_fhir.py

Validate before anything leaves the platform

Required fields, cardinality, datatypes and terminology bindings are checked against the FHIR specification, and each error points at the exact path.

FHIR validation
validation.py

See it in action

Everything you need for healthcare data

Parse, validate, transform, and exchange clinical messages across HL7 v2, FHIR and EDIFACT, and open them to AI agents over MCP, all in Python.

Fields by name

patient_name for PID.5, patient_identifier_list for PID.3. Every segment and field of the HL7 v2 specification is addressable by its name, and positional paths such as PID.5.1 work as well.

Field access
field_access.py

MCP gateway for AI agents

Assign a service to an MCP gateway and AI agents call it as a tool. The docstring becomes the tool description, input and output become its schema, and the gateway adds authentication, rate limits, response controls and a payload-free audit log.

AI agents and clinical interfaces
message_status.py

MLLP channels with automatic acknowledgments

Receive and send HL7 v2 over MLLP. The channel handles framing, parsing and ACKs, so the service starts with a typed message and only contains the integration logic.

MLLP channels
lab_results.py

Reach any value with a path

Dot-separated paths mix positions and names freely, select repetitions and subcomponents, and work for reading and writing, the form to use when the field to read arrives as configuration.

Path expressions
path_expressions.py

Three steps to production

Go from zero to exchanging clinical data with your healthcare partners.

01
1
Configure your channels
Set up MLLP channels for HL7 v2 or REST endpoints for FHIR. Zato handles the protocol layer so you focus on business logic.
02
2
Write your integration
Parse incoming messages, access fields by name, validate against specs, and transform between formats, all in standard Python.
03
3
Connect clinical systems
Send and receive data from EHRs, lab systems, pharmacies, and any healthcare application that speaks HL7 v2, FHIR or EDIFACT.

Learn by building

Step-by-step guides for every healthcare integration pattern.

Clinical data, ready for AI

One governed point for both directions of AI traffic - your services calling LLMs and AI agents calling your systems over MCP.

Frequently asked questions

Zato supports HL7 v2.9, which is backward compatible with earlier versions. All standard segments, datatypes, and message structures are available as typed Python classes.

Any version. A FHIR connection points at an R4, R5 or R6 server and services invoke it the same way. See FHIR versions.

Use HL7Message.parse(raw_message) to parse ER7 format. Access segments like msg.pid and fields like msg.pid.patient_name.

Use semantic names - msg.pid.patient_name for PID.5, and msg.pid.patient_name.family_name for its family name component. Positional paths such as msg.get('PID.5.1') return the same values.

Import the resource class and set attributes - patient = Patient(), then patient.id = "123". Use patient.to_json() to serialize.

Use Patient.from_json(json_string) or Patient.from_dict(data) to create typed resource instances from JSON.

Yes - use validate(resource) to check required fields, cardinality, and types. Use validate_valueset_binding(resource) for terminology validation.

Use get_extension(resource, url) and set_extension(resource, url, value). Nested extensions are supported with get_nested_extension().

Yes - use HL7Batch and HL7File classes to parse and create batch wrappers with BHS/BTS and FHS/FTS segments.

Yes - parse_edifact handles interchanges, envelopes, and dialects with the same typed access model as HL7 v2. See the EDIFACT overview for code examples.

Yes - AI agents call selected clinical services through authenticated MCP gateways, with configurable response controls, rate limits, and payload-free auditing, so the audit log contains no PHI. See the AI agents and clinical interfaces guide.

Yes - services call Claude, OpenAI, Gemini or self-hosted models through LLM connections in the AI gateway, with provider keys, audit and access control managed centrally.

Ready to build healthcare integrations?

Get started with Zato and connect your healthcare systems in minutes.

Open Source In Python All of FHIR, HL7 v2 and EDIFACT