Team Management Configuration

This page documents the process for managing teams in Reveal. This document is temporary in nature until we deliver the ability to perform these actions in the Web UI.

Prep

We need to prepare team information before we are able to configure it.

  1. We need all locations with their geography so they can be loaded into Reveal and OpenMRS
  2. We need a complete list of users
  3. We need a list of teams linked to the location where they will work. This can be at the operational area level or one up (i.e. district, village)

Create users in OpenMRS

The first step is to create users in OpenMRS and copy their OpenMRS UUID into an excel spreadsheet so they can be used later. You will need the OpenMRS Username, Name and UUID to be able to link the OpenMRS user to a Practitioner in Reveal

  • Login to the OpenMRS system (you will see the OpenMRS legacy UI)
  • Click Administration
  • Click Manage Users in the left column
  • Click Add User
  • Click the Next button under the text "Create a new person"
  • Complete the form
    • Make sure the Roles include "Provider"
  • Click Save User
  • Search for the user in the Manage users page
  • Click the user's Id to enter their record
  • Scroll down and click Show Advanced Options
  • Copy the UUID (in grey) to a spreadsheet for reference later

Create locations in OpenMRS and Update Reveal with properties.OpenMRS_Id

We currently need to create locations in OpenMRS and ensure they are linked to Reveal's location using the OpenMRS_Id property in the GeoJSON. These locations are often created in bulk through the import scripts defined by VitalWave. The VitalWave scripts do not add the OpenMRS_Id property to the list because we only import a subset of the total locations in a country to OpenMRS. As a result, we need to get a list of the locations that were imported into OpenMRS and get their UUIDs into Reveal.

Steps

Create Practitioners in Reveal

We need to create practitioners in Reveal. Practitioners are effectively users in OpenMRS.

Sample Practitioner
{
  "identifier": "437cc699-cfa7-414c-ba27-1668b6b517e6",
  "active": true,
  "name": "Test User Lusaka",
  "userId": "cad04f1e-9b05-4eac-92ce-4b38aa478644",
  "username": "lusaka"
}
FieldDescription
identifierthis is a unique ID for this user
activetrue or false depending on whether this user is active
nameThe full name of the user
userIdThis is the UUID from the user in OpenMRS (displayed in grey in the Show Advanced Options in OpenMRS)
usernameThis is the OpenMRS username

Steps:

  • Copy all of the information from OpenMRS into Excel
  • Create the JSON above in excel
    • (You can copy and paste unique identifiers to excel from an online GUID generator if you like)
    • Sample Excel Formula: ="{""identifier"": """&A2&""",""active"": true,""name"": """&C2&""",""userId"": """&D2&""",""username"": """&B2&"""},"

A

Identifier

B

Username

C

Name

D

OpenMRS User UUID

f7369d1d-9463-486e-8f9d-2c5e2160c8j9testUser1Test User One1998b24e-b631-42fd-8dd3-f09463e3e626
c304705b-467e-4f38-bfd3-2c683eac411btestUser2Test User Twof3229835-0433-4bc9-a626-736d58035df4

Create Organizations in Reveal

The next step is to create organizations in Reveal. An organization can be defined as anything. We define these as teams who work together and can be assigned together to a subset of operational areas in the system. In Namibia, each team is assigned to a number of clusters and users are assigned to teams. We ultimately need a list of users, teams that they are assigned to and locations where they are assigned, either a list of all locations, or districts.

Sample Organization
{
  "identifier": "fcc19470-d599-11e9-bb65-2a2ae2dbcce4",
  "active": true,
  "name": "The Luang",
  "type": {
    "coding": [
      {
        "system": "http://terminology.hl7.org/CodeSystem/organization-type",
        "code": "team",
        "display": "Team"
      }
    ]
  }
}
FieldDescription
identifierThis is the unique GUID of the organization
activetrue or false depending on whether this organization is active
nameThis is the name of the organization
typeDon't change this. It's a link to a FHIR coded type.

Steps:

Create Practitioner Roles

Practitioner Roles link practitioners to organizations. This is how we assign users to teams in the new process The setup involves linking the practitioners to their organization, often done in excel.

Sample PractitionerRole
{
  "identifier": "85771b10-1d77-40c8-bdf2-d6eb74380f76",
  "active": true,
  "organization": "0c7fd90f-5b99-4ed9-b337-0b42d51eab97",
  "practitioner": "d7c9c000-e9b3-427a-890e-49c301aa48e6",
  "code": {
    "text": "Community Health Worker"
  }
}
FieldDescription
identifierThis is a unique GUID for this practitionerRole
activetrue or false depending on whether this organization is active
organizationThis is the identifier of the organization
practitionerThis is the identifier of the practitioner
code.textThis can be anything. We use Community Health Worker as a placeholder

Steps:

Create a Plan

Make sure to create a plan in the system. This can be done in the web UI. Once posted, you need to get a list of plans and extract the identifier by GET /plans endpoint.

Create Location and Plan Assignments

This is the process for assigning organizations to locations and plans. We do this so that we can perform role based access controls based on the plans where the organization is assigned. Users roles are linked to the organization and the organization is what's linked to the plan and location.

Sample LocationsAndPlans
[{
  "organization": "",
  "jurisdiction": "304cbcd4-0850-404a-a8b1-486b02f7b84d",
  "plan": "144f4d78-a406-5a4f-a45c-8f2b66919e35",
  "fromDate": "2019-09-17T00:00:00.000Z",
  "toDate": "2019-12-01T00:00:00.000Z"
}]
FieldDescription
organizationThis is the identifier of the organization
jurisdictionThis is the identifier of the operational area to be assigned. This must be a jurisdiction type location and we do not support cascading, so it must be the lowest level in the hierarchy
planThis is the identifier of the plan
fromDateThis is the start date of the assignment
toDateThis is the end date of the assignment. If this passes, users will not be able to access this assignment.

Steps: