Skip to content

Commit 24b92aa

Browse files
authored
Merge pull request #30 from mcode/dev
Dev
2 parents 732b35a + 14a9974 commit 24b92aa

File tree

6 files changed

+51
-47
lines changed

6 files changed

+51
-47
lines changed

EnvironmentVariables.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@
5959
- `REACT_APP_REMS_ADMIN_SERVER_BASE`
6060
- `REACT_APP_REMS_HOOKS_PATH`
6161
- `REACT_APP_SEND_FHIR_AUTH_ENABLED`
62-
- `REACT_APP_SEND_RX_ENABLED`
6362

6463
- mcode/test-ehr
6564

@@ -119,6 +118,7 @@
119118
- `ALLOWED_ORIGIN`
120119
- `AUTH_SOURCE`
121120
- `BACKEND_PORT`
121+
- `EHR_RXFILL_URL`
122122
- `HTTPS_CERT_PATH`
123123
- `HTTPS_KEY_PATH`
124124
- `MONGO_PASSWORD`
@@ -230,7 +230,7 @@
230230
- `REACT_APP_LAUNCH_URL`
231231
- src/containers/Launch.jsx
232232
- `REACT_APP_CLIENT`
233-
- `REACT_APP_CLIENT_SCOPES`
233+
- `REACT_APP_EHR_BASE`
234234
- src/containers/PatientPortal.jsx
235235
- `REACT_APP_EHR_BASE`
236236

@@ -247,6 +247,7 @@
247247
- `USE_HTTPS`
248248
- backend/src/routes/doctorOrders.js
249249
- `REMS_ADMIN_BASE`
250+
- `EHR_RXFILL_URL`
250251
- frontend/src/App.tsx
251252
- `REACT_APP_PIMS_BACKEND_PORT`
252253
- `REACT_APP_PIMS_BACKEND_URL`
@@ -256,7 +257,6 @@
256257
- `REACT_APP_ETASU_STATUS_ENABLED`
257258
- `REACT_APP_PHARMACY_STATUS_ENABLED`
258259
- `REACT_APP_SEND_FHIR_AUTH_ENABLED`
259-
- `REACT_APP_SEND_RX_ENABLED`
260260
- src/views/Patient/MedReqDropDown/rxSend/rxSend.ts
261261
- `REACT_APP_PHARMACY_SERVER_BASE`
262262
- src/views/Patient/MedReqDropDown/pharmacyStatus/PharmacyStatus.tsx
Lines changed: 31 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,40 @@
11
# How to generate a test request
22

