The eCR Viewer can be run in three modes.
Mode | Features Available | Metadata Support | Authentication Supported | Environment Variables Needed |
---|---|---|---|---|
INTEGRATED |
Viewer | None | NBS | Base, eCR FHIR Storage, Integrated Authentication |
NON_INTEGRATED |
Viewer, Library | SQL Server or Postgres | External authentication provider | Base, eCR FHIR Storage, Non-Integrated Authentication, Metadata Database |
DUAL |
Viewer, Library | SQL Server or Postgres | Both NBS and external authentication provider | Base, eCR FHIR Storage, Integrated Authentication, Non-Integrated Authentication, Metadata Database |
flowchart LR
user
nbs["NBS - View eICR"]
ingestion["Ingestion Service<br>(e.g. Rhapsody)"]
subgraph service[Cloud]
direction TB
subgraph container["fab:fa-docker container"]
viewer["fab:fa-node fab:fa-react <code>ecr-viewer<br>HTTP:3000/</code>"]
end
blobStorage["fab:fa-file Blob Storage"]
container <--> |eCR FHIR Data| blobStorage
end
user --> nbs
nbs -->|<code>/view-data</code><br>eCR Viewer<br>Authenticated by NBS| container
ingestion -->|<code>/api/process-zip</code>| container
flowchart LR
user
ingestion["Ingestion Service<br>(e.g. Rhapsody)"]
subgraph service[Cloud]
direction TB
subgraph container["fab:fa-docker container"]
viewer["fab:fa-node fab:fa-react <code>ecr-viewer<br>HTTP:3000/</code>"]
end
blobStorage["fab:fa-file Blob Storage"]
metadata["fab:fa-database Database"]
identityProvider["Identity Provider<br>(e.g. Keycloak/Azure Ad)"]
container <--> |eCR FHIR Data| blobStorage
container <--> |eCR Metadata| metadata
container -->|Validates User| identityProvider
end
user -->|<code>/view-data</code><br>eCR Viewer<br>Authenticated by identity provider| container
user -->|<code>/</code><br>eCR Library<br>Authenticated By identity provider| container
ingestion -->|<code>/api/process-zip</code>| container
flowchart LR
user
nbs["NBS - View eICR"]
ingestion["Ingestion Service<br>(e.g. Rhapsody)"]
subgraph service[Cloud]
direction TB
subgraph container["fab:fa-docker container"]
viewer["fab:fa-node fab:fa-react <code>ecr-viewer<br>HTTP:3000/</code>"]
end
blobStorage["fab:fa-file Blob Storage"]
metadata["fab:fa-database Database"]
identityProvider["Identity Provider<br>(e.g. Keycloak/Azure Ad)"]
container <--> |eCR FHIR Data| blobStorage
container <--> |eCR Metadata| metadata
container -->|Validates User| identityProvider
end
user --> nbs
nbs -->|<code>/view-data</code><br>eCR Viewer<br>Authenticated by NBS| container
user -->|<code>/view-data</code><br>eCR Viewer<br>Authenticated by identity provider| container
user -->|<code>/</code><br>eCR Library<br>Authenticated By identity provider| container
ingestion -->|<code>/api/process-zip</code>| container
The full list of environment variables can be found in NodeJS.ProcessEnv. Below, you'll find more information about the groups of environment variables supported by the Viewer.
Base required variables are ones required for all deployments regardless of mode or cloud environment. If variables are not set, this may cause issues starting the app. The variables can be found in EnvironmentVariables.BaseRequired.
A storage container for the eCRs must be created for all deployments. Depending on the storage container used additional variables may be required. The variables can be found in EnvironmentVariables.EcrStorage.
Authentication is required when running any mode of the application.
Integrated eCR Viewer will rely on NBS to authenticate the user. The variables can be found in EnvironmentVariables.Authentication.
Non-Integrated/Dual rely on an external authentication provider, like Azure AD, Entra, or Keycloak. The variables can be found in EnvironmentVariables.Authentication.
Non-Integrated/Dual require a database to store eCR metadata. The variables can be found in EnvironmentVariables.EcrMetadataStorage.
These are variables that have been retired and no longer have a use in the app. These can be safely removed when installing the current version.
Name | Description | Version Removed |
---|---|---|
SQL_SERVER_HOST |
Replaced with DATABASE_URL |
3.1 |
SQL_SERVER_PASSWORD |
Replaced with DATABASE_URL |
3.1 |
SQL_SERVER_USER |
Replaced with DATABASE_URL |
3.1 |
Data can be added to the eCR Viewer as a step in Rhapsody.
Rhapsody documentation and an example route can be found here.
Data can be added directly via API requeset to eCR Viewer's /process-zip endpoint.
curl --location '{URL}/ecr-viewer/api/process-zip' \
--form 'upload_file=@"/path/to/eicr.zip";type=application/zip'
Database setup, migration, and updates are handled by Kysely but must be triggered manually. Migrations are run by executing the command npm run db:migrate:up
on the host that is running the eCR Viewer. If the latest migration has not been run the eCR Viewer will log an error and exit on startup.