Please note that this project is currently a work in progress. Not everything will fully work yet
This application is pretending to be an electronic health record system. You can use it to demo how healthcare professionals can work together by sharing information with colleagues through the Nuts nodes.
It uses a FHIR server for the storage of patients, observataions and tasks. We use the Smart dev sandbox with FHIR R4 and Synthea data for a quick setup. You can generate a localized data set using the Internaltion profiles for Synthea.
This version is an updated version using vue.js as frontend framework and a Golang backend. It's based on the nuts-registry-admin-demo.
Versions are in sync with the Nuts node version. The main branch uses the master branch of the Nuts node.
Older versions have a vX
branch.
NOTE THAT THIS APPLICATION IS NOT INTENDED FOR USE WITH REAL MEDICAL INFORMATION! IT IS IN NO WAY DEVELOPED TO BE SAFE, STABLE OR EVEN USABLE FOR SUCH PURPOSE.
To build for demo-production:
npm install
npm run build
go run .
This will serve the front end from the embedded filesystem.
During front-end development, you probably want to use the real filesystem and webpack in watch mode:
npm install
npm run watch
go run . live
The API and domain types are generated from the api/api.yaml
.
make gen-api
docker run -p 1304:1304 nutsfoundation/nuts-demo-ehr:main
When running in Docker without a config file mounted at /app/server.config.yaml
it will use the default configuration.
To allow Demo EHR to query FHIR servers and eOverdracht notification endpoints which require a client certificate (required according to the Bolt),
you need to configure tls.client.certificate
and tls.client.key
to point to the respective files.
Use the same certificate you're using for your Nuts node.
There's no need to configure the truststore: Demo EHR skips verification of the server certificate (it's a demo application after all).
The simplest way of starting up an out of the box FHIR backend is using the HAPI FHIR server by running the following docker command:
docker run -p 8080:8080 -e hapi.fhir.fhir_version=DSTU3 -e hapi.fhir.partitioning.allow_references_across_partitions=false hapiproject/hapi:v5.4.1
Configuration explanation:
hapi.fhir.fhir_version=DSTU3
indicates FHIR version STU3 is usedhapi.fhir.partitioning.allow_references_across_partitions=false
signals HAPI server to enable partitioning, which allows multi-tenancy.
If you're using the HAPI FHIR docker image or any other HAPI FHIR server with support for multi-tenancy you should set the fhir.server.type
option to: hapi-multi-tenant
otherwise choose either hapi
(for a single-tenant HAPI FHIR server) or other
.
The Demo-EHR needs a connection to a running Nuts node. The customers.json
file also needs to be in sync with the DIDs known to the Nuts node.
You can use the nuts-registry-admin-demo for setting up customers.json
.
It's important to configure the Nuts node address in the server.config.yaml
. The nutsnodeaddr
must be used for this:
nutsnodeaddr: "http://localhost:1323"
Frontend framework is vue.js 3.x
Icons are from https://heroicons.com
CSS framework is https://tailwindcss.com
Solution: handout 172.90.0.2 to loadbalancer Set default range to: networks: default: ipam: config: - subnet: 172.90.0.0/16
- execute
./generate.sh
indocker-compose/lb/tls/
- load
docker-compose/lb/tls/ca.pem
into keychain/local certs - add
left.local
,node.left.local
,admin.left.local
,right.local
,admin.right.local
andnode.right.local
to/etc/hosts
(127.0.0.1) - execute
make docker
- execute
./setup.sh <docker-compose-PEP.yml>
(setup is independent of PEP, so usually fine to run without argument (defaults to nginx))
- use https://admin.left.local and add "1" as identity
- issue an NutsOrganizationCredential for the subject's DIDs from the subject's DIDs
- use https://admin.right.local and add "1" as identity
- issue an NutsOrganizationCredential for the subject's DIDs from the subject's DIDs
- activate services for discovery using curl statement from below
- create
customers.json
files for demo-ehr config - wait
curl statement to add services to DID document:
docker exec nuts-demo-ehr-node-left-1 curl -X POST "http://localhost:8081/internal/discovery/v1/urn:nuts.nl:usecase:eOverdrachtDemo2024/1" -H "Content-Type: application/json" -d '{"registrationParameters": {"fhir": "https://left.local/fhir/1", "notification":"https://left.local/web/external/transfer/notify"}}'
docker exec nuts-demo-ehr-node-right-1 curl -X POST "http://localhost:8081/internal/discovery/v1/urn:nuts.nl:usecase:eOverdrachtDemo2024/1" -H "Content-Type: application/json" -d '{"registrationParameters": {"fhir": "https://right.local/fhir/1", "notification":"https://right.local/web/external/transfer/notify"}}'
The repo contains different docker compose setups that each have a different PEP configured
- NGINX
docker-compose-nginx.yml
- APISIX
docker-compose-apisix.yml
Select the PEP you want (use NGINX if unsure) and run
docker compose -f docker-compose-<PEP>.yml up
- goto: https://left.local and https://right.local