Example application demonstrating mdmbox-sdk usage — patient matching, merging, and deduplication on FHIR servers.
Built with React, Vite, Tailwind CSS, and MDMbox as the FHIR backend (via its libox FHIR-proxy).
git clone https://github.com/HealthSamurai/mdmbox-example-app.git
cd mdmbox-example-app
bun install
# Start infrastructure (Postgres, MDMbox)
docker compose up -d
Go to http://localhost:3003/admin and acitvate license
# Load sample patients and create the matching model
./setup/run.sh
# Start the dev server
bun devOpen http://localhost:3002 in your browser.
docker compose up -d starts two services:
| Service | Image | Port | Description |
|---|---|---|---|
mdmbox-db |
postgres:18 |
5438 | PostgreSQL database |
mdmbox |
healthsamurai/mdmbox:edge |
3003 | MDMbox (matching engine + libox FHIR-proxy) |
The setup/ folder contains initialization resources:
| File | Description |
|---|---|
run.sh |
Init script — waits for MDMbox, loads sample data, creates the matching model |
patient-model.json |
MDMbox matching model configuration |
The init script performs the following steps:
- Waits for MDMbox to be ready
- Loads 1000 sample patients via
POST /fhir-server-api/$load - Creates a matching model in MDMbox
| Variable | Default | Description |
|---|---|---|
MDMBOX_URL |
http://localhost:3003 |
MDMbox API URL |
PORT |
3000 |
Production server port |
- Patient search — search, filter, and paginate patients via FHIR search
- Duplicate matching — find potential duplicates using MDMbox matching models with configurable thresholds
- Record merging — side-by-side field comparison, reference relinking, merge preview and execution
- Merge history — browse and inspect past merge operations with provenance details
| Script | Description |
|---|---|
bun run dev |
Start Vite dev server (port 3002) |
bun run build |
Type-check and build for production |
bun run serve |
Serve production build with Bun (port 3000) |
bun run typegen |
Regenerate FHIR R4 type definitions |
bun run build
bun run serveThe production server proxies /api/* and /fhir-server-api/* to MDMbox, and serves the SPA from dist/.
MIT — Health Samurai