Skip to content

Commit d19b578

Browse files
authored
Merge pull request #93 from mcode/dev
Dev
2 parents 45f0df2 + caeb65f commit d19b578

9 files changed

Lines changed: 61 additions & 25 deletions

EnvironmentVariables.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@
4646
- `VSAC_API_KEY`
4747
- `WHITELIST`
4848
- `SERVER_NAME`
49+
- `VITE_REALM`
50+
- `VITE_AUTH`
51+
- `VITE_CLIENT`
52+
- `VITE_SCOPE_ID`
4953

5054
- mcode/rems-smart-on-fhir
5155

@@ -122,6 +126,12 @@
122126
- `VITE_USER`
123127
- `VITE_USE_INTERMEDIARY`
124128
- `VITE_INTERMEDIARY`
129+
- `HTTPS`
130+
- `HTTPS_CERT_PATH`
131+
- `HTTPS_KEY_PATH`
132+
- `VITE_HOOK_TO_SEND`
133+
- `VITE_URL_FILTER`
134+
- `VITE_DISABLE_MEDICATION_STATUS`
125135

126136
- mcode/pims
127137
- backend/env.json
@@ -137,6 +147,7 @@
137147
- `MONGO_USERNAME`
138148
- `USE_HTTPS`
139149
- `USE_INTERMEDIARY`
150+
- `REMS_ADMIN_NCPDP`
140151
- frontend/.env
141152
- `PORT`
142153
- `REACT_APP_PIMS_BACKEND_PORT`
@@ -162,6 +173,12 @@
162173
- `VITE_CLIENT`
163174
- `REMS_ADMIN_HOOK_PATH`
164175
- `REMS_ADMIN_FHIR_PATH`
176+
- `SMART_ENDPOINT`
177+
- `FRONTEND_VITE_AUTH`
178+
- `VITE_SCOPE_ID`
179+
- `DIRECTORY_API_PATH`
180+
- `DIRECTORY_SPL_PATH`
181+
- `NCPDP_SCRIPT_FORWARD_URL`
165182

166183
## Repositories that use environment variables
167184

@@ -193,6 +210,11 @@
193210
- `HTTPS_CERT_PATH`
194211
- `HTTPS_KEY_PATH`
195212
- `USE_HTTPS`
213+
- frontend/src/views/Login.tsx
214+
- `VITE_REALM`
215+
- `VITE_AUTH`
216+
- `VITE_CLIENT`
217+
- `VITE_SCOPE_ID`
196218

197219
- mcode/test-ehr
198220

@@ -231,6 +253,9 @@
231253
- `VITE_CLIENT_SCOPES`
232254
- `VITE_SMART_LAUNCH_URL`
233255
- `VITE_URL_FILTER`
256+
- `VITE_HOOK_TO_SEND`
257+
- `VITE_URL_FILTER`
258+
- `VITE_DISABLE_MEDICATION_STATUS`
234259
- src/util/auth.js
235260
- `VITE_AUTH`
236261
- `VITE_CLIENT`
@@ -274,6 +299,7 @@
274299
- frontend/src/App.tsx
275300
- `REACT_APP_PIMS_BACKEND_PORT`
276301
- `REACT_APP_PIMS_BACKEND_URL`
302+
- `REMS_ADMIN_NCPDP`
277303

278304
- mcode/rems-smart-on-fhir
279305
- src/views/Patient/MedReqDropDown/MedReqDropDown.tsx
@@ -311,6 +337,12 @@
311337
- `WHITELIST`
312338
- `REMS_ADMIN_HOOK_PATH`
313339
- `REMS_ADMIN_FHIR_PATH`
340+
- `SMART_ENDPOINT`
341+
- `FRONTEND_VITE_AUTH`
342+
- `VITE_SCOPE_ID`
343+
- `DIRECTORY_API_PATH`
344+
- `DIRECTORY_SPL_PATH`
345+
- `NCPDP_SCRIPT_FORWARD_URL`
314346
- src/server.ts
315347
- `HTTPS_CERT_PATH`
316348
- `HTTPS_KEY_PATH`

