You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/en/building/contact-summary/contact-summary-templated.md
+4-4
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ weight: 2
5
5
description: >
6
6
Customizing the fields, cards, and actions on profile pages
7
7
relatedContent: >
8
-
building/guides/forms/form-inputs
8
+
building/forms/configuring/form-inputs
9
9
relevantLinks: >
10
10
docs/building/features/contacts
11
11
docs/building/concepts/hierarchies
@@ -55,14 +55,14 @@ Each field that can be shown on a contact's profile is defined as an object in t
55
55
|`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 |
56
56
|`translate`|`boolean`| Whether or not to translate the `value`. Defaults to false. | no |
57
57
|`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 |
58
-
|`appliesIf`|`function()`or `boolean`| Return true if the field should be shown. | no |
58
+
|`appliesIf`|`function()`| Return `true` if the field should be shown, and `false` if it should be hidden. Default is `true`. | no |
59
59
|`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 |
60
60
61
61
<!-- TODO: See [How to configure profile pages]() for an example. -->
62
62
63
63
## Condition Cards
64
64
65
-
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.
65
+
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.
66
66
67
67
### `contact-summary.templated.js .cards[]`
68
68
@@ -87,7 +87,7 @@ Each condition card is defined as a card object in the `cards` array of `contact
87
87
88
88
## Care Guides
89
89
90
-
Each care guide accessible from a contact profile is defined as an [App Form]({{< ref "building/reference/forms/app" >}}). Context information can be provided to forms via the `context` object of `contact-summary.templated.js`.
90
+
Each care guide accessible from a contact profile is defined as an [App Form]({{< ref "building/forms/app" >}}). Context information can be provided to forms via the `context` object of `contact-summary.templated.js`.
91
91
92
92
To show an App Form on a contact's profile, the form's `expression` field in its properties file must evaluate to true for that contact. The context information from the profile is accessible as the variable `summary`.
@@ -41,7 +41,7 @@ For more information on these features, see the ["Related Content"](#related-con
41
41
42
42
Additional requirements for this application beyond CHT 3.13, include [CHT Android 0.10.0](https://github.com/medic/cht-android) or later and Dimagi's [RD-Toolkit 0.9.8](https://github.com/dimagi/rd-toolkit/) or later.
43
43
44
-
While this application calls the RD-Toolkit, the integration features in the CHT Core and CHT Android are generic. This means you could use a different RDT Android application if you prefer. Beyond the scope of RDTs, you could use this integration feature to launch any other Android app to perform an action and save the result in the CHT. To read more about this feature, see the [Android App Launcher section in the Forms reference documentation]({{< ref "building/reference/forms/app#android-app-launcher" >}}).
44
+
While this application calls the RD-Toolkit, the integration features in the CHT Core and CHT Android are generic. This means you could use a different RDT Android application if you prefer. Beyond the scope of RDTs, you could use this integration feature to launch any other Android app to perform an action and save the result in the CHT. To read more about this feature, see the [Android App Launcher section in the Forms reference documentation]({{< ref "building/forms/app#android-app-launcher" >}}).
45
45
46
46
## Workflow
47
47
@@ -165,7 +165,7 @@ These are the files in the COVID-19 app where you'll want to focus your customiz
165
165
166
166
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.
167
167
168
-
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
168
+
To read more about how these files all work together, see [app forms]({{< ref "building/forms/app" >}}), [contact forms]({{< ref "building/forms/contact" >}}), and [task]({{< ref "building/tasks/tasks-js" >}}) reference documentation
Copy file name to clipboardExpand all lines: content/en/building/features/reports/_index.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ description: >
6
6
relatedContent: >
7
7
building/reference/app-settings/patient_reports
8
8
building/guides/data/invalid-reports
9
-
building/guides/forms/report-titles
9
+
building/forms/configuring/report-titles
10
10
aliases:
11
11
- /apps/features/reports/
12
12
---
@@ -92,7 +92,7 @@ The buttons at the bottom are configurable. The ones you see will depend on your
92
92
## Defining Forms
93
93
94
94
The reports shown in your app are the completed and submitted *forms*. These forms must be defined and included with the application. There are two types of form definitions for reports:
95
-
-**App forms**: actions within the app, such as a completed task, or an action on a contact's profile or reports tab. App forms are defined as [XForms]({{< ref "building/reference/forms/app" >}}).
95
+
-**App forms**: actions within the app, such as a completed task, or an action on a contact's profile or reports tab. App forms are defined as [XForms]({{< ref "building/forms/app" >}}).
96
96
-**JSON forms**: data coming from external channels such as SMS, or via interoperability with other tools. JSON forms are defined using a [JavaScript Object Notation schema]({{< ref "building/reference/app-settings/forms" >}}).
Copy file name to clipboardExpand all lines: content/en/building/features/uhc-mode/_index.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ weight: 11
5
5
description: >
6
6
Supporting equitable and timely care to families to increase Universal Health Coverage (UHC)
7
7
relatedContent: >
8
-
building/guides/forms/uhc-mode
8
+
building/forms/configuring/uhc-mode
9
9
building/reference/app-settings/user-roles
10
10
building/reference/app-settings/user-permissions
11
11
aliases:
@@ -28,4 +28,4 @@ The _UHC Mode_ in the CHT allows health workers to see when a household within t
28
28
When using the _UHC Mode_, the households in the contact list can be sorted by when they were last visited. The days since the last visit is also shown in the app, along with the number of visits made to a household in a month period.
29
29
30
30
## Configurability
31
-
The last visited date is calculated based on the number of days since an action was taken for that household, and the number of visits reflects the actions taken for that household in the current month. What constitutes as an action for a household, along with the start date for the reporting period, [are configurable]({{< relref "building/guides/forms/uhc-mode" >}}) to CHT app developers.
31
+
The last visited date is calculated based on the number of days since an action was taken for that household, and the number of visits reflects the actions taken for that household in the current month. What constitutes as an action for a household, along with the start date for the reporting period, [are configurable]({{< relref "building/forms/configuring/uhc-mode" >}}) to CHT app developers.
@@ -19,9 +15,8 @@ Forms are a building block of all CHT apps. They are used when creating or editi
19
15
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" >}}).
20
16
21
17
There are four different types of forms:
22
-
-[**Contact Forms**]({{< ref "building/reference/forms/contact" >}}): used to create and edit contacts. Defined as CHT-enhanced XForms.
23
-
-[**App Forms**]({{< ref "building/reference/forms/app" >}}): serve as actions within the app, such as a task or an action. Defined as CHT-enhanced XForms.
24
-
-[**Collect Forms**]({{< ref "building/reference/forms/collect" >}}): used to render forms in Medic Collect. Defined as ODK XForms and need a corresponding JSON form to receive data in CHT.
25
-
-[**JSON Forms**]({{< ref "building/reference/app-settings/forms" >}}): used for data coming from external channels such as SMS, or via interoperability with other tools. Defined according to a JavaScript Object Notation schema.
18
+
-[**Contact Forms**]({{< ref "building/forms/contact" >}}): used to create and edit contacts. Defined as CHT-enhanced XForms.
19
+
-[**App Forms**]({{< ref "building/forms/app" >}}): serve as actions within the app, such as a task or an action. Defined as CHT-enhanced XForms.
20
+
-[**Collect Forms**]({{< ref "building/forms/collect" >}}): used to render forms in Medic Collect. Defined as ODK XForms and need a corresponding JSON form to receive data in CHT.
26
21
27
22
Forms that can be completed in the app are built using a CHT-enhanced version of [ODK XForms](https://opendatakit.github.io/xforms-spec/) notation -- a XML definition of the structure and format for a set of questions. Since writing raw XML can be tedious, the [XLSForm standard](http://xlsform.org/) is commonly used to define forms. The [cht-conf](https://github.com/medic/cht-conf) command line tool can be used to convert to the XForm format and include the form in a CHT application. The instructions on this site assume some knowledge of XLSForm.
Copy file name to clipboardExpand all lines: content/en/building/forms/app.md
+10-9
Original file line number
Diff line number
Diff line change
@@ -1,16 +1,17 @@
1
1
---
2
2
title: "app"
3
3
linkTitle: "app"
4
-
weight: 5
4
+
weight: 1
5
5
description: >
6
6
**App Forms**: Used to complete reports, tasks, and actions in the app
7
7
relevantLinks: >
8
8
docs/building/concepts/workflows
9
9
docs/design/best-practices
10
10
relatedContent: >
11
-
building/guides/forms/form-inputs
11
+
building/forms/configuring/form-inputs
12
12
keywords: workflows app-forms
13
13
aliases:
14
+
- /building/reference/forms/app
14
15
- /apps/reference/forms/app
15
16
---
16
17
@@ -21,7 +22,7 @@ App forms are defined by the following files:
21
22
- A XML form definition using a CHT-enhanced ODK XForm format
22
23
- A XLSForm form definition, easier to write and converts to the XForm (optional)
23
24
- Meta information in the `{form_name}.properties.json` file (optional)
24
-
- Media files in the `{form_name}-media` directory (optional). How to [include multimedia files]( {{< ref "building/guides/forms/multimedia" >}} ).
25
+
- Media files in the `{form_name}-media` directory (optional). How to [include multimedia files]( {{< ref "building/forms/configuring/multimedia" >}} ).
25
26
26
27
## XForm
27
28
@@ -91,7 +92,7 @@ Some XForm widgets have been added or modified for use in CHT applications. The
91
92
### Bikram Sambat Datepicker
92
93
93
94
Calendar widget using Bikram Sambat calendar, which is used by default for appropriate languages. The CHT documentation includes a [conversion tool](https://docs.communityhealthtoolkit.org/bikram-sambat/) to check the conversion between Gregorian and Bikram Sambat dates.
@@ -109,7 +110,7 @@ The `trigger` implementation of the countdown timer is only supported for CHT ve
109
110
110
111
111
112
### Contact Selector
112
-
A dropdown field to search and select a person or place, and save their UUID in the report. The contact's data will also be mapped to fields with matching names within the containing group. If the contact selector's appearance includes `bind-id-only`, the associated data fields are not mapped. See [the form input guide]({{< ref "building/guides/forms/form-inputs#contact-selector" >}}) for an example.
113
+
A dropdown field to search and select a person or place, and save their UUID in the report. The contact's data will also be mapped to fields with matching names within the containing group. If the contact selector's appearance includes `bind-id-only`, the associated data fields are not mapped. See [the form input guide]({{< ref "building/forms/configuring/form-inputs#contact-selector" >}}) for an example.
113
114
114
115
### Rapid Diagnostic Test Capture
115
116
Take a picture of a Rapid Diagnotistic Test and save it with the report. Works with [rdt-capture Android application](https://github.com/medic/rdt-capture/). To use create a string field with appearance `mrdt-verify`.
@@ -312,7 +313,7 @@ _Added in 3.14.0._
312
313
313
314
This function converts a `date` to a `string` containing the value of the date formatted according to the [Bikram Sambat](https://en.wikipedia.org/wiki/Vikram_Samvat) calendar.
314
315
315
-
See also: [Bikram Sambat Datepicker]({{< ref "building/reference/forms/app#cht-xform-widgets" >}})
316
+
See also: [Bikram Sambat Datepicker]({{< ref "building/forms/app#cht-xform-widgets" >}})
316
317
317
318
### `z-score`
318
319
@@ -349,17 +350,17 @@ The data used by this function needs to be added to CouchDB. The example below s
349
350
350
351
## Input data
351
352
352
-
`app` forms have access to a variety of [input data]({{< ref "building/guides/forms/form-inputs#app-forms" >}}) depending on the source of the form.
353
+
`app` forms have access to a variety of [input data]({{< ref "building/forms/configuring/form-inputs#app-forms" >}}) depending on the source of the form.
353
354
354
355
## CHT Special Fields
355
356
356
357
Some fields in app forms control specific aspects of CHT Apps, either to bring data into forms or for a feature outside of the form.
357
358
358
359
### Quintiles
359
-
The `NationalQuintile` and `UrbanQuintile` fields on a form will be assigned to all people belonging to the place. This is helpful when household surveys have quintile information which could be used to target health services for individuals. {{< see-also prefix="Read More" page="building/guides/forms/wealth-quintiles" >}}
360
+
The `NationalQuintile` and `UrbanQuintile` fields on a form will be assigned to all people belonging to the place. This is helpful when household surveys have quintile information which could be used to target health services for individuals. {{< see-also prefix="Read More" page="building/forms/configuring/wealth-quintiles" >}}
360
361
361
362
### UHC Mode
362
-
When the `visited_contact_uuid` field is set at the top level of a form, this form is counted as a household visit in [UHC Mode]({{< relref "building/features/uhc-mode" >}}). This field must be a `calculate` field with the place UUID of the visited contact. You may run into performance issues if you configure this to look at forms submitted very frequently. {{< see-also prefix="Read More" page="building/guides/forms/uhc-mode" >}}
363
+
When the `visited_contact_uuid` field is set at the top level of a form, this form is counted as a household visit in [UHC Mode]({{< relref "building/features/uhc-mode" >}}). This field must be a `calculate` field with the place UUID of the visited contact. You may run into performance issues if you configure this to look at forms submitted very frequently. {{< see-also prefix="Read More" page="building/forms/configuring/uhc-mode" >}}
Copy file name to clipboardExpand all lines: content/en/building/forms/configuring/additional-docs.md
+4-4
Original file line number
Diff line number
Diff line change
@@ -5,11 +5,11 @@ weight:
5
5
description: >
6
6
Integration for sending and receiving SMS
7
7
relatedContent: >
8
-
building/guides/forms/app-form-sms
9
-
building/guides/forms/multimedia
10
-
building/reference/forms/contact
11
-
8
+
building/forms/configuring/app-form-sms
9
+
building/forms/configuring/multimedia
10
+
building/forms/contact
12
11
aliases:
12
+
- /building/guides/forms/additional-docs
13
13
- /apps/guides/forms/additional-docs
14
14
---
15
15
In version 2.13.0 and higher, you can configure app forms to generate additional docs upon submission. You can create one or more docs using variations on the configuration described below. One case where this can be used is to register a newborn from a delivery report, as shown below. First, here is an overview of what you can do and how the configuration should look in XML:
0 commit comments