# Healthcare interface engine

Move ADT feeds, orders and other clinical messages between medical, business and IT systems.

## Get started

Route your first HL7 feed end to end - destinations picked in the Dashboard, with no code, or a routing service of your own, in under five minutes.

[HL7 v2 tutorial](https://zato.io/tutorials/healthcare/hl7v2.html)

```yaml
name: ADT feed
actors:
  - id: sender
    label: Sending application
  - id: channel
    label: MLLP channel
  - id: service
    label: Your service
  - id: downstream
    label: Receiving system
steps:
  - from: sender
    to: channel
    label: An ADT admission arrives
    align: left
    items:
      - MLLP or REST transport
      - Duplicates are detected on MSH-10
  - from: channel
    to: service
    label: The message is a typed Python object
  - from: service
    to: downstream
    label: The service forwards the event
  - from: downstream
    to: service
    kind: return
    label: The receiving system confirms
  - from: service
    to: channel
    kind: return
    label: The service finishes
  - from: channel
    to: sender
    kind: return
    label: The sender receives the ACK
    align: left
    items:
      - AA means accepted
      - AE means application error
      - AR means rejected
```

```yaml
name: AI agents and MCP
actors:
  - id: agent
    label: AI agent
  - id: gateway
    label: MCP gateway
  - id: service
    label: Your services
steps:
  - from: agent
    to: gateway
    label: The agent calls your services as tools
    align: left
    items:
      - Claude Code, Cursor or any MCP client
      - Each client authenticates with its own credential
  - from: gateway
    to: service
    label: The gateway invokes the service
    items:
      - Input is validated against the tool's schema
      - Rate limits apply per credential
  - from: service
    to: gateway
    kind: return
    label: The service returns its response
  - from: gateway
    to: agent
    kind: return
    label: The agent receives the result
    align: left
    items:
      - PII removal and response controls run before delivery
      - The audit log records callers, outcomes and sizes
```

```yaml
name: AI and LLM calls
actors:
  - id: channel
    label: Clinical system
  - id: service
    label: Your service
  - id: model
    label: Model, hosted or self-hosted
steps:
  - from: channel
    to: service
    label: A clinical event arrives
    align: left
    items:
      - HL7 v2, FHIR, REST or files
  - from: service
    to: model
    label: The service sends only the data you select
    items:
      - Hosted providers or endpoints in your own network
      - You decide where PHI may go
  - from: model
    to: service
    kind: return
    label: The model returns its answer
  - from: service
    to: channel
    kind: return
    label: Every call is recorded
    items:
      - Outcome, duration and token usage
      - Spending limits cap the cost
```

```yaml
name: HL7 v2 to FHIR
actors:
  - id: message
    label: HL7 v2 message
  - id: service
    label: Your service
  - id: fhir
    label: FHIR server
steps:
  - from: message
    to: service
    label: msg.to_fhir() builds a bundle
    align: left
    items:
      - PID becomes Patient
      - PV1 becomes Encounter
      - OBX becomes Observation
  - from: service
    to: fhir
    label: The bundle is posted as a transaction
  - from: fhir
    to: service
    kind: return
    label: The server confirms every entry
```

## Move clinical messages

[Receive ADT, orders and results HL7 v2 messages arrive over MLLP or REST and reach your services as typed Python objects.](https://zato.io/docs/dev/healthcare/hl7v2/mllp/index.html) [Route by sender and message type Channels select on sending application, facility, message type and trigger event, with default channels for unmatched messages.](https://zato.io/docs/dev/healthcare/hl7v2/mllp/config.html#match-criteria) [Send and get acknowledged Send HL7 v2 over MLLP with TLS, acknowledgment timeouts and retry advice on every result.](https://zato.io/docs/dev/healthcare/hl7v2/mllp/outgoing.html) [Acknowledgments AA, AE and AR in one lookup - what each code means and what the ERR segment contains.](https://zato.io/docs/dev/healthcare/hl7v2/mllp/acknowledgments.html) [Handle non-compliant senders Every repair the platform applies to malformed messages, when it fires and how to see that it fired.](https://zato.io/docs/dev/healthcare/hl7v2/mllp/config.html#tolerance-and-message-fixups) [Go-live runbook Take an interface live - parallel run, message-count reconciliation and a tested rollback path.](https://zato.io/docs/dev/healthcare/go-live.html)

## AI and MCP

[AI in clinical interfaces Agents calling your services and your services calling models, in one governed layer.](https://zato.io/docs/dev/healthcare/ai/index.html) [Expose services as MCP Let AI applications use existing Zato services under the access controls you define.](https://zato.io/docs/dev/healthcare/ai/agents.html) [Calling LLMs from services Invoke a model from a clinical service in one line of Python.](https://zato.io/docs/dev/healthcare/ai/llm.html)

## Work with HL7 v2 in Python

[HL7 v2 in Python Everything for HL7 v2 messages in Python code - parsing, typed access, validation and serialization.](https://zato.io/docs/dev/healthcare/hl7/v2/index.html) [Parsing and serialization Parse any HL7 v2 message and serialize it back to ER7, dicts or JSON.](https://zato.io/docs/dev/healthcare/hl7/v2/parsing/index.html) [Field access Read and write any field by name, wire position or path string such as PID.5.1.](https://zato.io/docs/dev/healthcare/hl7/v2/field-access/index.html) [Validation Check required fields and datatypes, with every problem reported at once.](https://zato.io/docs/dev/healthcare/hl7/v2/validation/index.html)

## FHIR

[FHIR connections Connect to FHIR servers as a client and work with clinical data through self.fhir in services.](https://zato.io/docs/dev/healthcare/hl7/fhir/index.html) [Resources Read, create and update typed FHIR R4 resources such as Patient and Observation.](https://zato.io/docs/dev/healthcare/hl7/fhir/resources/index.html) [Searches and bundles Search FHIR servers with pagination and post transaction bundles in one call.](https://zato.io/docs/dev/healthcare/hl7/fhir/bundles/index.html) [Security and SMART on FHIR Basic Auth, OAuth, SMART on FHIR Backend Services and mutual TLS, per connection.](https://zato.io/docs/dev/healthcare/hl7/fhir/security/index.html)

## Convert HL7 v2 to FHIR

[One-call conversion msg.to\_fhir() converts ADT, ORU, ORM and other messages to FHIR R4 transaction bundles.](https://zato.io/docs/dev/healthcare/hl7/to-fhir/index.html) [Per-segment mappings What each segment becomes - PID to Patient, PV1 to Encounter, OBX to Observation, and more.](https://zato.io/docs/dev/healthcare/hl7/to-fhir/resources/index.html) [Code mappings and warnings Customize code maps and identifier systems - conversion warnings are reported, nothing is dropped silently.](https://zato.io/docs/dev/healthcare/hl7/to-fhir/codes/index.html) [Z-segments Custom Z-segments are preserved as FHIR resources instead of disappearing in conversion.](https://zato.io/docs/dev/healthcare/hl7/to-fhir/z-segments/index.html) [Sending bundles Post converted bundles to FHIR servers through outgoing connections.](https://zato.io/docs/dev/healthcare/hl7/to-fhir/sending/index.html)

## Convert C-CDA documents to FHIR

[C-CDA to FHIR self.ccda.to\_fhir() builds FHIR R4 bundles from CCDs, discharge summaries and referral notes.](https://zato.io/docs/dev/healthcare/hl7/ccda/index.html)

## Receive clinical documents by email and file

[Direct Secure Messaging An IMAP connection to your HISP reads the inbox and your service gets each referral or discharge summary.](https://zato.io/docs/dev/healthcare/direct/index.html) [IHE XDM document packages The zip with IHE\_XDM and METADATA.XML opened in one call, each document with its metadata.](https://zato.io/docs/dev/healthcare/xdm/index.html)

## EDIFACT

[EDIFACT overview Parse EDIFACT interchanges into typed Python objects and serialize them back byte for byte.](https://zato.io/docs/dev/healthcare/edifact/index.html) [Dialects Dutch healthcare profiles - MEDLAB lab results, MEDVRI doctor-to-doctor and more - as complete examples.](https://zato.io/docs/dev/healthcare/edifact/dialects/index.html) [Transports EDIFACT is exchanged over file drops, mailboxes, email and REST - store-and-forward networks with no live acknowledgment.](https://zato.io/docs/dev/healthcare/edifact/transport/index.html)

## Operate and troubleshoot

[The audit log in clinical interfaces Every message with its acknowledgment, searchable by patient identifier - the first place to look.](https://zato.io/docs/dev/healthcare/audit-log.html) [Troubleshooting by symptom Feed is silent, sender gets AE, message accepted but nothing happened - causes and fixes per symptom.](https://zato.io/docs/dev/healthcare/troubleshooting.html) [Audit log reference Everything the audit log records, its storage, retention and configuration, source by source.](https://zato.io/docs/admin/audit-log/index.html) [Views and search HL7 rendered as a tree beside the raw wire form, with a flow diagram of everything one message touched.](https://zato.io/docs/admin/audit-log/views.html) [Resubmit failed messages Replay failures without double-sending - transient errors retry, content errors need a fix first.](https://zato.io/docs/admin/audit-log/resubmit.html) [Downtime and recovery What happens while an interface is off and how deduplication protects reprocessing on catch-up.](https://zato.io/docs/dev/healthcare/downtime-and-recovery.html)

## Mandates by land

[IHE, TEFCA and eHealth Exchange XDS.b and XCA document exchange with XUA SAML assertions, underlying the US health networks.](https://zato.io/docs/dev/soap/mandates/healthcare-ihe/index.html) [CDC immunization registries VXU submissions and QBP queries over the CDC-specified SOAP transport.](https://zato.io/docs/dev/soap/mandates/cdc-iis/index.html) [NHS Spine HL7 v3 over ebXML, MESH and NHS FHIR APIs for integrations in England.](https://zato.io/docs/dev/soap/mandates/nhs-spine/index.html) [Norwegian Helsenett Per-recipient signing and encryption for messages on the Norwegian health network.](https://zato.io/docs/dev/soap/mandates/norway-helsenett/index.html) [Dutch healthcare EDIFACT The Dutch healthcare profiles - MEDLAB lab results and MEDVRI doctor-to-doctor messages.](https://zato.io/docs/dev/healthcare/edifact/dialects/index.html) [CMS-0057-F prior authorization The US payer FHIR APIs for prior authorization, with their compliance dates.](https://zato.io/integrations/healthcare/cms-0057-prior-authorization-fhir/index.html) [EHDS The European Health Data Space obligations for integration teams, staged and dated.](https://zato.io/integrations/healthcare/ehds-compliance-checklist/index.html) [gematik ISiK The FHIR modules German hospitals are required to expose, module by module.](https://zato.io/integrations/healthcare/gematik-isik-fhir-integration/index.html) [NHS FHIR NHS FHIR APIs in the UK and how to connect to them from Python.](https://zato.io/integrations/healthcare/nhs-fhir-integration-uk/index.html)