REMS.code-workspace

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@
275275
"janedoe",
276276
"jdbc",
277277
"jimpims",
278-
"jonsnow",
278+
"johnsnow",
279279
"jpaserver",
280280
"jsrsasign",
281281
"jwks",
@@ -465,8 +465,8 @@
465465
"webAuthnPolicyPasswordlessRpId",
466466
"webAuthnPolicyPasswordlessSignatureAlgorithms",
467467
"webAuthnPolicyPasswordlessUserVerificationRequirement",
468-
"Westeros",
469-
"Winterfell",
468+
"MA",
469+
"Boston",
470470
"Wiseman",
471471
"zoneinfo"
472472
],

TestEnvironmentSetup.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ The notes here describe one method for launching the Request Generator and REMS
3434
![](./test-environment-images/meld_import_resource.png)
3535
- Navigate to the folder that the test-ehr is downloaded to and choose the fhirResourcesToLoad folder
3636
- Individually select and upload each FHIR resource
37-
- Note: you can skip the rems_smith* files if you only want the Jon Snow Patient
37+
- Note: you can skip the rems_smith* files if you only want the John Snow Patient
3838
![](./test-environment-images/meld_import_resource_done.png)
3939
1. Register the REMS SMART on FHIR application
4040
- Navigate to the 'Apps' section of MELD
@@ -83,7 +83,7 @@ The notes here describe one method for launching the Request Generator and REMS
8383
![](./test-environment-images/meld_login.png)
8484
- Select 'Authorize' to give the app permission to access the FHIR data within your MELD Sandbox
8585
![](./test-environment-images/request_generator_permissions.png)
86-
- Continue using Request Generator as normal with patient Jon Snow
86+
- Continue using Request Generator as normal with patient John Snow
8787
1. Launch the SMART on FHIR App
8888
- From within the Request Generator, after a patient is selected, click on 'LAUNCH SMART ON FHIR APP'
8989
![](./test-environment-images/request_generator.png)

TestEnvironmentUsage.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,19 @@ After registering an app, we get a client id, which is the client id of the SMAR
1818
The SMART app must be made aware of the client id in order to launch correctly. In the case of the REMS SMART app, registration is handled at the time of launch if the app doesn’t already know which client id to use, which should make the process seamless.
1919

2020
When launching an app, you are connecting it to Meld’s EHR system.
21-
The data can be uploaded manually using the data manager as described in the [Test Environment Usage Document](TestEnvironmentSetup.md). Our default patient, Jon Snow, and all of his related resources should be loaded
21+
The data can be uploaded manually using the data manager as described in the [Test Environment Usage Document](TestEnvironmentSetup.md). Our default patient, John Snow, and all of his related resources should be loaded
2222

2323
![](./test-environment-images/meld_patients.png)
2424

25-
For most purposes, Jon Snow will work just fine as our default patient.
25+
For most purposes, John Snow will work just fine as our default patient.
2626

2727
![](./test-environment-images/meld_personas.png)
2828

29-
When launching any app, Meld will ask you to select a persona. Jon Snow’s resources all reference Rita Abrams, so ideally pick her as the practitioner when launching the REMS SMART app or request generator.
29+
When launching any app, Meld will ask you to select a persona. John Snow’s resources all reference Rita Abrams, so ideally pick her as the practitioner when launching the REMS SMART app or request generator.
3030

3131
![](./test-environment-images/meld_patients_launch.png)
3232

33-
After selecting a practitioner, you can select a patient. Selecting Jon Snow will properly allow the REMS SMART on FHIR app to function. If you are launching the Request Generator, you can launch without a patient.
33+
After selecting a practitioner, you can select a patient. Selecting John Snow will properly allow the REMS SMART on FHIR app to function. If you are launching the Request Generator, you can launch without a patient.
3434

