Skip to content
Merged

Dev #30

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,9 @@ REMS_ADMIN_HOOK_PATH=http://localhost:8090/cds-services/rems-
REMS_ADMIN_FHIR_PATH=http://localhost:8090/4_0_0
FRONTEND_PORT = 9080
BACKEND_API_BASE = http://localhost:3003
EHR_URL = http://localhost:8080/test-ehr/r4
EHR_URL = http://localhost:8080/test-ehr/r4
DIRECTORY_SERVICE_URL=http://localhost:3323
DIRECTORY_API_PATH = /drug/ndc.json
DIRECTORY_SPL_PATH = /drugs/spl.zip
SPL_ZIP_FILE_NAME=TESTDATA_rems_document_and_rems_indexing_spl_files.zip

2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,5 @@ yarn-error.log*
next-env.d.ts

.vscode/*

/rems-spl-files
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Description
The [REMS](https://www.fda.gov/drugs/drug-safety-and-availability/risk-evaluation-and-mitigation-strategies-rems) Intermediary application is an app that acts as an intermediary between the provider client systems and the REMS Administrator for [CDS Hooks](https://cds-hooks.org/) calls of the type order-sign, order-select, patient-view and encounter-start. This allows for the clients to register the intermediary and send all requests to it instead of registering individual REMS Administrators. The REMS Intermediary application also acts as an intermediary between the provider and pharmacy applications for querying the ETASU status using the FHIR Operation $rems-etasu on the GuidanceResponse resource.

Disclaimer: The SPL Zip file information downloaded from the rems-directory repo is test data not to be representative of real world SPL information. While they are based on the actual SPL Zip from FDA, the files have been modified for the purposes of the prototype and may even be out of date. The data in these files are not intended for medical use.

# Getting Started with REMS Intermediary

To get started, first clone the repository using a method that is most convenient for you. If using git, run the following command:
Expand Down Expand Up @@ -116,4 +118,6 @@ Following are a list of modifiable paths:
| REMS_ADMIN_FHIR_PATH | `http://localhost:8090/4_0_0` | REMS Administrator default base path for the FHIR Server |
| FRONTEND_PORT | `9080` | Port that the frontend server should run on, change if there are conflicts with port usage. |
| BACKEND_API_BASE | `http://localhost:3003` | Base URL for the backend server of the intermediary |
| EHR_URL | `http://localhost:8080/test-ehr/r4` | URL for the EHR System |
| EHR_URL | `http://localhost:8080/test-ehr/r4` | URL for the EHR System |
| DIRECTORY_SERVICE_URL | http://localhost:3323 | The url for the directory server |
| SPL_ZIP_FILE_NAME | TESTDATA_rems_document_and_rems_indexing_spl_files.zip | The file name of the spl zip expected to be downloaded |
94 changes: 83 additions & 11 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"@projecttacoma/node-fhir-server-core": "^2.2.8",
"@types/fhir": "^0.0.35",
"@types/glob": "^8.1.0",
"adm-zip": "^0.5.16",
"axios": "^1.2.1",
"body-parser": "^1.19.0",
"conventional-changelog-cli": "^2.0.34",
Expand All @@ -46,9 +47,11 @@
"uid": "^2.0.1",
"uuid": "^9.0.0",
"winston": "^3.2.1",
"winston-daily-rotate-file": "^4.2.1"
"winston-daily-rotate-file": "^4.2.1",
"xml2js": "^0.6.2"
},
"devDependencies": {
"@types/adm-zip": "^0.5.7",
"@types/chai": "^4.3.4",
"@types/cookie-parser": "^1.4.7",
"@types/cors": "^2.8.12",
Expand All @@ -63,6 +66,7 @@
"@types/nodemon": "^1.19.2",
"@types/sinon": "10.0.13",
"@types/uuid": "^9.0.0",
"@types/xml2js": "^0.4.14",
"@typescript-eslint/eslint-plugin": "^5.45.0",
"@typescript-eslint/parser": "^5.45.0",
"axios-mock-adapter": "^1.21.2",
Expand Down
8 changes: 8 additions & 0 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ export type Config = {
remsAdminHookPath: string | undefined;
remsAdminFhirEtasuPath: string;
ehrUrl: string | undefined;
discoveryBaseUrl: string | undefined;
discoveryApiUrl: string | undefined;
discoverySplZipUrl: string | undefined;
splZipFileName: string;
};
database: {
selected: string;
Expand Down Expand Up @@ -79,7 +83,11 @@ const config: Config = {
level: 'info'
},
general: {
discoveryBaseUrl: env.get('DIRECTORY_SERVICE_URL').asString(),
discoveryApiUrl: env.get('DIRECTORY_API_PATH').asString(),
discoverySplZipUrl: env.get('DIRECTORY_SPL_PATH').asString(),
remsAdminHookPath: env.get('REMS_ADMIN_HOOK_PATH').asString(),
splZipFileName: env.get('SPL_ZIP_FILE_NAME').asString() || 'TESTDATA_rems_document_and_rems_indexing_spl_files.zip',
remsAdminFhirEtasuPath:
env.get('REMS_ADMIN_FHIR_PATH').asString() + '/GuidanceResponse/$rems-etasu',
ehrUrl: env.get('EHR_URL').asString(),
Expand Down
Loading
Loading