CHT Applications > Features > Targets
Dashboards to track metrics for an individual CHW or for an entire health facility
This tutorial will take you through how to build target widgets.
Target widgets provide a summary or analysis of the data in submitted reports.
You will be adding target widgets that will allow Community Health Workers to track the number of assessments done.
Targets is the user dashboard or analytics tab.
Target widgets provide a summary or analysis of the data in submitted reports.
Count widgets show a tally of a particular report that has been submitted or data within a report that matches a set of criteria.
Percent widgets display a ratio, which helps to provide insight into the proportion that matches a defined criteria.
You should have a functioning CHT instance with medic-conf
installed locally, completed a project folder setup, and an assessment form.
Create a targets.js
file (this may have already been created by the initialise-project-layout
command).
Edit the targets.js
file to define an all-time widget as shown below:
module.exports = [
{
id: 'assessments-all-time',
type: 'count',
icon: 'icon-healthcare-assessment',
goal: -1,
translation_key: 'targets.assessments.title',
subtitle_translation_key: 'targets.all_time.subtitle',
appliesTo: 'reports',
appliesToType: ['assessment'],
date: 'now'
}
];
Edit the targets.js
file and add another target widget definition object to define a monthly widget as shown below:
module.exports = [
{
id: 'assessments-all-time',
type: 'count',
icon: 'icon-healthcare-assessment',
goal: -1,
translation_key: 'targets.assessments.title',
subtitle_translation_key: 'targets.all_time.subtitle',
appliesTo: 'reports',
appliesToType: ['assessment'],
date: 'now'
},
{
id: 'assessments-this-month',
type: 'count',
icon: 'icon-healthcare-assessment',
goal: -1,
translation_key: 'targets.assessments.title',
subtitle_translation_key: 'targets.this_month.subtitle',
appliesTo: 'reports',
appliesToType: ['assessment'],
date: 'reported'
}
];
date
property set to now
while monthly widgets have the date
property set to reported
.See Also: Targets overview
To compile and upload app settings to your local instance, run the following command:
medic-conf --url=https://<username>:<password>@localhost --accept-self-signed-certs compile-app-settings upload-app-settings
<username>
and <password>
with the actual username and password of your test instance.Dashboards to track metrics for an individual CHW or for an entire health facility
Targets: Definition of target widgets calculated and seen in the app
This document covers the configuration best practices of forms, tasks, targets, and contact profiles when building your own community health app.
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.