The openEHR federation gateway: one query, answered from every organisation that holds the patient's record.
Documentation · Quick start · What it implements · Licensing
Conformance and compliance
(self-tested and self-assessed counts; none is a certification)
A patient's record is spread over many places: the hospital that treated them last year, the clinic they visit now, a care organisation in another country. Each keeps its own part, and a doctor who needs the whole picture today has to phone around or wait for documents.
FerroFED connects those places. It is an openEHR federation gateway, in pure Rust. An application asks it one ordinary AQL query about a patient, and FerroFED asks every organisation that may hold part of the record, then returns one combined answer that names where each part came from. It stores no clinical data itself: the records stay with the organisations that own them.
It does this with care for privacy. FerroFED first looks up which identifier each organisation uses for the patient, through a patient index (a service that matches one person's identities across organisations), and never sends a patient's name or national number to the organisations it asks. It keeps no patient index of its own: it asks FerroPIX, or any IHE PIXm and PDQm service, as a client. Every access to patient data is logged.
It is for regions and networks of care providers that want a shared view of a patient's record without one central database, for national contact points and eHealth agencies that connect a country's records to MyHealth@EU, and for vendors and integrators that build applications over the records of several organisations.
FerroFED implements the openEHR Federation Working Group's Federation Tier with AQL specification, release 1.0.1, and reaches every node over openEHR ITS-REST 1.1.0. The conformance statement claims the specification point by point and names the test that holds each point.
- The federated query: ordinary AQL in, one merged openEHR result out, with the status of every member, and never a silent partial answer
- Patient identifiers kept out of every query, resolved first through IHE PIXm and PDQm
- Localization: ask only the members that hold the patient, through IHE XCPD, the Dutch NVI or the patient index
- Follow-ups and writes routed to the one member that owns the record
- Stored queries held by the gateway and run by name
- Consent pre-filtering, such as the Dutch Mitz
- The patient summary over FHIR in the European exchange format, with laboratory, discharge and imaging reports
- Prescriptions and dispensations over FHIR in the HL7 Europe profiles
- A national contact point for MyHealth@EU
- The operator console, with versioned configuration revisions
- Admitting a member after a check, and a conformance run to score a deployment
- Health probes, metrics, tracing and overload protection
The quickstart runs the published gateway image beside four FerroEHR
record servers and FerroPIX, with synthetic patients. You need Docker
Compose 2.23.1 or newer, curl, jq and openssl, and no checkout. Every
release attaches the quickstart as one self-contained compose.yaml;
download the latest release's into an empty directory:
curl -fsSLO https://github.com/FerroHEALTH/FerroFED/releases/latest/download/compose.yamlWrite the gateway's signing key, readable by the gateway's user in the container, and start the stack, which seeds FerroPIX and the four servers with the synthetic patients:
mkdir -p secrets
openssl genpkey -algorithm EC -pkeyopt ec_paramgen_curve:P-384 -out secrets/signing-key.pem
chmod 644 secrets/signing-key.pem
docker compose up --waitAsk the development issuer for a token, and the gateway for the compositions of the patient every server knows:
token="$(curl --fail-with-body -s http://127.0.0.1:8190/quickstart/token \
-d grant_type=client_credentials -d client_id=quickstart-client -d client_secret=any \
| jq -er .access_token)"
curl --fail-with-body -s http://127.0.0.1:8080/v1/query/aql \
-H "Authorization: Bearer $token" \
-H 'Content-Type: application/json' -d @- <<'EOF' | jq -e '.meta.federation.complete and (.rows | length) == 4'
{"q": "SELECT c/uid/value FROM EHR e CONTAINS COMPOSITION c WHERE e/ehr_status/subject/external_ref/id/value = 'ffd-test-0001' AND e/ehr_status/subject/external_ref/namespace = 'urn:oid:2.999.1.1'"}
EOFThe answer holds a composition from each of the four servers, and its
meta.federation part reports all four as active and the answer as
complete. Every step is part of
scripts/quickstart/tour.sh, which CI runs
over the repository's compose.yaml, the file each release attaches. The
credentials are development values for a laptop, and
docker compose down --volumes removes what the quickstart started.
The quickstart page
walks through more queries.
FerroFED is at v0.0.21. Every release publishes, from one tag:
- the gateway image
ghcr.io/ferrohealth/ferrofedand the console imageghcr.io/ferrohealth/ferrofed-console, forlinux/amd64andlinux/arm64; - the Kubernetes package,
deploy/kubernetes/, with each image pinned by digest; - the
ferrofedbinary for x86_64 and aarch64 Linux, on glibc and on musl, and the releasecompose.yamlon the GitHub release.
A production deployment
takes you from the release compose.yaml to a first federated query over
your own record servers, and
Configuration names
every key.
- Client authentication with OAuth 2.0 access tokens and SMART on openEHR scopes
- Onward credentials: the gateway signs in to each member as itself, with DPoP or mutual TLS where asked
- What a member is told about the caller, in a token the gateway signs
- The access log of every access to patient data, as the EHDS asks, and the audit trail of every IHE transaction in the IHE ATNA format
- Every release is signed and carries an SBOM and SLSA Build Level 3 provenance, and every scan finding an OpenVEX judgement
- What FerroFED claims, the conformance matrix and the regulatory status under the EHDS Regulation
The source is public and every feature is in this repository; there is no paid edition with extra functions.
| Crate | What it does | Version | Docs | Downloads |
|---|---|---|---|---|
openehr-federation |
The Federation Tier with AQL wire types, the AQL rewrite with identifier hygiene, and the federated result merge |
The interoperability component of Regulation (EU) 2025/327 the gateway runs, eehrxf, is published from FerroBRIDGE.
FerroFED is one of five FerroHEALTH servers. Each does one job and reaches the others only over published standards: FerroEHR stores the record, FerroBRIDGE translates it to FHIR and the OMOP research model, FerroFED connects records across organisations and borders, FerroPIX matches patient identities, and FerroTERM serves the code systems. FerroFED works in front of any openEHR record server and beside any IHE patient index.
- The FerroFED book: evaluate, integrate, operate and contribute, and the FerroHEALTH book for what the family shares
- Data protection and the threat model
- Releases, the changelog and the GitHub releases
- Support and the security policy
- Contributing, code of conduct, governance, maintainers and the AI statement
Business Source License 1.1 (LICENSE): free outside production and for non-commercial production use, a commercial licence from Cadasto B.V. for other production use, and Apache License 2.0 four years after each version. The licensing page says which applies to you.