Skip to content

Commit

Permalink
Merge branch 'main' into 129-openmrs-interop
Browse files Browse the repository at this point in the history
  • Loading branch information
andrablaj committed Nov 28, 2024
2 parents a4f820d + a761e1f commit c5af60a
Show file tree
Hide file tree
Showing 167 changed files with 943 additions and 669 deletions.
24 changes: 2 additions & 22 deletions content/en/building/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,26 +17,6 @@ Community Health Toolkit (CHT) Applications are digital health tools built using

To create a digital health tool using the Community Health Toolkit, you'll need to build a CHT Application or re-use an existing CHT Application.

CHT Applications have been built to support a range of health interventions including antenatal care, postnatal care, family planning, integrated community case management of childhood illness, malnutrition, immunization, and epidemic response. CHT Applications have been built to support users at all levels of the community health system including patients, CHWs, CHW supervisors, nurses, health facility staff, program staff, researchers, and policy makers. Beyond the community-level, data from CHT Applications can integrate with the broader health system through integrations with software such as OpenMRS, DHIS2, and RapidPro.
CHT Applications have been built to support a range of health interventions including antenatal care, postnatal care, family planning, integrated community case management of childhood illness, malnutrition, immunization, and epidemic response. CHT Applications have been built to support users at all levels of the community health system including patients, CHWs, CHW supervisors, nurses, health facility staff, program staff, researchers, and policy makers.

## What skills are required

Building a CHT Application or altering an existing app is a technical undertaking requiring a technical skillset.

### To Build an App

Technically speaking, CHT Applications consist of JSON files, XLSForms, JavaScript code, media (images/videos), and translations. Collectively, this is referred to as "configuration code". The following technical skills are necessary to work with all the aspects of configuration code.