3535
![](./test-environment-images/registration.png)
3636

Verify-REMS-Integration-Prototype-Works.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
1. Access the EHR gateway at <http://localhost:3000>. Click Launch with the default FHIR Server Endpoint, Client ID, and Scope values.
44
2. You'll be redirected to <http://localhost:8180>. Authenticate with `alice` as the username and password. You'll then be redirected back to the EHR UI at <http://localhost:3000> to play the role of a prescriber.
55
3. Click **Select a Patient** in the middle of the page.
6-
4. Locate **Jon Snow** in the list of patients and click the "Select a medication request" dropdown.
6+
4. Locate **John Snow** in the list of patients and click the "Select a medication request" dropdown.
77
5. Locate **Turalio 200 MG Oral Capsule (Medication request: 2183126)**.
8-
6. Click **Select** to assign Jon Snow as the medication request recipient.
8+
6. Click **Select** to assign John Snow as the medication request recipient.
99
7. Click **Send Rx to Pharmacy** to dispatch the prescription.
1010
8. Click **Sign Order**, which demonstrates the case where an EHR has CDS Hooks natively.
1111
9. Await the arrival of two **CDS cards**.
@@ -14,17 +14,17 @@
1414
12. Complete and submit the questionnaire via **Submit REMS Bundle**.
1515
- 12a. For demonstrating an asynchronous workflow, partially complete the questionnaire and click **Save to EHR**.
1616
- 12b. Visit the Patient Portal at <http://localhost:3000/#/patient-portal> as the patient.
17-
- 12c. Login with **JonSnow** as the username and **jon** for the password.
17+
- 12c. Login with **johnsnow** as the username and **john** for the password.
1818
- 12d. Select the saved Questionnaire, complete it, and click **Save to EHR**.
1919
- 12e. Return to the EHR UI at <http://localhost:3000>, select the latest saved questionnaire from the second
20-
dropdown next to Jon Snow's name, and continue as the prescriber.
20+
dropdown next to John Snow's name, and continue as the prescriber.
2121
- 12f. Click **Launch SMART on FHIR App** and fill out the remainder of the questionnaire, including the prescriber signature, then click **Submit REMS Bundle**.
2222
13. A new UI will appear with REMS Admin Status and Medication Status.
2323
14. Visit the Pharmacy Information Management System at <http://localhost:5050> to play the role of a pharmacist.
2424
15. Click **Doctor Orders** in the top navigation.
2525
16. View the Doctor Order that was sent to the pharmacist from the prescriber and use the **Verify ETASU** button to get
2626
a status update of the REMS requirements submitted.
27-
17. Return to the EHR UI at <http://localhost:3000> and play the role of the prescriber again. Select patient Jon Snow
27+
17. Return to the EHR UI at <http://localhost:3000> and play the role of the prescriber again. Select patient John Snow
2828
from the patient select UI and click **Launch SMART on FHIR App**, which will open the SMART on FHIR App in its own
2929
view and demonstrate the case where an EHR does not have CDS Hooks implemented natively.
3030
18. From the medications dropdown select **Turalio 200 MG Oral Capsule**, which should populate the screen with cards

docker-compose-dev.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ services:
120120
VSAC_API_KEY: ${VSAC_API_KEY}
121121
MONGO_URL: mongodb://rems-user:pass@pims_remsadmin_mongo:27017
122122
SERVER_NAME: 'CodeX REMS Administrator Prototype #1'
123+
DOCKERED_EHR_CONTAINER_NAME: 'test-ehr'
123124
volumes:
124125
- rems_dev_rems-admin-sync:/rems-admin:nocopy # nocopy is important
125126
- rems_dev_rems-admin-nodeModules:/rems-admin/node_modules
@@ -149,6 +150,7 @@ services:
149150
FRONTEND_PORT: 9095
150151
AUTH_SERVER_URI: 'http://localhost:8095'
151152
RESOURCE_SERVER: 'http://localhost:8095/'
153+
DOCKERED_EHR_CONTAINER_NAME: 'test-ehr'
152154
volumes:
153155
- rems_dev_rems-admin2-sync:/rems-admin2:nocopy # nocopy is important
154156
- rems_dev_rems-admin2-nodeModules:/rems-admin2/node_modules
@@ -157,7 +159,6 @@ services:
157159
pims_remsadmin_mongo:
158160
condition: service_healthy
159161

