diff --git a/.env b/.env index c80dcf6..ab1c188 100644 --- a/.env +++ b/.env @@ -10,3 +10,4 @@ SMART_ENDPOINT = http://localhost:4040/launch USE_HTTPS = false VSAC_API_KEY = changeMe WHITELIST = http://localhost, http://localhost:3005 +SERVER_NAME = MCODE REMS Administrator Prototype diff --git a/README.md b/README.md index 99ceda4..24f4fd3 100644 --- a/README.md +++ b/README.md @@ -98,3 +98,4 @@ Following are a list of modifiable paths: | USE_HTTPS | `false` | Change to true to enable HTTPS. Ensure that HTTPS_CERT_PATH and HTTPS_KEY_PATH are valid. | | VSAC_API_KEY | `changeMe` | Replace with VSAC API key for pulling down ValueSets. Request an API Key from the [VSAC website](https://vsac.nlm.nih.gov/) | | WHITELIST | `http://localhost, http://localhost:3005` | List of valid URLs for CORS. Should include any URLs the server accesses for resources. | +| SERVER_NAME | `CodeX REMS Administrator Prototype` | Name of the server that is returned in the card source. | diff --git a/src/config.ts b/src/config.ts index 74c8617..69fa1a4 100644 --- a/src/config.ts +++ b/src/config.ts @@ -12,7 +12,8 @@ const whitelist = whitelistEnv && whitelistEnv.length === 1 ? whitelistEnv[0] : export default { server: { port: env.get('PORT').asInt(), - discoveryEndpoint: '/cds-services' + discoveryEndpoint: '/cds-services', + name: env.get('SERVER_NAME').required().asString() }, smart: { endpoint: env.get('SMART_ENDPOINT').required().asUrlString() diff --git a/src/hooks/hookResources.ts b/src/hooks/hookResources.ts index 4d435a4..1dd98db 100644 --- a/src/hooks/hookResources.ts +++ b/src/hooks/hookResources.ts @@ -244,7 +244,7 @@ export const validCodes: Coding[] = [ } ]; const source = { - label: 'MCODE REMS Administrator Prototype', + label: config.server.name, url: new URL('https://github.com/mcode/rems-admin') };