Setting up Multi-facility users

Creating and assigning users to multiple places in the CHT UI

This tutorial will take you through how to create and assign users to multiple places in the CHT UI. Assigning users to multiple places is only available from CHT 4.9.0.

This tutorial covers;

  • Creating contacts and their associated users
  • Creating places and assign contacts to those places
  • Assigning users to multiple places

The CHT application settings allows you to both persist information that is critical to the application outside the code, and to create profiles that store the preferences for project deployments.

Brief Overview of Key Concepts

Permissions are settings that control access to specific app features and functionality.

Roles define permissions for users to access a group of app features and functionality.

Contacts are people or places that are created in the CHT application.

People are both patients in the system and users of the system, such as CHWs or Nurses.

Places represent either an actual physical location such as a health facility, clinic, or a grouping such as a household or CHW Area.

Pre-requisites

Implementation Steps

In this tutorial, you will work with the default contact forms and the default hierarchy.

The default app_settings.json in the CHT found in the /config/default folder has an existing chw_supervisor role and the "can_have_multiple_places": [] permission.

While logged in as an admin user, you will create two Health Facilities, CHW Supervisor, and CHW Area. You will then create the user for the CHW Supervisor so that they can log in and see the facilities, and the CHW Areas they supervise.

Creating multi-facility user using the CHT default config.

1. Create New Health Facility.


While logged into the CHT application, go to the People tab and select New Health Facility


Select the option that lets you create a new person within the form. This person will automatically become the primary contact for the created place.



When filling in the required fields select CHW Supervisor as the role.

Once you have filled the required fields, click Next to go to the next section.


Select the option that lets you name the facility manually. Enter the Name of the Health Facility and submit the form.


You should see the newly created Health Facility appear on the left-hand side and when you select it, you should see the Health Facility name and the primary contact of the Health Facility.



2. Create CHW Area and CHW

We will now create a CHW Area within the Health Facility that we previously created.


Select the Health Facility on the left-hand side. Click on the Blue Action Button and select New Area.


Select the option that lets you create a new person within the form. This person will automatically become the primary contact for the created place.

When filling in the required fields select CHW as the role.

Once you have filled the required fields, click Next to go to the next section.


You will get an option to name the Place after the created contact person or name it yourself. If you select Yes, the new place will be named <contact-name>'s Area. For example Jane Doe's Area.


Once you submit, a new CHW Area will be created. On the right-hand you should see the CHW Area name, the primary contact of the CHW Area, and the Health Facility that the CHW Area belongs to.



3. Create Second Health Facility.


For the second Health Facility, we will skip creating or assigning a primary contact and focus on creating the second Health Facility.


Enter the details of the Health Facility and submit the form.


You should see the two Health Facilities appear on the left-hand side.


4. Create the CHW Supervisor User

Let’s create a CHW Supervisor user who’s linked to the CHW Supervisor contact we created earlier.


Go to the hamburger menu and select App Management.


When you are on the App Management page, select Users on the left-hand side and then select Add User on the right-hand side.


You should now see an Add User Form. Fill in the user name, then select the role as CHW Supervisor.

In the Place field, search for the first Health Facility by typing the first few letters of the Health Facility name. Once you have selected the first Health Facility, type the name of the Second Facility and select it as well.

Once that is done, under the Associate Contact field select the name of the CHW Supervisor whose user you are creating. Finally, input a password and hit Submit.


Once this is done, you have created a supervisor who is assigned to multiple Health Facilities. You can logout and log into the app using the username and password that you just created.

Frequently Asked Questions


Building > Concepts > Users

Defining the user roles and their permissions

Building > Reference > app_settings.json

Settings: The primary location of settings for CHT applications

Building > Tutorials > Contacts + Users 1

Creating and editing contacts and users in the CHT UI