160-
161162
pims:
162163
build:
163164
context: ../pims
@@ -169,7 +170,7 @@ services:
169170
environment:
170171
REMS_ADMIN_FHIR_URL: http://rems-administrator:8090/4_0_0
171172
MONGO_URL: mongodb://pims_remsadmin_mongo:27017/pims
172-
EHR_RXFILL_URL: http://host.docker.internal:8080/test-ehr/ncpdp/script
173+
EHR_RXFILL_URL: http://test-ehr:8080/test-ehr/ncpdp/script
173174
INTERMEDIARY_FHIR_URL: http://rems-intermediary:3003/4_0_0
174175
REMS_ADMIN_NCPDP: http://rems-administrator:8090/ncpdp/script
175176
volumes:
@@ -181,7 +182,6 @@ services:
181182
pims_remsadmin_mongo:
182183
condition: service_healthy
183184

184-
185185
rems-intermediary:
186186
build:
187187
context: '../rems-intermediary'

docker-compose-local-build.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ services:
9797
VSAC_API_KEY: ${VSAC_API_KEY}
9898
MONGO_URL: mongodb://rems-user:pass@pims_remsadmin_mongo:27017
9999
SERVER_NAME: 'CodeX REMS Administrator Prototype #1'
100+
DOCKERED_EHR_CONTAINER_NAME: 'test-ehr'
100101
depends_on:
101102
pims_remsadmin_mongo:
102103
condition: service_healthy
@@ -121,6 +122,7 @@ services:
121122
FRONTEND_PORT: 9095
122123
AUTH_SERVER_URI: 'http://localhost:8095'
123124
RESOURCE_SERVER: 'http://localhost:8095/'
125+
DOCKERED_EHR_CONTAINER_NAME: 'test-ehr'
124126
depends_on:
125127
pims_remsadmin_mongo:
126128
condition: service_healthy
@@ -135,7 +137,7 @@ services:
135137
environment:
136138
REMS_ADMIN_FHIR_URL: http://rems-administrator:8090/4_0_0
137139
MONGO_URL: mongodb://pims_remsadmin_mongo:27017/pims
138-
EHR_RXFILL_URL: http://host.docker.internal:8080/test-ehr/ncpdp/script
140+
EHR_RXFILL_URL: http://test-ehr:8080/test-ehr/ncpdp/script
139141
INTERMEDIARY_FHIR_URL: http://rems-intermediary:3003/4_0_0
140142
REMS_ADMIN_NCPDP: http://rems-administrator:8090/ncpdp/script
141143
depends_on:

docker-compose.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ services:
6767
VSAC_API_KEY: ${VSAC_API_KEY}
6868
MONGO_URL: mongodb://rems-user:pass@pims_remsadmin_mongo:27017
6969
SERVER_NAME: 'CodeX REMS Administrator Prototype #1'
70+
DOCKERED_EHR_CONTAINER_NAME: 'test-ehr'
7071
depends_on:
7172
pims_remsadmin_mongo:
7273
condition: service_healthy
@@ -86,6 +87,7 @@ services:
8687
FRONTEND_PORT: 9095
8788
AUTH_SERVER_URI: 'http://localhost:8095'
8889
RESOURCE_SERVER: 'http://localhost:8095/'
90+
DOCKERED_EHR_CONTAINER_NAME: 'test-ehr'
8991
depends_on:
9092
pims_remsadmin_mongo:
9193
condition: service_healthy
@@ -117,7 +119,7 @@ services:
117119
environment:
118120
REMS_ADMIN_FHIR_URL: http://rems-administrator:8090/4_0_0
119121
MONGO_URL: mongodb://pims_remsadmin_mongo:27017/pims
120-
EHR_RXFILL_URL: http://host.docker.internal:8080/test-ehr/ncpdp/script
122+
EHR_RXFILL_URL: http://test-ehr:8080/test-ehr/ncpdp/script
121123
INTERMEDIARY_FHIR_URL: http://rems-intermediary:3003/4_0_0
122124
ports:
123125
- "5050:5050"

