Example: DRC EMR Setup Guidelines

Example: DRC EMR Setup Guidelines

Getting the system up

To setup an instance of the path-drc-emr, there are two options. These guidelines will walk you through both options. The demo site for the MVP is setup using the second method, and that is the method which is generally recommended (unless you have made any local changes to the code in the path-drc-emr repository and you want to test it).

  1. Build a docker instance and run it

  2. Pull down the published images and run it (recommended)

For both options, you need to setup a GitHub Personal Access Token (classic), with minimum read:packages scope. Read here - Using GitHub Packages with Maven within the OpenMRS eco-system | Setting Up Authenticationand here - https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-personal-access-token-classic on how to create a Personal Access Token.

Please make sure that your token has the required permissions.

1. Building the docker images locally

This method is generally only recommended if you need to do some local development. Running build is only possible if the machine is online and has a good internet connection as the build process needs to download dependencies. Since the published image versions have all dependencies already included, the second method is the recommended option.

  1. Since the content package used is hosted on GitHub Packages, you need to configure your Maven settings. See here - Using GitHub Packages with Maven within the OpenMRS eco-system | 2. Configure Maven Settings

  2. Run docker compose build

  3. Run docker compose up -d

2. Pulling down the published images (recommended)

  1. Since the docker images are published on GitHub, you need to login to Docker with GitHub.

docker login ghcr.io
  1. When prompted, enter your Github username and Github Personal Access Token as the password.

  2. Run docker compose pull

  3. Run docker compose up -d

Check if the system is up and running

For both options, it will take a few minutes to complete.

If you're using a browser, navigating to localhost/openmrs should redirect you to the initial setup page at localhost/openmrs/initialsetup. This setup will take a few minutes to complete. Once it's done, you should be able to launch O3 by visiting http://localhost/openmrs/spa in your browser. If you're not using a browser, you can curl the URL to see check whether the setup is complete. Run the following command in your terminal to do this:

curl -v http://localhost/openmrs

If you see 200 OK in the response, the setup should be complete. You could also use curl to check whether the OpenMRS health check endpoint is up and running using:

curl -v http://localhost/openmrs/health/started

Alternatively, you can run this script in your terminal to check whether O3 is up and running.

while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' http://localhost/openmrs/login.htm)" != "200" ]]; do sleep 10; done

This script will check the status of the server every 10 seconds until the server is up and running.

Setting up user accounts

By default, only the admin user is created by the system, but the admin user is not immediately available to test all features of the system.

Setup the admin account to test all the features

If you require to use the admin user to test all features, you need to do the following:

  1. Login as the admin user with the credentials: username: admin password: Admin123

  2. Navigate to the legacy admin UI by clicking on App Menu and then clicking System Administration

  3. Go to Manage Users

  4. Search for “admin” and click on the result “admin”

  5. Create a provider account for the admin user by checking the Create a Provider account for this user checkbox

  6. Scroll to the bottom of the page and click on Save user

    Step 1
    Step 2
Step 3
Step 4
Step 5

Creating a role-based account

If you require to create an account for a specific organizational role, e.g doctor, you can create a new user and assign them an organizational role and any additional privileges that the user requires.

If you need a user to be able to record any sort of encounter you must assign the user a provider account. This is to be done in the same way that is explained in setting up the admin user.

E.g to create a doctor account, you must,

  1. Navigate to the legacy admin UI by clicking on App Menu and then clicking System Administration

  2. Go to Manage Users

  3. Click on Add User

  4. Under Create a new person click Next

  5. Enter all required details such as name, username, gender, password and make sure that Create a Provider account for this user is ticked

  6. Assign the role Organizational: Doctor

  7. Scroll to the bottom of the page and click on Save user

Step 1
Step 2
Step 3
Step 4
Step 5
Step 6

Adding additional privileges to a role

IF you want to persist the changes made to organizational roles across all setups you should update the relevant record in this configuration file - https://github.com/path-drc/openmrs-content-path-drc/blob/main/configuration/backend_configuration/roles/roles_core-demo.csv and update the instances, or create them manually in every instance.

  1. Navigate to the legacy admin UI by clicking on App Menu and then clicking System Administration

  2. Click on Manage Roles under Users

  3. Click on the role you wish to edit, e.g organizational doctor

  4. Tick the privileges and roles that should be inherited.

Step 1
Step 2

 

If the existing roles are not sufficient/does not meet your needs, you can also opt to create a new role and assign the roles privileges that you require. Note that to have these changes across all setups, you would need to update this configuration file - https://github.com/path-drc/openmrs-content-path-drc/blob/main/configuration/backend_configuration/roles/roles_core-demo.csv and update the instances, or create them manually in every instance.