A demonstration Electronic Health Record (EHR) application for showcasing Dutch healthcare data exchange use cases, specifically focusing on BGZ (Basisgegevensset Zorg) exchange and eOverdracht (care handover) workflows.
Start the Demo EHR together with the Demo Dezi Client (handles Dezi login) using Docker Compose from the repository root:
docker compose --profile demoehr up
Then open http://localhost:8091 in your browser.
The Demo EHR requires a running Knooppunt instance (started separately via docker compose up).
For authentication to work, the Demo Dezi Client also needs a valid CIBG Dezi client registration and configuration.
The Demo EHR app is a React-based web application that demonstrates how healthcare providers can exchange patient data using FHIR standards and the Nuts infrastructure. It implements two primary use cases:
The BGZ exchange workflow enables healthcare organizations to request and share comprehensive patient health summaries. The application supports:
Ta Notified Pull: https://www.twiin.nl/tanpTa Notified Pull: https://www.twiin.nl/tanpbasedOn reference)The eOverdracht workflow facilitates structured care handover between healthcare providers:
eOverdracht-Task profileThe application leverages two key infrastructure components for discovering and routing to healthcare organizations:
partOf)eOverdracht-notification - For care handover notificationsTwiin-TA-notification - For BGZ notificationsX-Tenant-ID header with URA identifiersThe application interacts with multiple FHIR endpoints:
config.fhirBaseURL)
http://localhost:7050/fhir/sunflower-patientsconfig.fhirStu3BaseURL)
http://localhost:7060/fhirconfig.mcsdQueryBaseURL)
http://localhost:8080/fhirThe NVI service provides a decentralized index of patient documents:
/api/knooppunt/nvi/DocumentReferencepatient:identifier - Search by BSN identifier_count - Result limitX-Tenant-ID - Organization URA for tenant isolationThe application includes example FHIR resources for testing:
bgz-example.json - Sample BGZ bundle (STU3)bzg-example-r4.json - Sample BGZ bundle (R4)workflow-task.json - Sample BGZ workflow tasknotification-task.json - Sample notification task/login and /userinfo)The application is organized into API client modules:
bgzApi.js - BGZ data generationbgzVerweijzingApi.js - BGZ workflow and notification tasksbgzVisualizationApi.js - BGZ data visualizationeOverdrachtApi.js - eOverdracht tasks and notificationsorganizationApi.js - mCSD organization querieshealthcareServiceApi.js - mCSD healthcare service queriesnviApi.js - NVI DocumentReference queriespatientApi.js - Patient queriesmedicationApi.js - Medication queriesconsentApi.js - Consent queriespractitionerApi.js - Practitioner queriesfhir.js - FHIR utilities and headersThe app uses setupProxy.js to proxy requests:
/api/knooppunt/* - Routes to Nuts node/api/dynamic-proxy/* - Dynamic proxy using X-Target-URL headerApplication configuration is managed through environment variables. The application reads configuration from config.js, which consumes React environment variables.
| Variable | Description | Default |
|---|---|---|
REACT_APP_AUTH_BASE_URL |
Base URL of demo-dezi-client | http://localhost:8090 |
REACT_APP_FHIR_BASE_URL |
FHIR R4 base URL for patient data | - |
REACT_APP_FHIR_STU3_BASE_URL |
FHIR STU3 base URL for BGZ/eOverdracht tasks | - |
REACT_APP_FHIR_MCSD_QUERY_BASE_URL |
mCSD Query Directory FHIR endpoint | - |
REACT_APP_ORGANIZATION_URA |
Organization URA identifier (optional) | - |
The demo-ehr service is available as a Docker Compose profile. Start with:
docker compose --profile demoehr up
For local development without Docker, create a .env file in mock-components/demo-ehr/:
REACT_APP_AUTH_BASE_URL=http://localhost:8090
REACT_APP_FHIR_BASE_URL=http://localhost:7050/fhir/sunflower-patients
REACT_APP_FHIR_STU3_BASE_URL=http://localhost:7060/fhir
REACT_APP_FHIR_MCSD_QUERY_BASE_URL=http://localhost:8080/fhir
REACT_APP_ORGANIZATION_URA=
Authentication is delegated to the demo-dezi-client service, which handles the complete OIDC flow with Dezi. Demo EHR is a simple client that:
/login for authentication/userinfo to get user data/logout to end the sessionConfigure the auth base URL in authConfig.js:
export const authConfig = {
baseUrl: process.env.REACT_APP_AUTH_BASE_URL || 'http://localhost:8090',
};
Required Service: demo-dezi-client must be running on port 8090 (or configured URL)
Architecture:
[demo-ehr :3000] → [demo-dezi-client :8090] → [Dezi auth.dezi.nl]
User Data: Receives Dezi verklaring (healthcare worker declaration) with:
dezi_nummer - Healthcare worker IDname - Full namerol_naam - Professional roleabonnee_naam - Organization nameverklaring_id - Declaration IDThe demo-ehr application requires specific configuration in the Knooppunt server (config/knooppunt.yml). The following sections detail the required configuration changes:
Enable NVI (Notified Pull Index) with the FHIR base URL:
nvi:
baseurl: "http://localhost:7050/fhir/nvi"
Configure mCSD directories for organization discovery and routing:
mcsd:
# Root directories to synchronize from
admin:
"lrza":
fhirbaseurl: "https://knooppunt-test.nuts-services.nl/lrza/mcsd"
# Local FHIR directory configuration
query:
fhirbaseurl: "http://localhost:7050/fhir/knpt-mcsd-query"
Key Points:
mcsd.admin - Configures external mCSD directories to synchronize from (e.g., LRZA national registry)mcsd.query.fhirbaseurl - Local query endpoint for organization and endpoint lookupsREACT_APP_FHIR_MCSD_QUERY_BASE_URLConfigure the admin interface FHIR endpoint:
mcsdadmin:
# Base URL for FHIR server used by admin interface
fhirbaseurl: "http://localhost:7050/fhir/knpt-mcsd-admin"
Here’s a complete example of the required sections in config/knooppunt.yml:
strictmode: false
nvi:
baseurl: "http://localhost:7050/fhir/nvi"
mcsd:
admin:
"lrza":
fhirbaseurl: "https://knooppunt-test.nuts-services.nl/lrza/mcsd"
query:
fhirbaseurl: "http://localhost:7050/fhir/knpt-mcsd-query"
exclude_admin_directories:
- "http://localhost:7050/fhir/knpt-mcsd-admin"
mcsdadmin:
fhirbaseurl: "http://localhost:7050/fhir/knpt-mcsd-admin"
http://nictiz.nl/fhir/StructureDefinition/BgZ-verwijzing-Taskhttp://nictiz.nl/fhir/StructureDefinition/eOverdracht-Taskhttp://fhir.nl/fhir/NamingSystem/bsn - Dutch citizen service numberhttp://fhir.nl/fhir/NamingSystem/ura - Unique healthcare provider identificationhttp://fhir.nl/fhir/NamingSystem/TaskCode|pull-notificationThis demonstration application was developed with significant assistance from Claude Code.