Skip to content
octofhirPublic

About

Fast FHIR server in Rust (R4–R6) with a keyboard-first web console for REST, SQL, GraphQL, FHIRPath and CQL.

Topics

Resources

Contributing

Security policy

Stars

7 stars

Watchers

0 watching

Forks

Latest commit

 

History

608 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OctoFHIR

The FHIR server you can drive from the keyboard.

A fast FHIR server in Rust on PostgreSQL, with a web console for REST, SQL, GraphQL, FHIRPath and CQL, live performance, subscriptions and bulk data built in.

Documentation · Getting started · Conformance · UI kit

OctoFHIR console: Patient resources with the JSON of the selected one

Note: OctoFHIR is under active development and not yet production-ready.

Why OctoFHIR

  • One binary, one database. The server, its search engine and the console ship as a single Rust binary on PostgreSQL. Resource tables are created on demand, so loading an Implementation Guide needs no migrations.
  • Spec-first. FHIR R4, R4B, R5 and R6, and 98.7% on the FHIR262 conformance suite, the top score in the table below.
  • A console made for developers. Every way to ask a FHIR server a question, in one place, with completion that knows your data: type subject= and pick a patient by name.
  • Keyboard-first. ⌘K jumps anywhere (Patient/123 opens it), g + a letter switches tools, j/k walk lists, ? lists the rest.

What's inside

Server Console
REST API: CRUD, history, conditional ops, transactions and batches Resource browser with search in the URL, bulk actions, Undo, and version history with diff and restore
Search: chains, _include/_revinclude, composites, modifiers, sorting REST console with completion for types, parameters and values
GraphQL generated from the FHIR schemas SQL console with a Postgres language server, and index advice per resource table
SQL on FHIR ViewDefinitions FHIRPath and CQL workbenches; notebooks that mix them with REST, SQL and charts
Terminology: $expand, $lookup, $validate-code, $subsumes, $translate Terminology workbench over every installed package
Validation against the base spec or any profile, $validate Bulk validation of stored data with issues grouped by message and path
Bulk Data $export and $import Export, import from a file or URLs, job progress and downloads
Topic-based subscriptions: rest-hook, WebSocket, email, $status, $events Subscriptions with a live delivery log, test pings, topics and filters
Prometheus /metrics with latency histograms Live performance: throughput, p50/p95/p99 per route, the DB pool
OAuth 2.0 and SMART on FHIR, external identity providers Users, roles, clients, sessions and access policies
Access policies as scripts, audit trail Logs, audit and live server settings
REST console completing a reference by practitioner name SQL console querying patients Command palette with recent places
REST with value completion SQL over the same data ⌘K to go anywhere
Performance page: live throughput and p50/p95/p99 latency Subscriptions with the delivery log of a rest-hook Resource history with a diff against the previous version
Live throughput and p99 Subscriptions you can debug History, diff and restore

Quick start

In the browser. Open in GitHub Codespaces: the published image, PostgreSQL and one synthetic US Core patient, on your own Codespaces quota. When it is ready, open port 8888, go to /ui and sign in as admin / admin123.

With Docker. The server image is published to GitHub Container Registry:

docker pull ghcr.io/octofhir/octofhir-server:latest

The deployment guide has a ready docker-compose.yml with PostgreSQL.

From source. Requires Docker (for PostgreSQL) and Rust 1.98+.

git clone https://github.com/octofhir/server-rs.git && cd server-rs
docker compose up -d          # PostgreSQL on :5450
cargo run                     # FHIR API on http://localhost:8888/fhir

Open the console at http://localhost:8888/ui and sign in as admin / admin123.

curl -X POST http://localhost:8888/auth/token \
  -d "grant_type=password&client_id=octofhir-ui&username=admin&password=admin123" \
  --data-urlencode "scope=user/*.cruds system/*.cruds"

Configuration lives in octofhir.toml; point OCTOFHIR_CONFIG at another file, or override any key with OCTOFHIR__SECTION__KEY environment variables.

Development

cargo watch -x run            # server with auto-reload
cargo test                    # tests
cargo clippy                  # lint
cd ui && pnpm install && pnpm dev   # console with hot reload on http://localhost:4000/ui/

The console's components live in packages/ui-kit (Storybook: pnpm -C packages/ui-kit storybook).

Library dependency profiles

The HTTP server enables its required integrations. Independent consumers can use default-features = false for octofhir-api (DTOs without Axum), octofhir-config (files/events/secrets without PostgreSQL), and octofhir-notifications (queues/templates without delivery clients). Existing defaults retain HTTP responses, database configuration, and all notification adapters. Notifications also offer separate smtp and http features. The default octofhir-cql-service profile also avoids HTTP/TLS/LSP and database drivers; hosts supply storage through its existing traits.

Run bash scripts/check-library-deps.sh to exercise these independent consumers and check that transport/database dependencies stay out of their minimal graphs.

Conformance

Results of the FHIR262 conformance suite (suite commit 5f53746, FHIR R4, 1572 tests):

Server CRUD Search Validation Total Run
OctoFHIR 8/8 1258/1278 286/286 1552/1572 (98.7%) 2026-10-30, local
WSO2 FHIR Server 7/8 1206/1278 284/286 1497/1572 (95.2%) 2026-09-14, WSO2²
Aidbox 6/8 1147/1278 259/286 1412/1572 (89.8%) 2026-05-25, FHIR262
HAPI 8/8 1124/1278 256/286 1388/1572 (88.3%) 2026-05-25, FHIR262
Microsoft FHIR Server 8/8 992/1278 225/286 1225/1572 (77.9%) 2026-05-25, FHIR262
fhir-candle 6/8 1175/1278 26/286 1207/1572 (76.8%) 2026-05-25, FHIR262
Medplum¹ 8/8 31/1278 230/286 269/1572 (17.1%) 2026-05-25, FHIR262

All runs use the same 1572 tests. "FHIR262" is the suite's own published run; "WSO2" is the run published in the WSO2 FHIR Server docs.

¹ Medplum's search result most likely reflects an environment failure in that run rather than its actual search support.

² WSO2 runs the suite from a fork (prdai-archive/fhir262) whose harness boots one server for all test files; the tests themselves are unchanged.

Known failures, all in tests/Search/intervals.ts on Periods that touch or straddle the requested range: 14 ap cases (FHIR leaves the ap window to the server) and 6 le cases whose expectations contradict the suite's own "overlaps request end" case. OctoFHIR follows the spec's ge = gt or eq, le = lt or eq.

To reproduce, check out FHIR262 next to this repo, add the impl/octofhir adapter, tag the server image as octofhir-server-local:dev and run make test-octofhir.

US Core with Inferno

just inferno-setup       # Clone Inferno (once)
just inferno-server-up   # Start OctoFHIR in Docker
just inferno-up          # Start Inferno
just inferno-seed        # Seed 43 US Core resources
just inferno-ui          # Open http://localhost
# Run the tests in the Inferno UI, then:
just inferno-results     # Generate conformance-results/<timestamp>/

License

OctoFHIR is open source under the Apache License 2.0: use it, change it and run it anywhere, including commercially. See NOTICE for attribution.

About

Fast FHIR server in Rust (R4–R6) with a keyboard-first web console for REST, SQL, GraphQL, FHIRPath and CQL.

Topics

Resources

Contributing

Security policy

Stars

7 stars

Watchers

0 watching

Forks

Releases

Sponsor this project

Packages

Contributors

Languages