tests/useCase1/uc1.spec.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { testUtilFillOutForm } from "../util/fillOutForm";
1212
import { testUtilKeycloakLogin } from "../util/keycloakLogin";
1313

1414
/* Ideally these would be sourced from the testing environment, but constants are fine too. */
15-
const patientName = "Jon Snow";
15+
const patientName = "John Snow";
1616
const medication = "Turalio";
1717

1818
// test.slow();
@@ -46,7 +46,7 @@ test("UC1: content appears in SMART on FHIR, fill out patient enroll form", asyn
4646
await searchField.fill(patientName);
4747
await page.getByRole('option', { name: patientName }).click();
4848

49-
// 3. Find **Jon Snow** in the list of patients and click the first dropdown menu next to his name.
49+
// 3. Find **John Snow** in the list of patients and click the first dropdown menu next to his name.
5050
await expect(page.getByText("ID").first()).toBeVisible();
5151
await page.getByRole('button', { name: 'Request New Medication' }).click();
5252

@@ -134,11 +134,11 @@ test("UC1: content appears in SMART on FHIR, fill out patient enroll form", asyn
134134
/*
135135
- 12a. Alternatively fill out only some of the questionnaire for an asynchronous workflow and hit **Save to EHR**.
136136
- 12b. Visit the Patient Portal at <http://localhost:3000/patient-portal> and lay the role of the patient.
137-
- 12c. Login to the Patient Portal, use **JonSnow** for the username and **jon** for the password.
137+
- 12c. Login to the Patient Portal, use **JohnSnow** for the username and **john** for the password.
138138
- 12d. Select the saved Questionnaire and fill out the rest of the questionnaire as well as the patient signature in
139139
the questionnaire and hit **Save to EHR** again.
140140
- 12e. Go back to the EHR UI at <http://localhost:3000> and select the latest saved questionnaire from the second
141-
dropdown next to Jon Snow's name and continue in the role of the prescriber.
141+
dropdown next to John Snow's name and continue in the role of the prescriber.
142142
- 12f. Click **Relaunch DTR** and fill out the remainder of the questionnaire, including the prescriber signature,
143143
then click **Submit REMS Bundle**. */
144144

@@ -184,7 +184,7 @@ test("UC1: content appears in SMART on FHIR, fill out patient enroll form", asyn
184184
* label the table columns, so the alternative is something fragile to changes in the order of cells. */
185185
await expect(pharmacyMedCard.getByText("Pending")).toBeVisible();
186186

187-
/* 17. Go Back to the EHR UI at <http://localhost:3000> and play the role of the prescriber again, select patient Jon Snow
187+
/* 17. Go Back to the EHR UI at <http://localhost:3000> and play the role of the prescriber again, select patient John Snow
188188
from the patient select UI.*/
189189

190190
// Back to CRD App on :3000
@@ -196,7 +196,7 @@ test("UC1: content appears in SMART on FHIR, fill out patient enroll form", asyn
196196
await searchField2.fill(patientName);
197197
await page.getByRole('option', { name: patientName }).click();
198198

199-
// Find **Jon Snow** in the list of patients and click the first dropdown menu next to his name.
199+
// Find **John Snow** in the list of patients and click the first dropdown menu next to his name.
200200
await expect(page.getByText("ID").first()).toBeVisible();
201201
await page.getByRole('button', { name: 'Request New Medication' }).click();
202202

0 commit comments

Comments
 (0)