Healthcare/EDIFACT

EDIFACT in Python

Parse, build, and route EDIFACT messages with typed Python classes. Interchanges, dialects, and profiles - with byte-faithful round trips.

UNA-UNZ
Full envelope support
Typed
Segments and messages
Any
Dialect or profile
100%
Round-trip fidelity
edifact_service.py

Pythonic by design

Parse incoming interchanges or build new messages from scratch, all with typed Python classes.

Everything for EDIFACT

Parse, navigate, build, and exchange EDIFACT messages, all in Python.

Semantic field access
Use msg.pid.patient_name instead of counting elements and components. Repeating segments and groups are plain Python lists.
Dialects and profiles
Define any dialect as typed Python classes. Dutch healthcare profiles ship as a complete, ready-to-use example.
Round-trip fidelity
Serialization reproduces the wire text - what you parse is what you can send back out, byte for byte.
Interchange envelopes
UNA service string advice, UNB-UNZ envelopes, multi-message interchanges, and bare envelope-less messages - all parsed with one call.
Any transport
EDIFACT is text - send it over REST, SOAP, file drops, SFTP, email or message queues with the connections Zato already has.
JSON serialization
Convert interchanges, messages, and segments to dicts and JSON with to_dict and to_json.

Learn by building

Step-by-step guides for EDIFACT integration patterns.

EDIFACT developer guides

In-depth documentation for working with EDIFACT messages in Python.

Frequently asked questions

No. EDIFACT is text with its own internal envelope, it has no transport of its own. Whatever channel delivers the text - REST, SOAP, file transfer, SFTP, email or a message queue - your service calls parse_edifact on the payload and works with typed messages from there.

The generic engine parses any syntactically valid EDIFACT, and typed message definitions ship for the Dutch healthcare profiles (MEDLAB, MEDVRI, MEDRAD, MEDSPE) as a complete worked example of a dialect. Your own dialects are plain Python classes that follow the same pattern.

They parse into generic messages that keep every segment, element, and component navigable by position, and they serialize back byte-for-byte. Typed access is an addition, never a requirement.

Yes - parse and serialize gives you back the wire text, including separators, escapes, and elements that were empty on the wire. Fields you modify are re-serialized in place, everything else stays untouched.

Ready to build EDIFACT integrations?

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

Open source In Python