Skip to content

Commit 9a44c8b

Browse files
authored
Merge pull request #29 from mcode/spl-lookup
Spl-lookup
2 parents 9298550 + 545b62a commit 9a44c8b

8 files changed

Lines changed: 580 additions & 27 deletions

File tree

.env

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,9 @@ REMS_ADMIN_HOOK_PATH=http://localhost:8090/cds-services/rems-
1919
REMS_ADMIN_FHIR_PATH=http://localhost:8090/4_0_0
2020
FRONTEND_PORT = 9080
2121
BACKEND_API_BASE = http://localhost:3003
22-
EHR_URL = http://localhost:8080/test-ehr/r4
22+
EHR_URL = http://localhost:8080/test-ehr/r4
23+
DIRECTORY_SERVICE_URL=http://localhost:3323
24+
DIRECTORY_API_PATH = /drug/ndc.json
25+
DIRECTORY_SPL_PATH = /drugs/spl.zip
26+
SPL_ZIP_FILE_NAME=TESTDATA_rems_document_and_rems_indexing_spl_files.zip
27+

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,5 @@ yarn-error.log*
3939
next-env.d.ts
4040

4141
.vscode/*
42+
43+
/rems-spl-files

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Description
22
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.
33

4+
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.
5+
46
# Getting Started with REMS Intermediary
57

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

package-lock.json

Lines changed: 83 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
"@projecttacoma/node-fhir-server-core": "^2.2.8",
2828
"@types/fhir": "^0.0.35",
2929
"@types/glob": "^8.1.0",
30+
"adm-zip": "^0.5.16",
3031
"axios": "^1.2.1",
3132
"body-parser": "^1.19.0",
3233
"conventional-changelog-cli": "^2.0.34",
@@ -46,9 +47,11 @@
4647
"uid": "^2.0.1",
4748
"uuid": "^9.0.0",
4849
"winston": "^3.2.1",
49-
"winston-daily-rotate-file": "^4.2.1"
50+
"winston-daily-rotate-file": "^4.2.1",
51+
"xml2js": "^0.6.2"
5052
},
5153
"devDependencies": {
54+
"@types/adm-zip": "^0.5.7",
5255
"@types/chai": "^4.3.4",
5356
"@types/cookie-parser": "^1.4.7",
5457
"@types/cors": "^2.8.12",
@@ -63,6 +66,7 @@
6366
"@types/nodemon": "^1.19.2",
6467
"@types/sinon": "10.0.13",
6568
"@types/uuid": "^9.0.0",
69+
"@types/xml2js": "^0.4.14",
6670
"@typescript-eslint/eslint-plugin": "^5.45.0",
6771
"@typescript-eslint/parser": "^5.45.0",
6872
"axios-mock-adapter": "^1.21.2",

src/config.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ export type Config = {
2424
remsAdminHookPath: string | undefined;
2525
remsAdminFhirEtasuPath: string;
2626
ehrUrl: string | undefined;
27+
discoveryBaseUrl: string | undefined;
28+
discoveryApiUrl: string | undefined;
29+
discoverySplZipUrl: string | undefined;
30+
splZipFileName: string;
2731
};
2832
database: {
2933
selected: string;
@@ -79,7 +83,11 @@ const config: Config = {
7983
level: 'info'
8084
},
8185
general: {
86+
discoveryBaseUrl: env.get('DIRECTORY_SERVICE_URL').asString(),
87+
discoveryApiUrl: env.get('DIRECTORY_API_PATH').asString(),
88+
discoverySplZipUrl: env.get('DIRECTORY_SPL_PATH').asString(),
8289
remsAdminHookPath: env.get('REMS_ADMIN_HOOK_PATH').asString(),
90+
splZipFileName: env.get('SPL_ZIP_FILE_NAME').asString() || 'TESTDATA_rems_document_and_rems_indexing_spl_files.zip',
8391
remsAdminFhirEtasuPath:
8492
env.get('REMS_ADMIN_FHIR_PATH').asString() + '/GuidanceResponse/$rems-etasu',
8593
ehrUrl: env.get('EHR_URL').asString(),

0 commit comments

Comments
 (0)