Skip to content
FerroHEALTHPublic

About

A pure-Rust openEHR federation gateway: one AQL query in, standard AQL to every node, one answer out, after the openEHR Federation Tier with AQL proposal.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

981 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FerroFED

The openEHR federation gateway: one query, answered from every organisation that holds the patient's record.

Documentation · Quick start · What it implements · Licensing

Project
Release CI License: BUSL-1.1 Docs GHCR Image pulls

Quality and security
OpenSSF Scorecard OpenSSF Best Practices Quality gate Coverage CodeQL Signed releases SLSA Build L3 Post-quantum safe uses

Conformance and compliance
(self-tested and self-assessed counts; none is a certification)

Federation Tier 1.0.1 gateway points Federation Tier 1.0.1 node points Federation Tier 1.0.1 operator points AQL golden cases

EHDS CRA

MyHealth@EU self-assessed MyHealth@EU search, self-tested MyHealth@EU core, self-tested MyHealth@EU laboratory, self-tested MyHealth@EU discharge, self-tested MyHealth@EU vaccination, self-tested

What FerroFED is

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.

The FerroFED operator console dashboard

What it implements

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.

Federated queries

European exchange

Operations

Quick start

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.yaml

Write 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 --wait

Ask 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'"}
EOF

The 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.

Deploy it

FerroFED is at v0.0.21. Every release publishes, from one tag:

  • the gateway image ghcr.io/ferrohealth/ferrofed and the console image ghcr.io/ferrohealth/ferrofed-console, for linux/amd64 and linux/arm64;
  • the Kubernetes package, deploy/kubernetes/, with each image pinned by digest;
  • the ferrofed binary for x86_64 and aarch64 Linux, on glibc and on musl, and the release compose.yaml on 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.

Security and conformance

The source is public and every feature is in this repository; there is no paid edition with extra functions.

Crates

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 crates.io docs.rs downloads

The interoperability component of Regulation (EU) 2025/327 the gateway runs, eehrxf, is published from FerroBRIDGE.

Part of FerroHEALTH

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.

Documentation

Support and contributing

Licence

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.

About

A pure-Rust openEHR federation gateway: one AQL query in, standard AQL to every node, one answer out, after the openEHR Federation Tier with AQL proposal.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages