Skip to content

Commit

Permalink
Merge branch 'dev' into 732-rems-admin-ui
Browse files Browse the repository at this point in the history
  • Loading branch information
avirgulto authored Sep 26, 2024
2 parents 2d1e599 + 934c747 commit a5022b7
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 4 deletions.
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -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 = CodeX REMS Administrator Prototype
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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. |
3 changes: 2 additions & 1 deletion src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/hookResources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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')
};

Expand Down
6 changes: 5 additions & 1 deletion src/lib/vsac_cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,11 @@ class VsacCache {
*/
collectLibraryValueSets(library: Library) {
// ensure only unique values
return new Set(fhirpath.evaluate(library, 'Library.dataRequirement.codeFilter.valueSet'));
const result = fhirpath.evaluate(
library,
'Library.dataRequirement.codeFilter.valueSet'
) as any[];
return new Set(result);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/rems-cds-hooks

0 comments on commit a5022b7

Please sign in to comment.