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).
Build a docker instance and run it
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.
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
Run
docker compose buildRun
docker compose up -d
2. Pulling down the published images (recommended)
Since the docker images are published on GitHub, you need to login to Docker with GitHub.
docker login ghcr.ioWhen prompted, enter your Github username and Github Personal Access Token as the password.
Run
docker compose pullRun
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/openmrsIf 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/startedAlternatively, 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; doneThis 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:
Login as the admin user with the credentials:
username: admin password: Admin123Navigate to the legacy admin UI by clicking on
App Menuand then clickingSystem AdministrationGo to
Manage UsersSearch for “admin” and click on the result “admin”
Create a provider account for the admin user by checking the
Create a Provider account for this usercheckboxScroll to the bottom of the page and click on
Save userStep 1Step 2
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,
Navigate to the legacy admin UI by clicking on
App Menuand then clickingSystem AdministrationGo to
Manage UsersClick on
Add UserUnder
Create a new personclickNextEnter all required details such as name, username, gender, password and make sure that
Create a Provider account for this useris tickedAssign the role
Organizational: DoctorScroll to the bottom of the page and click on
Save user
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.
Navigate to the legacy admin UI by clicking on
App Menuand then clickingSystem AdministrationClick on
Manage RolesunderUsersClick on the role you wish to edit, e.g organizational doctor
Tick the privileges and roles that should be inherited.
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.