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.
HL7 v2 segments, FHIR resources and EDIFACT messages are Python classes with autocompletion and type checking.
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 parsingAll 181 resource types and their datatypes, with autocompletion and type checking in the editor, and JSON out with a single to_json call.
FHIR resourcesto_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 FHIRRequired fields, cardinality, datatypes and terminology bindings are checked against the FHIR specification, and each error points at the exact path.
FHIR validationParse, validate, transform, and exchange clinical messages across HL7 v2, FHIR and EDIFACT, and open them to AI agents over MCP, all in Python.
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 accessAssign 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 interfacesReceive 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 channelsDot-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 expressionsGo from zero to exchanging clinical data with your healthcare partners.
Step-by-step guides for every healthcare integration pattern.
One governed point for both directions of AI traffic - your services calling LLMs and AI agents calling your systems over MCP.
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.
Get started with Zato and connect your healthcare systems in minutes.