A high-performance FHIR R4 server written in Swift. Designed for Taiwan healthcare — TW Core IG compliant, one-command deployment, built-in resource browser.
Stack: Hummingbird 2 (SwiftNIO) · PostgresNIO (no ORM) · FHIRModels
Requires Docker Desktop. Works on macOS, Linux, and Windows.
git clone https://github.com/shinrenpan/Siming.git
cd Siming
bash scripts/setup.shServer ready at http://localhost:8080 · FHIR Browser at http://localhost:8080/ui
setup.sh pulls the prebuilt image ghcr.io/shinrenpan/siming (linux/amd64 and
linux/arm64, FHIR packages included) — nothing is compiled. It follows latest; pin a
release with SIMING_VERSION=1.6.0 in .env. Images are published from v1.5.0 on.
bash scripts/setup.sh --buildFetches the FHIR packages and compiles this checkout (docker compose up --build). The
release build needs more than 8 GB of memory available to Docker. On a smaller VM
(Colima, Docker Desktop with a low limit) the compiler is killed with signal 9; set
SWIFT_BUILD_FLAGS="-j 1 -Xswiftc -no-whole-module-optimization" in .env before running
it (or pass it as --build-arg to a manual docker build). Even then the last few
large files leave little headroom — stop other containers on the same VM while it builds.
Requires Swift 6.2+ and Docker (for Postgres only).
bash scripts/fetch-packages.sh # one-time
bash scripts/run-macOS.shSiming is a clinical data server — it stores and searches clinical resources for small clinics. It is not a terminology server: CodeSystem/ValueSet CRUD and operations ($expand, $lookup) are out of scope. Terminology validation is handled by the optional HL7 Validator sidecar.
- 27 FHIR R4 resource types — CRUD, search, history, compartment, transaction bundle (
PractitionerRoleindexespractitioneronly — see notes) - TW Core IG v1.0.0 — 9/9 profiles validated;
$validatewith optional HL7 Validator sidecar - Search — chained,
_has,_include/_revinclude,_summary,_elements, cursor pagination - Security — SMART on FHIR JWT bearer (opt-in, setup), per-IP rate limiting (opt-in), CORS
- Built-in browser —
GET /ui— CRUD for all resource types, JSON editor, response-time indicator - Observability — Prometheus metrics (
GET /metrics),X-Request-IDtrace header - Generated search — search extractors are generated from the loaded FHIR packages, not hand-written; changing the IG is a package swap + regenerate, no handler rewrites (details)
→ Full documentation · Roadmap — known gaps and what is deliberately not planned
Release build · 5 000 patients · both servers on PostgreSQL. See benchmarks/README.md.
| Scenario | Siming | HAPI FHIR | Ratio |
|---|---|---|---|
GET /Patient/:id |
15 515 RPS | 6 883 RPS | 2.25× |
GET /Patient?name=Wang |
2 512 RPS | 1 627 RPS | 1.54× |
MIT — see LICENSE.
Built with Claude Code