CHT Applications > Features > Tasks
Ensuring that the right actions are taken for the right people at the right time
Tasks guide health workers through their days and weeks.
This tutorial will take you through how to configure tasks for CHT applications, including:
You will be configuring a task that allows Community Health Workers to conduct a health assessment follow up for children under the age of 5 that have a cough lasting more than 3 days, within 24 hours.
Tasks gives a UI overview of tasks.
Anatomy of a Task takes you through the anatomy of a task
Task schema details a set of properties for tasks.
Utils define a set of utility functions in the Core Framework can make common tasks much easier.
Nools extras where helper variables and functions for Tasks and Targets are defined.
You should have a functioning CHT instance with medic-conf
installed locally, completed a project folder setup, and an assessment form.
It is good practice to set up a reference document for the tasks similar to the one below. Other formats may also be used.
Source | UI Label | Condition | Due Date | Resolved | Window period |
---|---|---|---|---|---|
Assessment form | Assessment follow up | cough_duration > 3 | reported + 1 days | When assessment follow up or another assessment report is submitted | 7 days |
Create the task as per the detail above.
{
name: 'cough-gt-3-days-follow-up',
icon: 'icon-followup-general',
title: 'task.cough_gt_3_days.follow_up',
appliesTo: 'reports',
appliesToType: ['assessment'],
appliesIf: function(contact, report) {
return report && report.fields.group_assessment && parseInt(report.fields.group_assessment) > 3;
},
actions: [
{
type: 'report',
form: 'assessment_follow_up'
}
],
events: [
{
id: 'cough-gt-3-days-follow-up',
days: 0,
start: 2,
end: 7
}
],
resolvedIf: function(contact, report, event, dueDate) {
return isFormArraySubmittedInWindow(contact.reports, ['assessment_follow_up'], dueDate, event, null, report._id);
}
}
assessment_follow_up
form as specified below referenced by the task you created. Refer to the app-forms tutorial.type | name | label | required | relevant | appearance | constraint | constraint_message | calculation | choice_filter | hint | default |
---|---|---|---|---|---|---|---|---|---|---|---|
begin group | group_assessment | Assessment | |||||||||
select_one yes_no | visited_hf | Did ${patient_name} go to a health facility for treatment? | yes | ||||||||
select_one progress_since_last_visit | progress | How is ${patient_name}‘s condition since the last visit? | yes | ${visited_hf} = ‘yes’ | |||||||
end group |
list_name | name | label |
---|---|---|
yes_no | yes | Yes |
yes_no | no | No |
progress_since_last_visit | improved | Improved |
progress_since_last_visit | same | Stayed same |
progress_since_last_visit | worse | Worsened |
form_title | form_id | version | style | path | instance_name | default_language |
---|---|---|---|---|---|---|
Follow up | assessment_follow_up | 1 | pages | data | en |
forms/app
To build your tasks into your app, you must compile them into app-settings, then upload them to your instance.
medic-conf --url=https://<username>:<password>@localhost --accept-self-signed-certs compile-app-settings backup-app-settings upload-app-settings
Remember to convert and upload your assessment_follow_up form
medic-conf --url=https://<username>:<password>@localhost --accept-self-signed-certs convert-app-forms upload-app-forms -- assessment_follow_up
Ensuring that the right actions are taken for the right people at the right time
Tasks: Definition of tasks shown to app users
Building connections between people, actions, and data systems
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.