Running the server
The simplest option if you have bun installed. This starts the FHIR server and the frontend dev server together:
The FHIR server will be at http://localhost:8081/fhir and the frontend at http://localhost:3000
Run the server directly without bun or Nx:
The FHIR server will be available at http://localhost:8081/fhir
The frontend can be run in a separate terminal with:
The frontend will be available at http://localhost:3000
What happens at startup
When the server starts, it does several things before it's ready to accept requests:
-
Downloads IG packages. The CRD, DTR, and PAS implementation guide packages are fetched from
build.fhir.organd installed into the database. This only happens the first time the server starts (or after the H2 in-memory database is cleared on restart). -
Loads initial data. FHIR resources from the
initial-datadirectories (examples-crd,examples-dtr,examples-pas,seed-data,library) are upserted into the database. The loader retries dependency ordering automatically. If a resource has a reference to another resource that hasn't loaded yet, it will retry that resource until all are loaded or it hits a retry limit. Results of any failure will be shown in the logs. -
Compiles CQL. Library resources that reference
.cqlfiles viacontent.urlget their CQL source resolved from disk and compiled to ELM (the executable format). Both of these will be added to the Library resource and will be available at the/fhir/Libraryendpoint.
Note
The database is H2 in-memory by default. All data is reloaded on every restart. You can change the connection string in the application.yaml configuration file if persistent storage is required.