* Use of command line tools to compile and deploy configuration code
* [XLSForms](http://xlsform.org) for building forms (to create contacts, add contact actions, complete tasks)
* JSON for modifying settings
* JavaScript for modifying tasks and targets

### To Deploy an App

* System administration
* Database administration for CouchDB and PostgreSQL
* Familiarity with AWS including EC2 and CloudWatch
* Familiarity with Docker
* Service monitoring
* Use of command line tools
Beyond the community-level, data from CHT Applications can integrate and/or interoperate with the broader health system through integrations with software such as OpenMRS, DHIS2, and RapidPro.
2 changes: 1 addition & 1 deletion content/en/building/concepts/_index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "Concepts"
weight: 3
weight: 13
description: >
Basic concepts that will help you understand how CHT applications are built
aliases:
Expand Down
4 changes: 2 additions & 2 deletions content/en/building/concepts/care-guides.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ description: >
keywords: care-guides
relatedContent: >
building/concepts/forms
building/features/tasks/#care-guides
building/reference/contact-page/#care-guides
building/tasks/#care-guides
building/contact-summary/contact-summary-templated/#care-guides
aliases:
- /apps/concepts/care-guides
---
Expand Down
2 changes: 1 addition & 1 deletion content/en/building/concepts/forms.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ aliases:

Forms are a building block of all CHT apps. They are used when creating or editing contacts, and when completing a care guide or survey within the app. Forms are also used to interpret SMS interactions with the CHT.

When a completed form is submitted, it is treated as a Report in the app. All reports can be viewed in the [Reports tab]({{< ref "building/features/reports" >}}) by those with the proper access within the [hierarchy]({{< ref "building/concepts/hierarchy" >}}).
When a completed form is submitted, it is treated as a Report in the app. All reports can be viewed in the [Reports tab]({{< ref "building/features/reports" >}}) by those with the proper access within the [hierarchy]({{< ref "building/workflows/hierarchy" >}}).

There are four different types of forms:
- [**Contact Forms**]({{< ref "building/reference/forms/contact" >}}): used to create and edit contacts. Defined as CHT-enhanced XForms.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
---
title: "Building Condition Cards"
title: Condition Cards
linkTitle: Condition Cards
weight: 12
weight: 6
description: >
Building CHT application condition cards
relatedContent: >
building/contact-management
building/reference/contact-page#condition-cards
building/contact-summary/contact-summary-templated#condition-cards
aliases:
- /building/tutorials/condition-cards
- /apps/tutorials/condition-cards
---

Expand Down Expand Up @@ -42,7 +43,7 @@ Create a `contact-summary.templated.js` file if it doesn't exist. (This may have

### 1. Add Dependencies and Variable Definitions

Add the following dependencies and variable definitions at the top of the file (some of them may have been added from the [contact summary tutorial]({{< ref "building/tutorials/contact-summary" >}})):
Add the following dependencies and variable definitions at the top of the file (some of them may have been added from the [contact summary tutorial]({{< ref "building/contact-summary/contact-summary-overview" >}})):

```javascript
const thisContact = contact;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ In these steps you are going to create a Health Facility, CHW Areas, primary con

To create contacts and their associated users with cht-conf, you will need to create a CSV file with the information of the contacts and the users that you would like to create. The name of the file determines the type of doc created for rows contained in the file.

For example, file named `place.district_hospital.csv` adds the property `"type":"district_hospital"` and a file named `person.clinic.csv` add the property `"type":"person"`
For example, file named `place.district_hospital.csv` adds the property `"type":"district_hospital"` and a file named `person.clinic.csv` adds the property `"type":"person"`

Create a CSV file named `place.district_hospital.csv` and add the details of the Health Facilities you would like to create.

Expand Down
10 changes: 5 additions & 5 deletions content/en/building/contact-management/contacts.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ description: >
keywords: hierarchy contacts care-guides
relatedContent: >
building/reference/forms/contact
building/reference/contact-page
building/contact-summary/contact-summary-templated
building/contact-management/moving-contacts
building/contact-management/contact-and-users-1
building/examples/contact-tracing
Expand All @@ -20,7 +20,7 @@ aliases:

“People” is the generic name used for individuals in apps built with the Core Framework. They can be patients, family members, nurses or health workers. Anyone with a profile in your app is a person.

“Places” is the generic name that represents a level in the [hierarchy]({{< ref "building/concepts/hierarchy" >}}). “People” belong to “places”, and “places” belong to other higher level “places” in the hierarchy. A “place” could be a geographic area, like a district with the "people" associated to it being health officers. A "place" could also be a structure in the health system, such as a health facility, and the "people" associated to it being nurses. In deployments with CHWs, the lowest "place" in the hierarchy often represents individual households or families, and the individual members of that household are the "people" associated to it.
“Places” is the generic name that represents a level in the [hierarchy]({{< ref "building/workflows/hierarchy" >}}). “People” belong to “places”, and “places” belong to other higher level “places” in the hierarchy. A “place” could be a geographic area, like a district with the "people" associated to it being health officers. A "place" could also be a structure in the health system, such as a health facility, and the "people" associated to it being nurses. In deployments with CHWs, the lowest "place" in the hierarchy often represents individual households or families, and the individual members of that household are the "people" associated to it.

Users can access their “people” and “places” from the **People** tab. The permissions set for your role and your placement in the hierarchy will determine which contacts you’re able to see. Advanced configuration options are available for a specific offline user role to manage what [level of contact data]({{< ref "building/guides/performance/replication#contact-depth" >}}) is downloaded and stored on their device.

Expand Down Expand Up @@ -87,7 +87,7 @@ The top card on all profiles contains general information for the contact. All t
</div>
</div>

{{< see-also page="contact-page" anchor="contact-summary" title="Defining Contact Summary" >}}
{{< see-also page="contact-summary-templated" anchor="contact-summary" title="Defining Contact Summary" >}}

### Condition Cards

Expand All @@ -109,7 +109,7 @@ Configurable elements include:
</div>
</div>

{{< see-also page="contact-page" anchor="condition-cards" title="Defining Condition Cards" >}}
{{< see-also page="contact-summary-templated" anchor="condition-cards" title="Defining Condition Cards" >}}


## Care Guides
Expand All @@ -124,7 +124,7 @@ You’ll see different forms here depending on which person or place you’re vi

Health workers can use these Care Guides at any time. If the app has scheduled a care visit or follow up, it will be listed under “Tasks.”

{{< see-also page="contact-page" anchor="care-guides" title="Defining Care Guides" >}}
{{< see-also page="contact-summary-templated" anchor="care-guides" title="Defining Care Guides" >}}

<br clear="all">

Expand Down
3 changes: 1 addition & 2 deletions content/en/building/contact-management/moving-contacts.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ relatedContent: >
building/contact-management
building/reference/app-settings/hierarchy
building/contact-management/contact-and-users-2
building/concepts/hierarchy
building/workflows/hierarchy
aliases:
- /building/guides/updates/moving-contacts/
- /apps/guides/updates/moving-contacts
Expand Down
8 changes: 8 additions & 0 deletions content/en/building/contact-summary/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
title: CHT Contact Summary
linkTitle: Contact Summary
identifier: Contact Summary
weight: 5
description: >
Overview and configuration of CHT Contact Summary
---
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
---
title: "Building Contact Summary"
linkTitle: Contact Summary
weight: 11
title: Building Contact Summary
linkTitle: Building
weight: 1
description: >
Building CHT application contact summary
relatedContent: >
building/contact-management#contact-summary
building/reference/contact-page#contact-summary
building/contact-summary/contact-summary-templated#contact-summary
aliases:
- /building/tutorials/contact-summary
- /apps/tutorials/contact-summary
---

Expand All @@ -22,7 +23,7 @@ You will be adding a contact summary that displays information about a person's

## Brief Overview of Key Concepts

Each *field* that can be shown on a contact’s profile is defined as an object in the *[fields array]({{< ref "building/reference/contact-page#contact-summarytemplatedjs-fields" >}})* of `contact-summary.templated.js`.
Each *field* that can be shown on a contact’s profile is defined as an object in the *[fields array]({{< ref "building/contact-summary/contact-summary-templated#contact-summarytemplatedjs-fields" >}})* of `contact-summary.templated.js`.

The *properties* for each object determine how and when the field is shown.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
---
title: "contact-summary.templated.js"
linkTitle: "contact-summary.templated.js"
weight: 5
title: contact-summary.templated.js
linkTitle: contact-summary.templated.js
weight: 2
description: >
**Contact Pages**: Customizing the fields, cards, and actions on profile pages
Customizing the fields, cards, and actions on profile pages
relatedContent: >
building/guides/forms/form-inputs
relevantLinks: >
docs/building/features/contacts
docs/building/concepts/hierarchies
keywords: hierarchy contacts care-guides
aliases:
- /building/reference/contact-page
- /apps/reference/contact-page
---

Expand Down Expand Up @@ -54,14 +55,14 @@ Each field that can be shown on a contact's profile is defined as an object in t
| `width` | `integer` | The horizontal space for the field. Common values are 12 for full width, 6 for half width, or 3 for quarter width. Default 12. | no |
| `translate` | `boolean` | Whether or not to translate the `value`. Defaults to false. | no |
| `context` | `object` | When `translate: true` and `value` uses [translation variables](https://angular-translate.github.io/docs/#/guide/06_variable-replacement), this value should provide the translation variables. | no |
| `appliesIf` | `function()` or `boolean` | Return true if the field should be shown. | no |
| `appliesIf` | `function()` | Return `true` if the field should be shown, and `false` if it should be hidden. Default is `true`. | no |
| `appliesToType` | `string[]` | Filters the contacts for which `appliesIf` will be evaluated. For example, `['person']` or `['clinic', 'health_center']`. It defaults to all types if it is not defined. | no |

<!-- TODO: See [How to configure profile pages]() for an example. -->

## Condition Cards

Each condition card is defined as a card object in the `cards` array of `contact-summary.templated.js`. The properties for each object determine how and when the card and its fields are shown.
Each condition card is defined as a card object in the `cards` array of `contact-summary.templated.js`. Condition cards are conditional and are configured to appear when a certain report is submitted or condition is met. The properties for each object determine how and when the card and its fields are shown.

### `contact-summary.templated.js .cards[]`

Expand Down
2 changes: 1 addition & 1 deletion content/en/building/examples/_index.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "Examples and Reference Applications"
linkTitle: "Examples"
weight: 4
weight: 12
description: >
Templates for structuring and organizing a community health workflow, configuration code, and testing framework
aliases:
Expand Down
4 changes: 2 additions & 2 deletions content/en/building/examples/anc.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ description: >
relatedContent: >
building/concepts
building/reference/forms/app
building/reference/tasks
building/tasks/tasks-js
aliases:
- /apps/examples/anc
---
Expand All @@ -33,7 +33,7 @@ The maternal and newborn health workflow ensures that women receive the care tha

## Forms Hierarchy

Once a [hierarchy]({{< relref "building/concepts/hierarchy" >}}) of people and places is established, forms are added at different levels. This diagram indicates the forms that can be filled about a person in the app (in this case, family members at the household level), as well as the person/user who will access these forms and make the reports (CHWs at the CHW Area level). Some forms are accessible as actions from the family member’s profile as actions, others from the CHW’s task list as tasks, and some as either.
Once a [hierarchy]({{< relref "building/workflows/hierarchy" >}}) of people and places is established, forms are added at different levels. This diagram indicates the forms that can be filled about a person in the app (in this case, family members at the household level), as well as the person/user who will access these forms and make the reports (CHWs at the CHW Area level). Some forms are accessible as actions from the family member’s profile as actions, others from the CHW’s task list as tasks, and some as either.

{{< figure src="forms-hierarchy.png" link="forms-hierarchy.png" class="right col-12 col-lg-12" >}}

Expand Down
4 changes: 2 additions & 2 deletions 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 Expand Up @@ -165,7 +165,7 @@ These are the files in the COVID-19 app where you'll want to focus your customiz

The `forms/app/covid19_rdt_provision` and `forms/app/covid19_rdt_capture` forms (`xlsx`, `xml` and `properties.json`) represent the provision and capture portions of the forms. The tasks that get created are defined in `tasks.js`. Not shown are standard contact definitions in `forms/contact/*` as well as supporting configurations for icons and other CHT application settings.

To read more about how these files all work together, see [app forms]({{< ref "building/reference/forms/app" >}}), [contact forms]({{< ref "building/reference/forms/contact" >}}), and [task]({{< ref "building/reference/tasks" >}}) reference documentation
To read more about how these files all work together, see [app forms]({{< ref "building/reference/forms/app" >}}), [contact forms]({{< ref "building/reference/forms/contact" >}}), and [task]({{< ref "building/tasks/tasks-js" >}}) reference documentation

## Example form submission

Expand Down
2 changes: 1 addition & 1 deletion content/en/building/examples/direct-to-client.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ description: >
relatedContent: >
building/concepts
building/reference/forms/app
building/reference/tasks
building/tasks/tasks-js
aliases:
- /apps/examples/direct-to-client
---
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/features/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/examples/phc-covid.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ description: >
keywords:
relatedContent: >
building/examples/training
building/concepts/workflows
building/workflows/workflows-overview
building/concepts/care-guides
aliases:
- /apps/examples/phc-covid
Expand Down
2 changes: 1 addition & 1 deletion content/en/building/examples/supervisor-reference-app.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ relatedContent: >
building/concepts
building/features/supervision
building/reference/forms/app
building/reference/tasks
building/tasks/tasks-js
aliases:
- /apps/examples/supervisor-reference-app
---
Expand Down
2 changes: 1 addition & 1 deletion content/en/building/features/_index.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "Features of CHT Applications"
linkTitle: "Features"
weight: 3
weight: 15
description: >
Overview of features of CHT applications built with CHT Core
aliases:
Expand Down
Loading

0 comments on commit c5af60a

Please sign in to comment.