UHC mode not working for Supervisors in v3.7.x

Describe the Bug
We recently migrated to cht-core v3.7.1 in Uganda and we have noted that the UHC mode is not working for supervisors as it did in the previous v3.6.x which we were running.
The doc on setting up UHC mode permissions here Universal Health Coverage (UHC) mode | Community Health Toolkit does make a point to note that it is usually for CHWs.
However, by setting up permissions like below;

"can_view_last_visited_date": [

and also specifying the visited_contact_uuid within the chp_visit form, we were able to have this visited date/count metric tracked whenever the supervisor conducted a chp visit on a CHW Area.

With the same configuration, the visited date/count metric is not visible in v3.7.1

How To Reproduce The Issue

  1. Configure the UHC mode permissions on the app_settings and the chp_visit form
  2. Push the settings and forms to an instance running on cht-core v3.7.x
  3. Log in as a supervisor
  4. Submit a chp_visit form

Expected Behavior
The visited count and date should be displayed on the CHW Area

This is a screenshot of a supervisor who has just submitted a chp_visit for on v3.6.x
Visited date updated to today, count = 1

Below, the same supervisor. A number of chp_visit forms submitted.

Note that, in the report, the visited_contact_uuid is however being captured.


  • Browser: Chrome
  • Client platform: MacOS
  • Version: 3.7.1

Hi @Kymoraa

Is UHC mode working for users with other roles?
With 3.7 and configurable hierarchies, in order for a contact_type to support visit counts, it needs to have a truthy count_visits property. Like this: cht-core/app_settings.json at master · medic/cht-core · GitHub

Thank you for your response @diana

Yes, on the same v3.7.1, the UHC mode works for VHT Members (CHW). It is configured on the home_visit form. When it is submitted, one is able to track this count. See screenshot below.

I have noted that there are differences in the app_settings that we are using and the one you shared.
We currently don’t have the bit on this

“contact_types”: [ … ]

which you have shared in your reply. Among other parts as well… :thinking:

Please take the default configuration for 3.7.x as a sample: cht-core/app_settings.json at 3.7.x · medic/cht-core · GitHub

By default, visits are only counted for contacts of type “clinic” (as can be seen here: cht-core/app_settings.json at 3.7.x · medic/cht-core · GitHub).

From your screenshots, I can tell this is working. Supervisors, however, see another contact type in their list (health_center?). Can you try enabling count_visits for health centers as well?

1 Like

Okay. Let me do that and I will get back to you.
Thank you :slight_smile:

Hello @diana
Update on the issue. Using the default configurations suggestion for v3.7.x and adding count_visits for health centers enabled this mode for the Supervisors. Thank you


@jonathan Updating the app_settings.json file - configurable hierarchy suggestion BUT still maintaining the current hierarchy structure on v3.13 and adding count_visits for health centers enabled the UHC mode for the Supervisors.
Thanks for the support! Works!

However, we need to update the contact creation workflows, e.g clinic create, health_center-create as documented here