3-
1. Access the EHR UI at <http://localhost:3000>. You'll be redirected to <http://localhost:8180>. Authenticate with `alice` as the username and password. You'll then be redirected back to <http://localhost:3000> to play the role of a prescriber.
4-
2. Click **Select a Patient** in upper left.
5-
3. Locate **Jon Snow** in the list of patients and click the "Select a medication request" dropdown.
6-
4. Locate **Turalio 200 MG Oral Capsule (Medication request: 2183126)**.
7-
5. Click **Select** to assign Jon Snow as the medication request recipient.
8-
6. Click **Send Rx to Pharmacy** to dispatch the prescription.
9-
7. Click **Sign Order**, which demonstrates the case where an EHR has CDS Hooks natively.
10-
8. Await the arrival of two **CDS cards**.
11-
9. Click **Patient Enrollment Form** on the returned CDS card titled **Turalio REMS Patient Requirements**.
12-
10. A questionnaire will appear at <http://localhost:4040> in a new tab.
13-
11. Complete and submit the questionnaire via **Submit REMS Bundle**.
14-
- 11a. For demonstrating an asynchronous workflow, partially complete the questionnaire and click **Save to EHR**.
15-
- 11b. Visit the Patient Portal at <http://localhost:3000/#/patient-portal> as the patient.
16-
- 11c. Login with **JonSnow** as the username and **jon** for the password.
17-
- 11d. Select the saved Questionnaire, complete it, and click **Save to EHR**.
18-
- 11e. Return to the EHR UI at <http://localhost:3000>, select the latest saved questionnaire from the second
3+
1. Access the EHR client registration page at <http://localhost:3000>. Click Launch with the default FHIR Server Endpoint, Client ID, and Scope values.
4+
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.
5+
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.
7+
5. Locate **Turalio 200 MG Oral Capsule (Medication request: 2183126)**.
8+
6. Click **Select** to assign Jon Snow as the medication request recipient.
9+
7. Click **Send Rx to Pharmacy** to dispatch the prescription.
10+
8. Click **Sign Order**, which demonstrates the case where an EHR has CDS Hooks natively.
11+
9. Await the arrival of two **CDS cards**.
12+
10. Click **Patient Enrollment Form** on the returned CDS card titled **Turalio REMS Patient Requirements**.
13+
11. A questionnaire will appear at <http://localhost:4040> in a new tab.
14+
12. Complete and submit the questionnaire via **Submit REMS Bundle**.
15+
- 12a. For demonstrating an asynchronous workflow, partially complete the questionnaire and click **Save to EHR**.
16+
- 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.
18+
- 12d. Select the saved Questionnaire, complete it, and click **Save to EHR**.
19+
- 12e. Return to the EHR UI at <http://localhost:3000>, select the latest saved questionnaire from the second
1920
dropdown next to Jon Snow's name, and continue as the prescriber.
20-
- 11f. Click **Launch SMART on FHIR App** and fill out the remainder of the questionnaire, including the prescriber signature, then click **Submit REMS Bundle**.
21-
12. A new UI will appear with REMS Admin Status and Pharmacy Status.
22-
13. Visit the Pharmacy Information Management System at <http://localhost:5050> to play the role of a pharmacist.
23-
14. Click **Doctor Orders** in the top navigation.
24-
15. View the Doctor Order that was sent to the pharmacist from the prescriber and use the **Verify ETASU** button to get
21+
- 12f. Click **Launch SMART on FHIR App** and fill out the remainder of the questionnaire, including the prescriber signature, then click **Submit REMS Bundle**.
22+
13. A new UI will appear with REMS Admin Status and Medication Status.
23+
14. Visit the Pharmacy Information Management System at <http://localhost:5050> to play the role of a pharmacist.
24+
15. Click **Doctor Orders** in the top navigation.
25+
16. View the Doctor Order that was sent to the pharmacist from the prescriber and use the **Verify ETASU** button to get
2526
a status update of the REMS requirements submitted.
26-
16. 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 Jon Snow
2728
from the patient select UI and click **Launch SMART on FHIR App**, which will open the SMART on FHIR App in its own
2829
view and demonstrate the case where an EHR does not have CDS Hooks implemented natively.
29-
17. From the medications dropdown select **Turalio 200 MG Oral Capsule**, which should populate the screen with cards
30-
similar to those seen in step 7.
31-
18. Click **Check ETASU** and **Check Pharmacy** buttons to get status updates on the prescription and REMS request.
32-
19. Use the **Prescriber Enrollment Form** and **Prescriber Knowledge Assessment** links and
33-
repeat steps 9-11 to submit those ETASU requirements and see how the ETASU status changes in both the pharmacist UI
30+
18. From the medications dropdown select **Turalio 200 MG Oral Capsule**, which should populate the screen with cards
31+
similar to those seen in step 9.
32+
19. Click **Check ETASU** and **Check Pharmacy** buttons to get status updates on the prescription and REMS request.
33+
20. Use the **Prescriber Enrollment Form** and **Prescriber Knowledge Assessment** links and
34+
repeat steps 10-12 to submit those ETASU requirements and see how the ETASU status changes in both the pharmacist UI
3435
and prescriber UI.
35-
20. Once all the REMS ETASU are met, return to <http://localhost:5050> as the pharmacist, and click **Verify Order** to move the prescription over to the **Verified Orders** tab. Click on the **Verified Orders** tab and click **Mark as Picked Up** to move the prescription over to the **Picked Up Orders** tab.
36-
21. Return to the SMART on FHIR App launched in step 16, assume the prescriber role, and click **Check Pharmacy** to view the prescription status.
37-
22. Repeat step 19 to submit followup/monitoring requests via the **Patient Status Update Form**, on an as need basis. These forms can be submitted multiple times in the prototype, with each submission appearing as a distinct ETASU element.
36+
21. Once all the REMS ETASU are met, return to <http://localhost:5050> as the pharmacist, and click **Verify Order** to move the prescription over to the **Verified Orders** tab. Click on the **Verified Orders** tab and click **Mark as Picked Up** to move the prescription over to the **Picked Up Orders** tab.
37+
22. Return to the SMART on FHIR App launched in step 17, assume the prescriber role, and click **Check Pharmacy** to view the prescription status.
38+
23. Repeat step 20 to submit followup/monitoring requests via the **Patient Status Update Form**, on an as need basis. These forms can be submitted multiple times in the prototype, with each submission appearing as a distinct ETASU element.
3839

