Skip to content
Merged
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
30 changes: 26 additions & 4 deletions DeveloperSetupGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,14 +199,14 @@ The Docker Extension for VsCode has useful functionality to aid in the developme
The MongoDB Extension allows for connecting to the pharmacy information system's backend database by inputting the following connection string: `mongodb://pharmacy-information-root:pharmacy-information-password@localhost:27017/?retryWrites=true&w=majority`. For more information on this extension see: https://marketplace.visualstudio.com/items?itemName=mongodb.mongodb-vscode


### Add VSAC credentials to your development environment
### Add VSAC credentials to your development environment

> At this point, you should have credentials to access VSAC. If not, please refer to [Prerequisites](#prerequisites) for how to create these credentials and return here after you have confirmed you can access VSAC.
> To download the full ValueSets, your VSAC account will need to be added to the CMS-DRLS author group on https://vsac.nlm.nih.gov/. You will need to request membership access from an admin. Please reach out to Sahil Malhotra at smalhotra@mitre.org in order to request access to the CMS-DRLS author group. If this is not configured, you will get `org.hl7.davinci.endpoint.vsac.errors.VSACValueSetNotFoundException: ValueSet 2.16.840.1.113762.1.4.1219.62 Not Found` errors.

> While this step is optional, we **highly recommend** that you do it so that DRLS will have the ability to dynamically load value sets from VSAC.

You can see a list of your pre-existing environment variables on your Mac by running `env` in your Terminal. To add to `env`:
You can see a list of your pre-existing environment variables on your machine by running `env` in your Terminal. To add to `env`:
1. Set "VSAC_API_KEY" in the .env file in the REMS Repository

or
Expand All @@ -226,9 +226,31 @@ You can see a list of your pre-existing environment variables on your Mac by run
Note: How you set environment and path variables may vary depending on your operating system and terminal used. See [Setting Environment Variables and System Path](#setting-environment-variables-and-system-path) for more information.


### Add Compose Project Name
### Add EHR profile to your development environment

You can see a list of your pre-existing environment variables on your Mac by running `env` in your Terminal. To add to `env`:
You can see a list of your pre-existing environment variables on your machine by running `env` in your Terminal. To add to `env`:
1. Set "TEST_EHR_PROFILE" as "docker-linux" in the .env file in the REMS Repository if running on linux/mac and set "TEST_EHR_PROFILE" as "docker-windows" if running on windows

or

1. `cd ~/`
2. Open `.bash_profile` and add the following lines at the very bottom:
```bash
export TEST_EHR_PROFILE=docker-linux # if running on a mac or linux machine

export TEST_EHR_PROFILE=docker-windows # if running on a windows machine
```
3. Save `.bash_profile` and complete the update to `env`:
```bash
source .bash_profile
```

Note: How you set environment and path variables may vary depending on your operating system and terminal used. See [Setting Environment Variables and System Path](#setting-environment-variables-and-system-path) for more information.


### Add Compose Project Name to your development environment

You can see a list of your pre-existing environment variables on your machine by running `env` in your Terminal. To add to `env`:
1. Set "COMPOSE_PROJECT_NAME" as "rems_dev" in the .env file in the REMS Repository

or
Expand Down
84 changes: 73 additions & 11 deletions SimpleSetupGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,24 +56,86 @@ Your computer must have these minimum requirements:
- [Git installed](https://www.atlassian.com/git/tutorials/install-git)
- Use git to clone or download and extract the zip of the [REMS repository](https://github.com/mcode/REMS.git) - in your terminal navigate to the REMS repo folder.
- Before running, setup environment with VSAC credentials (see [setting environment variables section](#setting-environment-variables) for help)

> At this point, you should have credentials to access VSAC. If not, please refer to [Prerequisites](#prerequisites) for how to create these credentials and return here after you have confirmed you can access VSAC.
> To download the full ValueSets, your VSAC account will need to be added to the CMS-DRLS author group on https://vsac.nlm.nih.gov/. You will need to request membership access from an admin. Please reach out to Sahil Malhotra at smalhotra@mitre.org in order to request access to the CMS-DRLS author group. If this is not configured, you will get `org.hl7.davinci.endpoint.vsac.errors.VSACValueSetNotFoundException: ValueSet 2.16.840.1.113762.1.4.1219.62 Not Found` errors.

> While this step is optional, we **highly recommend** that you do it so that DRLS will have the ability to dynamically load value sets from VSAC.

You can see a list of your pre-existing environment variables on your machine by running `env` in your Terminal. To add to `env`:
1. Set "VSAC_API_KEY" in the .env file in the REMS Repository

or

1. `cd ~/`
2. Open `.bash_profile` and add the following lines at the very bottom:
```bash
export VSAC_API_KEY=vsac_api_key
```
3. Save `.bash_profile` and complete the update to `env`:
```bash
source .bash_profile
```

> Be aware that if you have chosen to skip this step, you will be required to manually provide your VSAC credentials at http://localhost:8090/data and hit **Reload Data** every time you want DRLS to use new or updated value sets.

Note: How you set environment and path variables may vary depending on your operating system and terminal used. See [setting environment variables section](#setting-environment-variables) for more information.

- Add Test-EHR profile to your environment

You can see a list of your pre-existing environment variables on your machine by running `env` in your Terminal. To add to `env`:
1. Set "TEST_EHR_PROFILE" as "docker-linux" in the .env file in the REMS Repository if running on linux/mac and set "TEST_EHR_PROFILE" as "docker-windows" if running on windows

or

1. `cd ~/`
2. Open `.bash_profile` and add the following lines at the very bottom:
```bash
export TEST_EHR_PROFILE=docker-linux # if running on a mac or linux machine

export TEST_EHR_PROFILE=docker-windows # if running on a windows machine
```
3. Save `.bash_profile` and complete the update to `env`:
```bash
source .bash_profile
```

Note: How you set environment and path variables may vary depending on your operating system and terminal used. See [setting environment variables section](#setting-environment-variables) for more information.

- Add Compose Project Name to environment

Note: The compose project name is to disambiguate between different set ups on the same machine and can be set to any identifier. If you are following both options mentioned in this guide, it is recommended to change the compose project name for each so that they differ.
You can see a list of your pre-existing environment variables on your machine by running `env` in your Terminal. To add to `env`:
1. Set "COMPOSE_PROJECT_NAME" as "rems_prod" in the .env file in the REMS Repository

or

1. `cd ~/`
2. Open `.bash_profile` and add the following lines at the very bottom:
```bash
export COMPOSE_PROJECT_NAME=rems_prod
```
3. Save `.bash_profile` and complete the update to `env`:
```bash
source .bash_profile
```

Note: How you set environment and path variables may vary depending on your operating system and terminal used. See [setting environment variables section](#setting-environment-variables) for more information.

Note: The compose project name is to disambiguate between different set ups on the same machine and can be set to any identifier. If you are following both options mentioned in this guide, it is recommended to change the compose project name for each so that they differ.

Set `COMPOSE_PROJECT_NAME` as a unique identifier in the .env file in the REMS Repository or in your terminal environment variables.

- Start docker compose application

```bash
cd REMS # Need to execute commands in directory with corresponding docker-compose.yml file located in the REMS repository
docker-compose up
```
```bash
cd REMS # Need to execute commands in directory with corresponding docker-compose.yml file located in the REMS repository
docker-compose up
```

Note, if you are using an M1/M2 mac, you need to use the following command to start the docker compose application
```bash
cd REMS # Need to execute commands in directory with corresponding docker-compose.yml file located in the REMS repository
docker-compose -f docker-compose-m1.yml up
```
Note, if you are using an M1/M2 mac, you need to use the following command to start the docker compose application
```bash
cd REMS # Need to execute commands in directory with corresponding docker-compose.yml file located in the REMS repository
docker-compose -f docker-compose-m1.yml up
```

### 4. Verify everything is working

Expand Down
2 changes: 1 addition & 1 deletion docker-compose-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ services:
- '8080:8080'
- "8081:8081"
environment:
- DOCKER_PROFILE=true
- DOCKER_PROFILE=${TEST_EHR_PROFILE}
build:
context: ../test-ehr
dockerfile: Dockerfile.dev
Expand Down
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ services:
- '8080:8080' # Bind port 3000 of host to 3000 of container
image: codexrems/test-ehr:REMSvCurrent
environment:
- DOCKER_PROFILE=true
- DOCKER_PROFILE=${TEST_EHR_PROFILE}
extra_hosts:
- "host.docker.internal:host-gateway"

Expand Down Expand Up @@ -54,7 +54,7 @@ services:
image: codexrems/rems-administrator:REMSvCurrent
container_name: rems_prod_rems
ports: # Port binding to host from docker container
- "9015:9015" # Bind port 3000 of host to 3000 of container
- "8090:8090"
environment:
VSAC_API_KEY: ${VSAC_API_KEY}
MONGO_URL: mongodb://rems-user:pass@pims_remsadmin_mongo:27017
Expand Down