Skip to content

Commit

Permalink
Move target section (#1681)
Browse files Browse the repository at this point in the history
* Move target section

* More link fixes

* Fix #

* Update content/en/building/targets/targets-js.md

Co-authored-by: Andra Blaj <[email protected]>

* Update content/en/building/targets/targets.md

Co-authored-by: Andra Blaj <[email protected]>

* Update content/en/building/targets/targets.md

Co-authored-by: Andra Blaj <[email protected]>

* targets-widgets rename

* Target Widgets

---------

Co-authored-by: Andra Blaj <[email protected]>
  • Loading branch information
esthermmoturi and andrablaj authored Nov 4, 2024
1 parent 0a41d30 commit fba607a
Show file tree
Hide file tree
Showing 31 changed files with 44 additions and 34 deletions.
2 changes: 1 addition & 1 deletion content/en/building/examples/covid-rdt-reference-app.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ This second video shows the right side of the workflow above to capture RDT resu

Like all applications written for the CHT, there are built-in mechanisms to retrieve raw and aggregate data to generate reports and dashboards. Here are some ways that the data can be accessed:

* **[In app targets]({{< ref "building/features/targets" >}}):** Gives the CHW or their supervisor an aggregate view of any of the form fields. Since targets rely on the data on the device, if targets include data from other users then permissions must be set on the relevant forms so that the data can be replicated and synchronized accordingly.
* **[In app targets]({{< ref "building/targets/targets-overview" >}}):** Gives the CHW or their supervisor an aggregate view of any of the form fields. Since targets rely on the data on the device, if targets include data from other users then permissions must be set on the relevant forms so that the data can be replicated and synchronized accordingly.
* **API Calls:** Given that all form submissions are captured in JSON and that we know the data model well, you can easily do API calls to a CHT server instance and use some custom code (node, python etc) to gather and show stats on a daily basis. You can export to either JSON or CSV. See API docs [for reports]({{< ref "building/reference/api#get-apiv2exportreports" >}}) as well as [monitoring metadata]({{< ref "building/reference/api#get-apiv2monitoring" >}}).
* **[PostgreSQL queries](https://github.com/medic/cht-sync):** CHT ships with a utility to export all the data that the API has to a relational database, Postgres. You have all the raw data the API has, but can now use the power of joins and groupings to come up with totally customizable stats by day, week, month etc. Data can be synched near real time from the CHT.
* **Dashboards:** Medic has used both [Klipfolio](https://www.klipfolio.com/) and, more recently, [Superset](https://superset.incubator.apache.org/) to create more complex yet still user-friendly dashboards. This is particular useful for those who need to view the data but wouldn't otherwise be logging in to CHT apps. These dashboards generally access the relational data in the Postgres database as the back end.
Expand Down
2 changes: 1 addition & 1 deletion content/en/building/examples/learning-care.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ With the spread of COVID-19, it is imperative that access to learning, integrate

The Community Health Academy and Medic set out to deliver a fully-integrated Learning and Care solution, with targeted COVID-19 learning experiences as a global public good.

This integrated Learning & Care App leverages the **[remote onboarding]({{< ref "building/examples/training" >}}), [task & scheduling]({{< ref "building/tasks" >}}), and [target]({{< ref "building/features/targets" >}}) features** of the CHT core framework with the **curated, multimedia educational content** from the Academy’s COVID-19 library.
This integrated Learning & Care App leverages the **[remote onboarding]({{< ref "building/examples/training" >}}), [task & scheduling]({{< ref "building/tasks" >}}), and [target]({{< ref "building/targets/targets-overview" >}}) features** of the CHT core framework with the **curated, multimedia educational content** from the Academy’s COVID-19 library.

## Users and Hierarchy Example

Expand Down
2 changes: 1 addition & 1 deletion content/en/building/features/integrations/dhis2.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ CHWs support patients in their community by following care guides and recording

![CHWs](chw.png "Feature Overview CHWs")

{{< see-also page="building/features/targets" title="Targets" >}}
{{< see-also page="building/targets/targets-overview" title="Targets" >}}

### Supervisors

Expand Down
2 changes: 1 addition & 1 deletion content/en/building/features/integrations/oppia.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ The CHT Core Framework & OppiaMobile integration currently supports the followin
- [Remote onboarding]({{< ref "building/examples/training" >}}) to new apps, software features, and workflows when they are updated, without relying on face-to-face training
- Optimized multimedia content with links to educational modules powered by OppiaMobile
- Message and feedback options, to contact supervisors with questions and seek support
- [Supervisor visibility]({{< ref "building/features/targets/#supervisor-view" >}}) into CHW progress for onboarding, learning, and care
- [Supervisor visibility]({{< ref "building/targets/targets-overview#supervisor-view" >}}) into CHW progress for onboarding, learning, and care
- Hosting options for government-led, government-owned platforms


Expand Down
4 changes: 2 additions & 2 deletions content/en/building/features/supervision/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: >
Supervision and workforce management to strengthen health systems
keywords: supervisor
relatedContent: >
building/features/targets
building/targets/targets-overview
design/best-practices/#targets
building/features/integrations/dhis2
building/reference/app-settings/transitions#create_user_for_contacts
Expand All @@ -22,7 +22,7 @@ The importance of regular and systematic CHW supervision is emphasized by the WH

{{< figure src="aggregate-supervisor.png" link="aggregate-supervisor.png" class="right col-7 col-lg-6" >}}

For CHW Supervisors, the [Targets]({{< relref "building/features/targets" >}}) tab provides important insights into their community unit. It presents Supervisors with actionable information about their CHWs, by aggregating data for each of the CHWs that a Supervisor manages and presenting it in an easily digestible format. This enables Supervisors to gain insight into how well their team of CHWs is working together to meet common goals.
For CHW Supervisors, the [Targets]({{< relref "building/targets/targets-overview" >}}) tab provides important insights into their community unit. It presents Supervisors with actionable information about their CHWs, by aggregating data for each of the CHWs that a Supervisor manages and presenting it in an easily digestible format. This enables Supervisors to gain insight into how well their team of CHWs is working together to meet common goals.

Selecting an aggregate widget opens the detailed view with the data for each individual CHW. If a CHW is performing below the target goal, their value will be highlighted in red, making it easier for Supervisors to know with which CHWs to follow up for coaching and performance management.

Expand Down
2 changes: 1 addition & 1 deletion content/en/building/guides/integrations/dhis2-aggregate.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ In `targets.js`, configure one or more data elements by setting the `dhis.dataSe



{{< see-also page="building/reference/targets" title="Targets" >}}
{{< see-also page="building/targets/targets-js" title="Targets" >}}

```javascript
module.export = [
Expand Down
2 changes: 1 addition & 1 deletion content/en/building/guides/integrations/oppia.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ The code snippet below illustrates an example of a task configured for the educa

### Targets

The users also have access to [targets]({{< ref "building/reference/targets" >}}). Targets are a visual representation of the progress and goals of the user. These are app analytics accessed through the targets tab, where the user is able to view how many modules they have completed. Similar to tasks, targets are defined as an array of objects in a targets.js file under the project folder, with each target following the targets schema. The required properties of a target object include:
The users also have access to [targets]({{< ref "building/targets/targets-js" >}}). Targets are a visual representation of the progress and goals of the user. These are app analytics accessed through the targets tab, where the user is able to view how many modules they have completed. Similar to tasks, targets are defined as an array of objects in a targets.js file under the project folder, with each target following the targets schema. The required properties of a target object include:

- Id - unique identifier of the target;
- Translation_key - title displayed for the widget;
Expand Down
2 changes: 1 addition & 1 deletion content/en/building/guides/performance/purging.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Purging runs on the server on a configurable schedule.

It will iterate over all users to generate a list of unique roles groups that represent every user. Each group will have their purged docs saved in an individual database.

Then, it will iterate over all existent contacts, collecting all reports about that contact along with all sms messages that the contact has sent or received. This is similar to the scoping you may have encountered when configuring [tasks]({{<ref "building/reference/tasks" >}}) and [targets]({{<ref "building/reference/targets" >}}).
Then, it will iterate over all existent contacts, collecting all reports about that contact along with all sms messages that the contact has sent or received. This is similar to the scoping you may have encountered when configuring [tasks]({{<ref "building/reference/tasks" >}}) and [targets]({{<ref "building/targets/targets-js" >}}).

The configured purge function runs over all combinations of purge scope (contact + reports + messages) and user context (unique list of roles) to determine which docs should be purged.

Expand Down
2 changes: 1 addition & 1 deletion content/en/building/reference/extension-libs.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ This will create or update a document to CouchDB with an ID of `extension-libs`

#### CHT API

The function will now be available via the CHT API for [tasks]({{< ref "tasks" >}}), [targets]({{< ref "targets" >}}), and [contact summary]({{< ref "contact-page" >}}) configurations.
The function will now be available via the CHT API for [tasks]({{< ref "tasks" >}}), [targets]({{< ref "building/targets/targets-js" >}}), and [contact summary]({{< ref "contact-page" >}}) configurations.

#### CHT xPath functions

Expand Down
8 changes: 8 additions & 0 deletions content/en/building/targets/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
title: "CHT Targets"
linkTitle: "Targets"
identifier: "Targets"
weight: 4
description: >
Overview and configuration of CHT Targets
---
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
---
title: "Building Target Widgets"
linkTitle: Targets
weight: 10
title: "Target Widgets"
linkTitle: Target Widgets
weight: 2
description: >
How to build CHT monthly and all time target widgets
relatedContent: >
building/features/targets
building/reference/targets
building/targets/targets-overview
building/targets/targets-js
design/best-practices/#anatomy-of-a-task
aliases:
- /apps/tutorials/targets
- /building/tutorials/targets
---

{{% pageinfo %}}
Expand All @@ -23,15 +23,15 @@ You will be adding target widgets that will allow Community Health Workers (CHWs

## Brief Overview of Key Concepts

*[Targets]({{< ref "building/features/targets" >}})* is the user dashboard or analytics tab.
*[Targets]({{< ref "building/targets/targets-overview" >}})* is the user dashboard or analytics tab.

*[Target widgets]({{< ref "building/features/targets#types-of-widgets" >}})* provide a summary or analysis of the data in submitted reports.
*[Target widgets]({{< ref "building/targets/targets-overview#types-of-widgets" >}})* provide a summary or analysis of the data in submitted reports.

*[Count widgets]({{< ref "building/features/targets#count-widgets" >}})* show a tally of a particular report that has been submitted or data within a report that matches a set of criteria.
*[Count widgets]({{< ref "building/targets/targets-overview#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]({{< ref "building/features/targets#percent-widgets" >}})* display a ratio, which helps to provide insight into the proportion that matches a defined criteria.
*[Percent widgets]({{< ref "building/targets/targets-overview#percent-widgets" >}})* display a ratio, which helps to provide insight into the proportion that matches a defined criteria.

*[Target schema]({{< ref "building/reference/targets#targetsjs" >}})* details a set of properties for targets.
*[Target schema]({{< ref "building/targets/targets-js#targetsjs" >}})* details a set of properties for targets.

*Target instance* is an object emitted and counted or aggregated based on target configuration.

Expand Down Expand Up @@ -348,7 +348,7 @@ module.exports = [
];
```

{{< see-also page="building/reference/targets" title="Targets overview" >}}
{{< see-also page="building/targets/targets-js" title="Targets overview" >}}

### 8. Compile and Upload App Settings

Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
---
title: "targets.js"
linkTitle: "targets.js"
weight: 5
weight: 3
description: >
**Targets**: Definition of target widgets calculated and seen in the app
Definition of target widgets calculated and seen in the app
relatedContent: >
building/features/targets
building/targets/targets-overview
design/best-practices
keywords: targets workflows
aliases:
- /building/reference/targets/
- /apps/reference/targets
---

Expand All @@ -18,7 +19,7 @@ aliases:

All targets are defined in the `targets.js` file as an array of objects according to the Targets schema defined below. Each object corresponds to a target widget that shows in the app. The order of objects in the array defines the display order of widgets on the Targets tab. The properties of the object are used to define when the target should appear, what it should look like, and the values it will display.

{{< see-also page="building/features/targets" title="Targets Overview" >}}
{{< see-also page="building/targets/targets-overview" title="Targets Overview" >}}

## `targets.js`

Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
---
title: Targets
weight: 8
title: Overview
weight: 1
description: >
Dashboards to track metrics for an individual CHW or for an entire health facility
keyword: targets
relatedContent: >
building/reference/targets
building/targets/targets-js
core/overview/db-schema#targets
building/features/integrations/dhis2
building/features/supervision/#chw-aggregate-targets
aliases:
- /building/features/targets/
- /apps/features/targets/
---
<!-- ## Targets: Performance Dashboards -->
Expand Down
2 changes: 1 addition & 1 deletion content/en/building/tutorials/application-graphics.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,4 +224,4 @@ Finally run the command: `cht --local upload-app-settings`

To customise the icons used in tasks or the action bar, you will need to edit a form properties file and add an icon property as outline in [form properties]({{< ref "building/tutorials/form-properties" >}}) tutorial.

To customise the icons used in targets, you will need to add an icon property in a target's definition as shown in the [targets]({{< ref "building/tutorials/targets" >}}) tutorial.
To customise the icons used in targets, you will need to add an icon property in a target's definition as shown in the [targets]({{< ref "building/targets/target-widgets" >}}) tutorial.
4 changes: 2 additions & 2 deletions content/en/building/tutorials/application-tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ This tutorial takes you through testing the various configurable components of C
Complete the following tutorials:
- [Building App Forms]({{< ref "building/tutorials/app-forms" >}})
- [Building A Simple Task]({{< ref "building/tasks/simple-tasks" >}})
- [Building Target Widgets]({{< ref "building/tutorials/targets" >}})
- [Building Target Widgets]({{< ref "building/targets/target-widgets" >}})
- [Building Contact Summary]({{< ref "building/tutorials/contact-summary" >}})

## Importance of testing your application
Expand Down Expand Up @@ -448,7 +448,7 @@ Testing a target is relatively straightforward. Add a report or contact that inc
Use [`harness.getTargets`](https://docs.communityhealthtoolkit.org/cht-conf-test-harness/Harness.html#getTargets) to check the state of targets. It returns a [`Target`](https://docs.communityhealthtoolkit.org/cht-conf-test-harness/global.html#Target) object which corresponds to the [targets schema](https://docs.communityhealthtoolkit.org/core/overview/db-schema/#targets).
To test the first two targets created in the [targets tutorial]({{< ref "building/tutorials/targets" >}}), use this code:
To test the first two targets created in the [targets tutorial]({{< ref "building/targets/target-widgets" >}}), use this code:
```js highlight
it('assessment this month and all time assessments should show correct counts', async () => {
//set the current date
Expand Down
4 changes: 2 additions & 2 deletions content/en/core/overview/db-schema.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ description: >
relatedContent: >
building/guides/database
building/reference/contact-page
building/reference/targets
building/targets/targets-js
building/reference/tasks
---

Expand Down Expand Up @@ -293,7 +293,7 @@ To understand the difference between a task requester and a task owner, kindly s
```

## Targets
[Partner configuration code]({{< ref "building/reference/targets#targetsjs" >}}) can configure targets to appear within the Targets/Analytics tab. Target documents are:
[Partner configuration code]({{< ref "building/targets/targets-js#targetsjs" >}}) can configure targets to appear within the Targets/Analytics tab. Target documents are:

* one per analytics reporting period
* updated when the user loads the application or when they view the targets tab
Expand Down

0 comments on commit fba607a

Please sign in to comment.