3940
Congratulations! The REMS Integration prototype is fully installed and ready for you to use!

docker-compose-dev.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ services:
105105
environment:
106106
REMS_ADMIN_BASE: http://rems-administrator:8090
107107
MONGO_URL: mongodb://pims_remsadmin_mongo:27017/pims
108+
EHR_RXFILL_URL: http://host.docker.internal:8080/test-ehr/script/rxfill
108109
volumes:
109110
- rems_dev_pims-sync:/home/node/app:nocopy
110111
- rems_dev_pims-nodeModules:/home/node/app/frontend/node_modules

docker-compose-local-build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ services:
8181
environment:
8282
REMS_ADMIN_BASE: http://rems-administrator:8090
8383
MONGO_URL: mongodb://pims_remsadmin_mongo:27017/pims
84+
EHR_RXFILL_URL: http://host.docker.internal:8080/test-ehr/script/rxfill
8485

8586
volumes:
8687
rems_dev_keycloak-data:

docker-compose.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,22 @@ services:
1111
- DB_VENDOR=h2
1212
volumes:
1313
- rems_prod_keycloak-data:/opt/keycloak/data/
14-
image: codexrems/keycloak:0.15
14+
image: codexrems/keycloak:0.16
1515

1616
# Create test-ehr container
1717
test-ehr: # Name of our service
1818
container_name: rems_prod_test-ehr
1919
ports: # Port binding to host from docker container
2020
- '8080:8080' # Bind port 3000 of host to 3000 of container
21-
image: codexrems/test-ehr:0.15
21+
image: codexrems/test-ehr:0.16
2222
environment:
2323
- oauth_token=http://host.docker.internal:8180/realms/ClientFhirServer/protocol/openid-connect/token
2424
extra_hosts:
2525
- "host.docker.internal:host-gateway"
2626

2727
# Create crd request generator container
2828
request-generator: # Name of our service
29-
image: codexrems/request-generator:0.15
29+
image: codexrems/request-generator:0.16
3030
container_name: rems_prod_request-generator
3131
environment:
3232
- REACT_APP_EHR_SERVER_TO_BE_SENT_TO_REMS_ADMIN_FOR_PREFETCH=http://host.docker.internal:8080/test-ehr/r4
@@ -38,14 +38,14 @@ services:
3838

3939
# Create rems-smart-on-fhir container
4040
rems-smart-on-fhir:
41-
image: codexrems/rems-smart-on-fhir:0.15
41+
image: codexrems/rems-smart-on-fhir:0.16
4242
container_name: rems_prod_rems-smart-on-fhir
4343
ports:
4444
- "4040:4040"
4545

4646
# Create rems container
4747
rems-administrator: # Name of our service
48-
image: codexrems/rems-administrator:0.15
48+
image: codexrems/rems-administrator:0.16
4949
container_name: rems_prod_rems
5050
ports: # Port binding to host from docker container
5151
- "8090:8090"
@@ -68,11 +68,12 @@ services:
6868

