From fe02b994427f3f1b30f8a5c025f99826ac8f68f7 Mon Sep 17 00:00:00 2001 From: Sahil Malhotra Date: Mon, 8 Jul 2024 10:54:12 -0400 Subject: [PATCH 1/2] exposed ports for second rems-admin --- Dockerfile | 1 + Dockerfile.dev | 2 ++ 2 files changed, 3 insertions(+) diff --git a/Dockerfile b/Dockerfile index 68f8f448..187824e6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,4 +3,5 @@ WORKDIR /rems-admin COPY --chown=node:node . . RUN npm install EXPOSE 8090 +EXPOSE 8095 CMD npm run start \ No newline at end of file diff --git a/Dockerfile.dev b/Dockerfile.dev index 1e11a5a3..824d3836 100644 --- a/Dockerfile.dev +++ b/Dockerfile.dev @@ -4,4 +4,6 @@ COPY --chown=node:node . . RUN npm install EXPOSE 8090 EXPOSE 8091 +EXPOSE 8095 +EXPOSE 8096 CMD ./dockerRunnerDev.sh \ No newline at end of file From 3da72ba38fd4217eadc9aedb8bcdfc2447a661f1 Mon Sep 17 00:00:00 2001 From: Joyce Quach Date: Thu, 25 Jul 2024 17:52:34 -0400 Subject: [PATCH 2/2] Run prettier and fix typos --- README.md | 69 +++++++++++++++++++++++----------------------- src/rems-cds-hooks | 2 +- 2 files changed, 36 insertions(+), 35 deletions(-) diff --git a/README.md b/README.md index a557bcc2..99ceda47 100644 --- a/README.md +++ b/README.md @@ -4,13 +4,14 @@ The [REMS](https://www.fda.gov/drugs/drug-safety-and-availability/risk-evaluatio # Getting Started with REMS Administrator -To get started, first clone the repository using a method that is most convenient for you. If using git, run the following command: +To get started, first clone the repository using a method that is most convenient for you. If using git, run the following command: `git clone https://github.com/mcode/rems-admin.git` The following technologies must be installed on your computer to continue: -* [NPM](https://www.npmjs.com/) -* [Node](https://nodejs.org/en) + +- [NPM](https://www.npmjs.com/) +- [Node](https://nodejs.org/en) ## Initialization @@ -51,26 +52,26 @@ The REMS Admin interacts with the [Request Generator](https://github.com/mcode/r Typically, a CDS Hook will be sent from the EHR to the REMS Admin, which will respond with cards that contain information about next steps. These cards may contain a link to a SMART app. Clicking on these links in the Request Generator or REMS SMART on FHIR App acting as the EHR will launch the SMART app automatically. These links will contain information on the requirements that must be met for the REMS program. This includes forms for registration and acknowledgement of the risks involved. -The FHIR server built into the REMS Admin can be queried for the questionnaire package at the Questionnaire/$questionnaire-package endpoint. This will return a FHIR Bundle with the FHIR Questionnaire and all other FHIR Resources including CQL Libraries embedded within FHIR Libraries. The FHIR Server also contains a REMS ETASU check at the GuidanceResponse/$rems-etasu endpoint. This will return a FHIR Parameter containing a GuidanceResponse with the status of the ETATSU and nested GuidanceResponse for each requirement. +The FHIR server built into the REMS Admin can be queried for the questionnaire package at the Questionnaire/$questionnaire-package endpoint. This will return a FHIR Bundle with the FHIR Questionnaire and all other FHIR Resources including CQL Libraries embedded within FHIR Libraries. The FHIR Server also contains a REMS ETASU check at the GuidanceResponse/$rems-etasu endpoint. This will return a FHIR Parameter containing a GuidanceResponse with the status of the ETASU and nested GuidanceResponse for each requirement. ## Routes -* `/cds-services` - The base CDS Hooks Discovery endpoint that serves a list of supported hooks/services in JSON. -* `/cds-services/rems-order-sign` - The CDS Hooks endpoint for order-sign -* `/cds-services/rems-order-select` - The CDS Hooks endpoint for order-select -* `/cds-services/rems-patient-view` - The CDS Hooks endpoint for patient-view -* `/cds-services/rems-encounter-start` - The CDS Hooks endpoint for encounter-start -* `/4_0_0 - The base of the FHIR Server -* `/4_0_0/GuidanceResponse/$rems-etasu` - The endpoint for FHIR Operation used for checking the ETASU status - * Input requires a parameter containing the following: - * `patient` - Patient FHIR Resource, must include `medication` with `patient` - * `medication` - Medication or MedicationRequest FHIR Resource, must include `patient` with `medication` - * `authNumber` - String containing the REMS Authorization Number, may be sent without `patient` or `medication` - * Returns a GuidanceResponse within a Parameter with the status - * Contains Nested GuidanceResponse resources for each ETASU requirement with their status -* `/4_0_0/Questionnaire/\/$questionnaire-package` - The endpoint for the FHIR Operation used for retrieving the Questionnaire package for a given form - * Example: /4_0_0/Questionnaire/TIRFRemsPatientEnrollment/$questionnaire-package - * This includes the Questionnaire and any other necessary FHIR resources needed for loading the quesetionnaire form with the REMS SMART on FHIR app +- `/cds-services` - The base CDS Hooks Discovery endpoint that serves a list of supported hooks/services in JSON. +- `/cds-services/rems-order-sign` - The CDS Hooks endpoint for order-sign +- `/cds-services/rems-order-select` - The CDS Hooks endpoint for order-select +- `/cds-services/rems-patient-view` - The CDS Hooks endpoint for patient-view +- `/cds-services/rems-encounter-start` - The CDS Hooks endpoint for encounter-start +- `/4_0_0 - The base of the FHIR Server +- `/4_0_0/GuidanceResponse/$rems-etasu` - The endpoint for FHIR Operation used for checking the ETASU status + - Input requires a parameter containing the following: + - `patient` - Patient FHIR Resource, must include `medication` with `patient` + - `medication` - Medication or MedicationRequest FHIR Resource, must include `patient` with `medication` + - `authNumber` - String containing the REMS Authorization Number, may be sent without `patient` or `medication` + - Returns a GuidanceResponse within a Parameter with the status + - Contains Nested GuidanceResponse resources for each ETASU requirement with their status +- `/4_0_0/Questionnaire/\/$questionnaire-package` - The endpoint for the FHIR Operation used for retrieving the Questionnaire package for a given form + - Example: /4_0_0/Questionnaire/TIRFRemsPatientEnrollment/$questionnaire-package + - This includes the Questionnaire and any other necessary FHIR resources needed for loading the questionnaire form with the REMS SMART on FHIR app ## Environment Variables @@ -83,17 +84,17 @@ a) `REACT_APP_LAUNCH_URL=http://example.com PORT=6000 npm start` or b) by specif Following are a list of modifiable paths: -| URI Name | Default | Description | -| --------------- | ------------------------------------------ | ------------------------------------------------------------------------------------------------------| -| AUTH_SERVER_URI | `http://localhost:8090` | The base url of the auth server, currently set to the base url of this app. | -| HTTPS_CERT_PATH | `server.cert` | Path to a certificate for encryption, allowing HTTPS. Unnecessary if using HTTP. | -| HTTPS_KEY_PATH | `server.key` | Path to a key for encryption, allowing HTTPS. Unnecessary if using HTTP. | -| LOGGING_LEVEL | `debug` | Amount to output in the log, can be changed to verbose, info, warn, or error. | -| MONGO_DB_NAME | `remsadmin` | Name of the database table being used. Should be changed if not using the Mongo instructions above. | -| MONGO_URL | `mongodb://rems-user:pass@127.0.0.1:27017` | URL for the connection to the database, should be changed if not using the Mongo instructions above. | -| PORT | `8090` | Port that this server should run on, change if there are conflicts with port usage. | -| RESOURCE_SERVER | `http://localhost:8090` | Base URL of this server, should match with port. | -| SMART_ENDPOINT | `http://localhost:4040/launch` | Launch URL of associated SMART app, should be changed if not using the REMS Smart App. | -| 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. | +| URI Name | Default | Description | +| --------------- | ------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------- | +| AUTH_SERVER_URI | `http://localhost:8090` | The base url of the auth server, currently set to the base url of this app. | +| HTTPS_CERT_PATH | `server.cert` | Path to a certificate for encryption, allowing HTTPS. Unnecessary if using HTTP. | +| HTTPS_KEY_PATH | `server.key` | Path to a key for encryption, allowing HTTPS. Unnecessary if using HTTP. | +| LOGGING_LEVEL | `debug` | Amount to output in the log, can be changed to verbose, info, warn, or error. | +| MONGO_DB_NAME | `remsadmin` | Name of the database table being used. Should be changed if not using the Mongo instructions above. | +| MONGO_URL | `mongodb://rems-user:pass@127.0.0.1:27017` | URL for the connection to the database, should be changed if not using the Mongo instructions above. | +| PORT | `8090` | Port that this server should run on, change if there are conflicts with port usage. | +| RESOURCE_SERVER | `http://localhost:8090` | Base URL of this server, should match with port. | +| SMART_ENDPOINT | `http://localhost:4040/launch` | Launch URL of associated SMART app, should be changed if not using the REMS Smart App. | +| 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. | diff --git a/src/rems-cds-hooks b/src/rems-cds-hooks index 9c11899c..8458dc2a 160000 --- a/src/rems-cds-hooks +++ b/src/rems-cds-hooks @@ -1 +1 @@ -Subproject commit 9c11899cace14e71aa9e5da21eb61e05c35b3e60 +Subproject commit 8458dc2a9199d2be3eb4ad6c98bdff4247266c1f