A pure-Rust openEHR Clinical Data Repository. Spec-compliant and measured.

openEHR separates clinical knowledge from software: applications store and query structured health records through a vendor-neutral REST API and the Archetype Query Language. FerroEHR implements that standard natively in Rust: headless, API-first, one self-contained binary on PostgreSQL 18.

No JVM · no language runtime · every compliance claim machine-verified.

Why we built it

An open standard deserves an implementation you can run

openEHR writes clinical meaning down as a shared, computable model, which is what lets a record outlive the application, the vendor and the procurement cycle that produced it. A specification that good deserves a CDR anyone can actually run.

One licence, no open-core tier

The whole application is source-available under the Business Source License 1.1, with every capability in one repository and nothing held back for a paid tier. Reading, building, modifying and redistributing the source is free, and so is every non-production use. Production use is free for personal use, research, teaching and a non-profit or public body outside the course of a business. Treating patients, any other production use by a company, hosting it for third parties, and distributing it for a fee need a commercial licence. Each version becomes Apache 2.0 four years after it is published. A table says whether you need one.

Send the improvements back

The one thing we ask, and cannot require. A private fork pays for the whole maintenance surface alone; upstreamed, the same work is maintained once for everyone. A defect found once gets fixed everywhere, which is what clinical software should do.

Conformance

Compliance you can verify.

Every release runs the complete conformance catalogue against the live server, in JSON and XML, and computes the openEHR profile verdicts.

1104cases executed
1104passed
0failed
Capability conformance heat grid: every claimed capability grouped by profile tier, marked passed, failed, not evidenced, excused or no-cases
Platform

Everything the openEHR standard asks for

Generated from the official machine-readable models: a specification update is a regeneration.

REST API 1.1.0

EHR, EHR_STATUS, COMPOSITION, DIRECTORY, CONTRIBUTION, query, template and admin resources. Canonical JSON and XML on the wire.

AQL 1.1 engine

Typed path analysis over a spec-generated Reference Model, compiled to efficient SQL, including ALL_VERSIONS and stored queries.

Full versioning

Contribution-atomic commits, indelible version history, logical delete, attestations and per-version digital signatures.

Templates & validation

OPT 1.4 ingestion, WebTemplate generation and deep composition validation against archetype constraints and terminology bindings.

One self-contained binary

A minimal distroless image, and no garbage-collection pauses in the write path.

PostgreSQL 18-native

Temporal versioning with database-enforced non-overlap, UUIDv7 keys and canonical openEHR JSON stored verbatim.

Security

OIDC authentication, RBAC/ABAC authorization, multi-tenancy and IHE ATNA audit.

Integration

FHIR R4B connectors, AMQP change events and S3 multimedia storage bridge openEHR into the systems around it.

Quick start

Running in one command

The full stack (server plus PostgreSQL 18) from one Docker Compose file. No checkout, no configuration.

shell
# With docker-compose.yml from the latest release in the current directory
$ docker compose up

# Probe the status endpoint
$ curl http://localhost:8080/ferroehr/rest/status

# Create an EHR (development credentials: ferroehr / ferroehr)
$ curl -u ferroehr:ferroehr -X POST -i \
    http://localhost:8080/ferroehr/rest/openehr/v1/ehr

# Query it with AQL
$ curl -u ferroehr:ferroehr -H 'Content-Type: application/json' \
    -d '{"q":"SELECT e/ehr_id/value FROM EHR e"}' \
    http://localhost:8080/ferroehr/rest/openehr/v1/query/aql
Ecosystem

Fits your stack

PostgreSQL 18 Keycloak / OIDC RabbitMQ / AMQP FHIR R4B S3 / SeaweedFS Kubernetes / Helm Prometheus / OpenTelemetry