6969
# Create pims container
7070
pims:
71-
image: codexrems/pims:0.15
71+
image: codexrems/pims:0.16
7272
container_name: rems_prod_pims
7373
environment:
7474
REMS_ADMIN_BASE: http://rems-administrator:8090
7575
MONGO_URL: mongodb://pims_remsadmin_mongo:27017/pims
76+
EHR_RXFILL_URL: http://host.docker.internal:8080/test-ehr/script/rxfill
7677
ports:
7778
- "5050:5050"
7879
- "5051:5051"

tests/useCase1/uc1.spec.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,9 @@ test("UC1: content appears in SMART on FHIR, fill out patient enroll form", asyn
141141
- 12f. Click **Relaunch DTR** and fill out the remainder of the questionnaire, including the prescriber signature,
142142
then click **Submit REMS Bundle**. */
143143

144-
/* 13. A new UI will appear with REMS Admin Status and Pharmacy Status. */
144+
/* 13. A new UI will appear with REMS Admin Status and Medication Status. */
145145
await expect(smartPage.getByRole("heading", { name: "REMS Admin Status" })).toBeVisible();
146-
await expect(smartPage.getByRole("heading", { name: "Pharmacy Status" })).toBeVisible();
146+
await expect(smartPage.getByRole("heading", { name: "Medication Status" })).toBeVisible();
147147

148148
// hit rems admin status button here to see etasu status
149149
await smartPage.getByRole("button", { name: /view etasu/i }).click();
@@ -243,9 +243,9 @@ test("UC1: content appears in SMART on FHIR, fill out patient enroll form", asyn
243243
await page3.waitForLoadState("networkidle");
244244

245245
// TODO: fragile use of class selector
246-
const pharmacyPopup = page3.locator(".MuiBox-root", { hasText: "Pharmacy Status" });
246+
const pharmacyPopup = page3.locator(".MuiBox-root", { hasText: "Medication Status" });
247247

248-
await expect(pharmacyPopup.getByRole("heading", { name: "Pharmacy Status" })).toBeVisible();
248+
await expect(pharmacyPopup.getByRole("heading", { name: "Medication Status" })).toBeVisible();
249249
await expect(pharmacyPopup.getByText("Status: Pending")).toBeVisible();
250250

251251
/** Dismiss the modal */
@@ -338,14 +338,14 @@ test("UC1: content appears in SMART on FHIR, fill out patient enroll form", asyn
338338

339339
/* 22. Go back to the SMART on FHIR App launched in step 17 and play the role of the prescriber using the **Check
340340
Pharmacy** button to see the status change of the prescription. */
341-
// Return to home page and check pharmacy status
341+
// Return to home page and check Medication Status
342342
await page3.getByRole('tab', { name: 'Home' }).click();
343343

344344
await page3.getByRole('button', { name: 'Check Pharmacy' }).click();
345345

346-
const popup = page3.locator(".MuiBox-root", { hasText: "Pharmacy Status" });
346+
const popup = page3.locator(".MuiBox-root", { hasText: "Medication Status" });
347347

348-
await expect(popup.getByRole("heading", { name: "Pharmacy Status" })).toBeVisible();
348+
await expect(popup.getByRole("heading", { name: "Medication Status" })).toBeVisible();
349349
await expect(popup.getByText("Status: Picked Up")).toBeVisible();
350350

351351
/** Dismiss the modal */
@@ -368,7 +368,7 @@ test("UC1: content appears in SMART on FHIR, fill out patient enroll form", asyn
368368
await page3.waitForLoadState("networkidle");
369369

370370
await expect(page3.getByRole("heading", { name: "REMS Admin Status" })).toBeVisible();
371-
await expect(page3.getByRole("heading", { name: "Pharmacy Status" })).toBeVisible();
371+
await expect(page3.getByRole("heading", { name: "Medication Status" })).toBeVisible();
372372

373373
// hit rems admin status button here to see etasu status
374374
await page3.getByRole("button", { name: /view etasu/i }).click();

0 commit comments

Comments
 (0)