sazare
A FHIR R4 server in one binary.
For learning FHIR, prototypes, local development and small deployments: where one binary with its database inside beats running a Java application server and a database server.
- One binary
- SQLite inside, nothing else to set up: no Java, no database server. macOS, Linux, Windows, or Docker. Start
- Checked writes
- Every write is checked against the R4 definitions. CI compares those checks with the HL7 FHIR validator on the R4 examples and on copies broken 28 ways, through all ten write paths: on those files, sazare refuses nothing the validator accepts, and accepts no broken copy it refuses. The validator is stricter on some of the examples (example URLs, terminology, invariants sazare doesn't check), each counted. The latest results
- US Core
- Passes the Inferno US Core v7 and v8 FHIR API test suites, run in CI. Later versions are not yet tested. The latest results
What it does
- The R4 REST API for every resource type: create, read, update, delete, history, conditional operations, JSON Patch, transaction and batch Bundles.
- Search on every R4 parameter of type string, token, date, reference, number and
quantity; chains,
_has,_include,_sort, full text. What isn't supported is a 400, never silently ignored. - Profiles: US Core built in, and an implementation guide's package loaded at startup (tested in CI with JP Core).
- API keys, Basic auth, JWT and SMART on FHIR scopes, including patient-scoped tokens.
- Bulk Data
$exportand NDJSON$import; Subscriptions by REST hook and WebSocket. - A dashboard in the binary: browse resources, and a search builder that shows the FHIR URL it makes.
What it doesn't
- FHIR versions other than R4 (4.0.1), and XML: R4 and JSON only.
- Large production workloads or many concurrent writes: one SQLite file on one machine.
- Terminology services (
$expand,$validate-code,$lookup).
For those, use a mature server such as HAPI FHIR.
Start
macOS or Linux, with Homebrew:
brew install fu-foo/tap/sazare
sazare-server start --demo --open
Windows, with Scoop:
scoop bucket add fu-foo https://github.com/fu-foo/scoop-bucket
scoop install sazare
sazare-server start --demo --open
Or the binary from the latest release (macOS, Linux x86-64 and ARM64 with glibc 2.28 or newer, Windows):
tar xzf sazare-server-linux-amd64.tar.gz
./sazare-server start --demo --open
Docker:
docker run -p 8080:8080 -v sazare-data:/data ghcr.io/fu-foo/fhir-sazare
--demo loads sample patients; --open opens the dashboard.
Configuration, search, limits and upgrades are in the
README; what changed, in the
changelog.
Definitions
The canonical URLs sazare uses resolve here.
- StructureDefinition/import-result
- The counts of an
$import, on its OperationOutcome. - OperationDefinition/import
POST /$import: resources from an NDJSON body.